Click here to Skip to main content
15,898,222 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 - at least it won't break Pin
BillW3322-Aug-11 6:54
professionalBillW3322-Aug-11 6:54 
Generalif .... else case Pin
Colin Mullikin11-Aug-11 2:31
professionalColin Mullikin11-Aug-11 2:31 
GeneralRe: if .... else case Pin
BobJanova11-Aug-11 4:05
BobJanova11-Aug-11 4:05 
QuestionRe: if .... else case Pin
Lutosław11-Aug-11 23:25
Lutosław11-Aug-11 23:25 
AnswerRe: if .... else case Pin
TorstenFrings12-Aug-11 1:13
TorstenFrings12-Aug-11 1:13 
GeneralRe: if .... else case Pin
Lutosław12-Aug-11 1:44
Lutosław12-Aug-11 1:44 
GeneralRe: if .... else case Pin
TorstenFrings12-Aug-11 1:56
TorstenFrings12-Aug-11 1:56 
GeneralRe: if .... else case Pin
Colin Mullikin14-Aug-11 18:27
professionalColin Mullikin14-Aug-11 18:27 
TorstenFrings wrote:
no need for the outer IF, because it could be handled inside the CASE

Yeah, that's it. Having the if instead of just case 0 seems a bit like someone wasn't actually thinking about what they were coding.
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill

America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde

Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin


GeneralRe: if .... else case Pin
Colin Mullikin14-Aug-11 18:28
professionalColin Mullikin14-Aug-11 18:28 
GeneralRe: if .... else case Pin
Vladimir Svyatski18-Aug-11 9:42
professionalVladimir Svyatski18-Aug-11 9:42 
GeneralRe: if .... else case Pin
Vladimir Svyatski18-Aug-11 9:30
professionalVladimir Svyatski18-Aug-11 9:30 
GeneralRe: if .... else case Pin
Colin Mullikin18-Aug-11 14:05
professionalColin Mullikin18-Aug-11 14:05 
GeneralEvery line makes me die a little more... Pin
leppie11-Aug-11 0:37
leppie11-Aug-11 0:37 
GeneralRe: Every line makes me die a little more... Pin
Shameel11-Aug-11 6:03
professionalShameel11-Aug-11 6:03 
GeneralRe: Every line makes me die a little more... Pin
GibbleCH11-Aug-11 8:48
GibbleCH11-Aug-11 8:48 
GeneralRe: Every line makes me die a little more... Pin
leppie11-Aug-11 9:10
leppie11-Aug-11 9:10 
GeneralRe: Every line makes me die a little more... Pin
Brady Kelly11-Aug-11 10:29
Brady Kelly11-Aug-11 10:29 
GeneralRe: Every line makes me die a little more... Pin
Allan Thomas12-Aug-11 2:18
Allan Thomas12-Aug-11 2:18 
GeneralRe: Every line makes me die a little more... Pin
leppie12-Aug-11 3:45
leppie12-Aug-11 3:45 
GeneralIt's a jungle in there PinPopular
GibbleCH9-Aug-11 5:22
GibbleCH9-Aug-11 5:22 
GeneralRe: It's a jungle in there Pin
Shameel9-Aug-11 5:52
professionalShameel9-Aug-11 5:52 
GeneralRe: It's a jungle in there Pin
StM0n9-Aug-11 6:11
StM0n9-Aug-11 6:11 
GeneralRe: It's a jungle in there Pin
Reiss9-Aug-11 8:42
professionalReiss9-Aug-11 8:42 
GeneralRe: It's a jungle in there Pin
GibbleCH9-Aug-11 8:46
GibbleCH9-Aug-11 8:46 
GeneralRe: It's a jungle in there Pin
Sander Rossel9-Aug-11 20:26
professionalSander Rossel9-Aug-11 20:26 

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.