Click here to Skip to main content
15,885,985 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: Double salvo function Pin
Julien Villers19-Oct-11 3:35
professionalJulien Villers19-Oct-11 3:35 
GeneralRe: Double salvo function Pin
ekolis19-Oct-11 5:03
ekolis19-Oct-11 5:03 
GeneralThis is the least of... Pin
Mel Padden11-Oct-11 5:43
Mel Padden11-Oct-11 5:43 
GeneralRe: This is the least of... PinPopular
ekolis11-Oct-11 7:14
ekolis11-Oct-11 7:14 
GeneralRe: This is the least of... Pin
cpkilekofp14-Oct-11 5:54
cpkilekofp14-Oct-11 5:54 
GeneralRe: This is the least of... Pin
V.18-Oct-11 0:18
professionalV.18-Oct-11 0:18 
GeneralRe: This is the least of... Pin
ekolis18-Oct-11 3:25
ekolis18-Oct-11 3:25 
GeneralRe: This is the least of... Pin
BobJanova19-Oct-11 0:19
BobJanova19-Oct-11 0:19 
My current work project (code base from another company) is full of these, though wrapping in custom exception types and preserving the inner exception.

It makes sense when you want to add extra semantic information to the exception because you know the context in which it was called. It doesn't the amount they've done it (and it makes tracking down the actual point of failure a pain).

It is 'heavy', yes, but of the order of milliseconds, and if you're using exceptions properly (i.e. they are only thrown in exceptional circumstances) that doesn't matter.
GeneralRe: This is the least of... Pin
Paul Conrad11-Oct-11 7:50
professionalPaul Conrad11-Oct-11 7:50 
GeneralRe: This is the least of... Pin
RobCroll13-Oct-11 16:28
RobCroll13-Oct-11 16:28 
GeneralRe: This is the least of... Pin
Julien Villers14-Oct-11 3:24
professionalJulien Villers14-Oct-11 3:24 
AnswerRe: This is the least of... Pin
Reiss14-Oct-11 3:45
professionalReiss14-Oct-11 3:45 
GeneralRe: This is the least of... Pin
BobJanova14-Oct-11 5:20
BobJanova14-Oct-11 5:20 
GeneralRe: This is the least of... Pin
cpkilekofp14-Oct-11 5:59
cpkilekofp14-Oct-11 5:59 
GeneralRe: This is the least of... Pin
Andy Brummer14-Oct-11 10:22
sitebuilderAndy Brummer14-Oct-11 10:22 
GeneralRe: This is the least of... Pin
Reiss17-Oct-11 0:19
professionalReiss17-Oct-11 0:19 
GeneralRe: This is the least of... Pin
BobJanova17-Oct-11 0:22
BobJanova17-Oct-11 0:22 
GeneralTrue that PinPopular
Arthur F Souza6-Oct-11 4:08
Arthur F Souza6-Oct-11 4:08 
GeneralRe: True that Pin
RobCroll13-Oct-11 16:29
RobCroll13-Oct-11 16:29 
GeneralRe: True that Pin
Firo Atrum Ventus13-Oct-11 16:38
Firo Atrum Ventus13-Oct-11 16:38 
GeneralRe: True that Pin
RobCroll13-Oct-11 17:51
RobCroll13-Oct-11 17:51 
GeneralRe: True that Pin
Firo Atrum Ventus13-Oct-11 19:37
Firo Atrum Ventus13-Oct-11 19:37 
GeneralRe: True that Pin
RobCroll13-Oct-11 21:34
RobCroll13-Oct-11 21:34 
GeneralRe: True that Pin
Firo Atrum Ventus13-Oct-11 21:47
Firo Atrum Ventus13-Oct-11 21:47 
GeneralRe: True that Pin
ii_noname_ii27-Oct-11 2:58
ii_noname_ii27-Oct-11 2:58 

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.