Click here to Skip to main content
15,879,184 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: try-catch code convention Pin
whatrevolution3-Jul-10 17:46
whatrevolution3-Jul-10 17:46 
GeneralRe: try-catch code convention Pin
Nagy Vilmos4-Jul-10 2:10
professionalNagy Vilmos4-Jul-10 2:10 
GeneralRe: try-catch code convention Pin
Kevin Drzycimski4-Jul-10 2:19
Kevin Drzycimski4-Jul-10 2:19 
GeneralRe: try-catch code convention Pin
Bigdeak4-Jul-10 22:16
Bigdeak4-Jul-10 22:16 
GeneralMessage Closed Pin
5-Jul-10 8:13
_beauw_5-Jul-10 8:13 
GeneralRe: try-catch code convention Pin
Eddy Vluggen6-Jul-10 7:27
professionalEddy Vluggen6-Jul-10 7:27 
GeneralMessage Closed Pin
14-Jul-10 13:05
_beauw_14-Jul-10 13:05 
GeneralRe: try-catch code convention Pin
Eddy Vluggen14-Jul-10 20:43
professionalEddy Vluggen14-Jul-10 20:43 
_beauw_ wrote:
Logging is I/O, which is a failure-prone and time-consuming category of operation.Consider what happens if I attempt to log inside of a deeply nested loop;


I wouldn't expect a lot of unexpected exceptions in a deeply-nested loop.

_beauw_ wrote:
There are .NET applications that control, or at least influence, real-time machinery.


.NET isn't recommended for time-critical operations, but how many exceptions could the app raise per 50ms?

_beauw_ wrote:
There are .NET programs that guide stock traders in real-time. Entering into an I/O routine is not always an acceptable response to failure in such environments


I'm not talking about logging those exceptions that you handle locally, but those that you didn't expect and that don't get handled. There shouldn't be too many of those, and you wouldn't want to swallow those. Wouldn't want to ignore an divide by zero and price those stocks at "no worth" Smile | :)
I are Troll Suspicious | :suss:

GeneralRe: try-catch code convention Pin
Kunal Chowdhury «IN»5-Jul-10 23:34
professionalKunal Chowdhury «IN»5-Jul-10 23:34 
GeneralRe: try-catch code convention Pin
fjdiewornncalwe6-Jul-10 4:41
professionalfjdiewornncalwe6-Jul-10 4:41 
GeneralRe: try-catch code convention Pin
Abhinav S6-Jul-10 19:04
Abhinav S6-Jul-10 19:04 
GeneralRe: try-catch code convention Pin
Alois Kraus15-Jul-10 22:22
Alois Kraus15-Jul-10 22:22 
GeneralRe: try-catch code convention Pin
whatrevolution19-Jul-10 4:03
whatrevolution19-Jul-10 4:03 
GeneralRe: try-catch code convention Pin
Hired Mind22-Jul-10 7:19
Hired Mind22-Jul-10 7:19 
GeneralMy turn on MS Bashing PinPopular
peterchen1-Jul-10 0:59
peterchen1-Jul-10 0:59 
GeneralA whole day wasted on one stored procedure Pin
ChrisC(@ncmail)28-Jun-10 12:29
ChrisC(@ncmail)28-Jun-10 12:29 
GeneralRe: A whole day wasted on one stored procedure Pin
J4amieC28-Jun-10 21:59
J4amieC28-Jun-10 21:59 
GeneralRe: A whole day wasted on one stored procedure Pin
David Skelly28-Jun-10 22:36
David Skelly28-Jun-10 22:36 
GeneralRe: A whole day wasted on one stored procedure Pin
ChrisC(@ncmail)29-Jun-10 8:16
ChrisC(@ncmail)29-Jun-10 8:16 
GeneralRe: A whole day wasted on one stored procedure Pin
PIEBALDconsult9-Jul-10 10:47
mvePIEBALDconsult9-Jul-10 10:47 
GeneralStupid Naming Consequences with LINQ Pin
Member 269131324-Jun-10 22:45
Member 269131324-Jun-10 22:45 
GeneralRe: Stupid Naming Consequences with LINQ Pin
whatrevolution25-Jun-10 2:49
whatrevolution25-Jun-10 2:49 
GeneralRe: Stupid Naming Consequences with LINQ Pin
User 274316225-Jun-10 23:59
User 274316225-Jun-10 23:59 
GeneralMessage Closed Pin
28-Jun-10 8:59
_beauw_28-Jun-10 8:59 
GeneralRe: Stupid Naming Consequences with LINQ Pin
David Skelly28-Jun-10 22:38
David Skelly28-Jun-10 22:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.