Click here to Skip to main content
15,568,971 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.

 
AnswerRe: Parsing string to Integer with try and catch??? Pin
Marco Bertschi30-Sep-12 22:01
professionalMarco Bertschi30-Sep-12 22:01 
GeneralRe: Parsing string to Integer with try and catch??? Pin
dojohansen2-Oct-12 4:48
dojohansen2-Oct-12 4:48 
GeneralRe: Parsing string to Integer with try and catch??? Pin
BobJanova25-Sep-12 4:53
BobJanova25-Sep-12 4:53 
GeneralRe: Parsing string to Integer with try and catch??? Pin
Marco Bertschi25-Sep-12 5:05
professionalMarco Bertschi25-Sep-12 5:05 
AnswerRe: Parsing string to Integer with try and catch??? Pin
Julien Villers26-Sep-12 0:45
professionalJulien Villers26-Sep-12 0:45 
GeneralRe: Parsing string to Integer with try and catch??? Pin
BobJanova26-Sep-12 1:12
BobJanova26-Sep-12 1:12 
GeneralRe: Parsing string to Integer with try and catch??? Pin
Julien Villers26-Sep-12 2:15
professionalJulien Villers26-Sep-12 2:15 
GeneralRe: Parsing string to Integer with try and catch??? Pin
dojohansen2-Oct-12 4:51
dojohansen2-Oct-12 4:51 
I'd say "it depends". If the code was performance-critical, he could have written his own rudimentary method to avoid relying on exceptions to find out if a string represents a valid integer or not. He *should* know that throw-catch is slow, even if he's never seen a TryParse method before.
GeneralRe: Parsing string to Integer with try and catch??? Pin
agolddog28-Sep-12 4:44
agolddog28-Sep-12 4:44 
AnswerRe: Parsing string to Integer with try and catch??? Pin
Marco Bertschi28-Sep-12 5:04
professionalMarco Bertschi28-Sep-12 5:04 
GeneralRe: Parsing string to Integer with try and catch??? Pin
zenwalker19859-Oct-12 18:58
zenwalker19859-Oct-12 18:58 
GeneralHappy debugging! PinPopular
Andrei Straut23-Sep-12 23:12
Andrei Straut23-Sep-12 23:12 
GeneralRe: Happy debugging! Pin
Brisingr Aerowing24-Sep-12 3:54
professionalBrisingr Aerowing24-Sep-12 3:54 
GeneralRe: Happy debugging! Pin
Patrice STOESSEL24-Sep-12 20:40
Patrice STOESSEL24-Sep-12 20:40 
GeneralRe: Happy debugging! Pin
Andrei Straut24-Sep-12 21:09
Andrei Straut24-Sep-12 21:09 
GeneralRe: Happy debugging! Pin
Sentenryu25-Sep-12 1:11
Sentenryu25-Sep-12 1:11 
GeneralRe: Happy debugging! Pin
Andrei Straut25-Sep-12 1:40
Andrei Straut25-Sep-12 1:40 
GeneralRe: Happy debugging! Pin
DerekT-P25-Sep-12 2:01
professionalDerekT-P25-Sep-12 2:01 
GeneralRe: Happy debugging! Pin
Andrei Straut25-Sep-12 2:07
Andrei Straut25-Sep-12 2:07 
GeneralRe: Happy debugging! Pin
BrainiacV25-Sep-12 5:11
BrainiacV25-Sep-12 5:11 
GeneralThat was funny but.. Pin
VallarasuS24-Sep-12 23:59
VallarasuS24-Sep-12 23:59 
GeneralRe: Happy debugging! Pin
dandy7225-Sep-12 1:25
dandy7225-Sep-12 1:25 
GeneralRe: Happy debugging! Pin
Andrei Straut25-Sep-12 1:50
Andrei Straut25-Sep-12 1:50 
GeneralRe: Happy debugging! Pin
dandy7225-Sep-12 2:34
dandy7225-Sep-12 2:34 
GeneralRe: Happy debugging! Pin
Pete O'Hanlon25-Sep-12 3:07
mvaPete O'Hanlon25-Sep-12 3:07 

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.