Click here to Skip to main content
15,867,308 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 21:01
protectorMarco Bertschi30-Sep-12 21:01 
GeneralRe: Parsing string to Integer with try and catch??? Pin
dojohansen2-Oct-12 3:48
dojohansen2-Oct-12 3:48 
GeneralRe: Parsing string to Integer with try and catch??? Pin
BobJanova25-Sep-12 3:53
BobJanova25-Sep-12 3:53 
GeneralRe: Parsing string to Integer with try and catch??? Pin
Marco Bertschi25-Sep-12 4:05
protectorMarco Bertschi25-Sep-12 4:05 
AnswerRe: Parsing string to Integer with try and catch??? Pin
Julien Villers25-Sep-12 23:45
professionalJulien Villers25-Sep-12 23:45 
GeneralRe: Parsing string to Integer with try and catch??? Pin
BobJanova26-Sep-12 0:12
BobJanova26-Sep-12 0:12 
GeneralRe: Parsing string to Integer with try and catch??? Pin
Julien Villers26-Sep-12 1:15
professionalJulien Villers26-Sep-12 1:15 
GeneralRe: Parsing string to Integer with try and catch??? Pin
dojohansen2-Oct-12 3:51
dojohansen2-Oct-12 3: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 3:44
agolddog28-Sep-12 3:44 
AnswerRe: Parsing string to Integer with try and catch??? Pin
Marco Bertschi28-Sep-12 4:04
protectorMarco Bertschi28-Sep-12 4:04 
GeneralRe: Parsing string to Integer with try and catch??? Pin
zenwalker19859-Oct-12 17:58
zenwalker19859-Oct-12 17:58 
GeneralHappy debugging! Pin
Andrei Straut23-Sep-12 22:12
Andrei Straut23-Sep-12 22:12 
GeneralRe: Happy debugging! Pin
Brisingr Aerowing24-Sep-12 2:54
professionalBrisingr Aerowing24-Sep-12 2:54 
GeneralRe: Happy debugging! Pin
Patrice STOESSEL24-Sep-12 19:40
Patrice STOESSEL24-Sep-12 19:40 
GeneralRe: Happy debugging! Pin
Andrei Straut24-Sep-12 20:09
Andrei Straut24-Sep-12 20:09 
GeneralRe: Happy debugging! Pin
Sentenryu25-Sep-12 0:11
Sentenryu25-Sep-12 0:11 
GeneralRe: Happy debugging! Pin
Andrei Straut25-Sep-12 0:40
Andrei Straut25-Sep-12 0:40 
GeneralRe: Happy debugging! Pin
DerekT-P25-Sep-12 1:01
professionalDerekT-P25-Sep-12 1:01 
GeneralRe: Happy debugging! Pin
Andrei Straut25-Sep-12 1:07
Andrei Straut25-Sep-12 1:07 
GeneralRe: Happy debugging! Pin
BrainiacV25-Sep-12 4:11
BrainiacV25-Sep-12 4:11 
GeneralThat was funny but.. Pin
VallarasuS24-Sep-12 22:59
VallarasuS24-Sep-12 22:59 
GeneralRe: Happy debugging! Pin
dandy7225-Sep-12 0:25
dandy7225-Sep-12 0:25 
GeneralRe: Happy debugging! Pin
Andrei Straut25-Sep-12 0:50
Andrei Straut25-Sep-12 0:50 
GeneralRe: Happy debugging! Pin
dandy7225-Sep-12 1:34
dandy7225-Sep-12 1:34 
GeneralRe: Happy debugging! Pin
Pete O'Hanlon25-Sep-12 2:07
subeditorPete O'Hanlon25-Sep-12 2: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.