Click here to Skip to main content
11,412,516 members (74,708 online)

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, embarrasing 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: How not to catch the exception Pin
Mohammed Hameed at 20-Jun-13 1:32
professionalMohammed Hameed20-Jun-13 1:32 
GeneralRe: How not to catch the exception Pin
jim lahey at 20-Jun-13 2:55
memberjim lahey20-Jun-13 2:55 
GeneralRe: How not to catch the exception Pin
jim lahey at 20-Jun-13 2:54
memberjim lahey20-Jun-13 2:54 
GeneralRe: How not to catch the exception Pin
GastonV at 20-Jun-13 4:09
memberGastonV20-Jun-13 4:09 
GeneralRe: How not to catch the exception Pin
Richard Deeming at 20-Jun-13 4:56
professionalRichard Deeming20-Jun-13 4:56 
GeneralRe: How not to catch the exception Pin
GastonV at 20-Jun-13 5:30
memberGastonV20-Jun-13 5:30 
GeneralSomething is not as I expected Pin
Mohibur Rashid at 19-Jun-13 23:40
professionalMohibur Rashid19-Jun-13 23:40 
GeneralRe: Something is not as I expected Pin
Amitosh Swain at 20-Jun-13 18:53
memberAmitosh Swain20-Jun-13 18:53 
GeneralRe: Something is not as I expected Pin
Mohibur Rashid at 20-Jun-13 23:25
professionalMohibur Rashid20-Jun-13 23:25 
GeneralRe: Something is not as I expected Pin
Amitosh Swain at 20-Jun-13 23:32
memberAmitosh Swain20-Jun-13 23:32 
GeneralRe: Something is not as I expected Pin
Rob Grainger at 24-Jun-13 0:57
memberRob Grainger24-Jun-13 0:57 
GeneralRe: Something is not as I expected Pin
Member 4673202 at 12-Jul-13 14:11
memberMember 467320212-Jul-13 14:11 
GeneralEverywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 19-Jun-13 21:28
professionalMohammed Hameed19-Jun-13 21:28 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
cjb110 at 19-Jun-13 22:13
membercjb11019-Jun-13 22:13 
Doesn't that go against the whole point of exception handling? try/catch is not equivalent of VB's On Error Goto.

Also if the code breaks all the time then its hardly an 'exception' is it?

And debugging must be a pain, as VS will break in catch block, not where the error occurred wont it?

How many of these catch blocks are entered on regular operation? Exceptions aren't cheap to throw after all.

Also is a try/catch block 'free' of any performance/memory penalty?
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 19-Jun-13 22:20
professionalMohammed Hameed19-Jun-13 22:20 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Rob Grainger at 24-Jun-13 1:02
memberRob Grainger24-Jun-13 1:02 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Jarek Kruza at 19-Jun-13 22:56
memberJarek Kruza19-Jun-13 22:56 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 19-Jun-13 23:08
professionalMohammed Hameed19-Jun-13 23:08 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Jarek Kruza at 20-Jun-13 2:30
memberJarek Kruza20-Jun-13 2:30 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Rob Grainger at 24-Jun-13 1:04
memberRob Grainger24-Jun-13 1:04 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 24-Jun-13 1:31
professionalMohammed Hameed24-Jun-13 1:31 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Chris Ross 2 at 24-Jun-13 3:32
memberChris Ross 224-Jun-13 3:32 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Rob Grainger at 24-Jun-13 5:08
memberRob Grainger24-Jun-13 5:08 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
V. at 20-Jun-13 0:25
professionalV.20-Jun-13 0:25 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 20-Jun-13 0:56
professionalMohammed Hameed20-Jun-13 0:56 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
cjb110 at 20-Jun-13 1:12
membercjb11020-Jun-13 1:12 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 20-Jun-13 1:26
professionalMohammed Hameed20-Jun-13 1:26 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
V. at 20-Jun-13 1:31
professionalV.20-Jun-13 1:31 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 20-Jun-13 2:11
professionalMohammed Hameed20-Jun-13 2:11 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Richard Deeming at 20-Jun-13 2:36
professionalRichard Deeming20-Jun-13 2:36 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
V. at 20-Jun-13 2:39
professionalV.20-Jun-13 2:39 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
AnalogNerd at 24-Jun-13 3:26
memberAnalogNerd24-Jun-13 3:26 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pin
Mohammed Hameed at 24-Jun-13 3:37
professionalMohammed Hameed24-Jun-13 3:37 
GeneralRelational database reinvented as a flat file... Pin
johnsyd at 19-Jun-13 20:58
memberjohnsyd19-Jun-13 20:58 
GeneralRe: Relational database reinvented as a flat file... Pin
AlexCode at 19-Jun-13 21:25
professionalAlexCode19-Jun-13 21:25 
GeneralRe: Relational database reinvented as a flat file... Pin
johnsyd at 19-Jun-13 22:22
memberjohnsyd19-Jun-13 22:22 
GeneralRe: Relational database reinvented as a flat file... Pin
NormDroid at 19-Jun-13 21:43
professionalNormDroid19-Jun-13 21:43 
GeneralRe: Relational database reinvented as a flat file... Pin
AlexCode at 19-Jun-13 22:26
professionalAlexCode19-Jun-13 22:26 
GeneralRe: Relational database reinvented as a flat file... Pin
Richard Deeming at 20-Jun-13 2:32
professionalRichard Deeming20-Jun-13 2:32 
GeneralRe: Relational database reinvented as a flat file... Pin
jim lahey at 20-Jun-13 2:57
memberjim lahey20-Jun-13 2:57 
GeneralWhy stick to just one database? Pin
johnsyd at 19-Jun-13 18:52
memberjohnsyd19-Jun-13 18:52 
GeneralRe: Why stick to just one database? Pin
krumia at 19-Jun-13 18:55
memberkrumia19-Jun-13 18:55 
GeneralRe: Why stick to just one database? Pin
johnsyd at 19-Jun-13 19:07
memberjohnsyd19-Jun-13 19:07 
GeneralRe: Why stick to just one database? Pin
PIEBALDconsult at 19-Jun-13 19:37
professionalPIEBALDconsult19-Jun-13 19:37 
GeneralRe: Why stick to just one database? Pin
vonb at 19-Jun-13 20:25
professionalvonb19-Jun-13 20:25 
GeneralRe: Why stick to just one database? Pin
AlexCode at 19-Jun-13 21:23
professionalAlexCode19-Jun-13 21:23 
GeneralRe: Why stick to just one database? Pin
Adriaan Davel at 19-Jun-13 22:55
memberAdriaan Davel19-Jun-13 22:55 
AnswerRe: Why stick to just one database? Pin
GastonV at 19-Jun-13 21:28
memberGastonV19-Jun-13 21:28 
GeneralRe: Why stick to just one database? Pin
cjb110 at 19-Jun-13 22:15
membercjb11019-Jun-13 22:15 
GeneralRe: Why stick to just one database? Pin
johnsyd at 25-Jun-13 16:01
memberjohnsyd25-Jun-13 16:01 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150427.1 | Last Updated 27 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid