Click here to Skip to main content
15,880,608 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: Unambiguously Ambiguous Pin
Wendelius10-Apr-13 18:37
mentorWendelius10-Apr-13 18:37 
GeneralRe: Unambiguously Ambiguous Pin
Jim Meadors10-Apr-13 19:11
Jim Meadors10-Apr-13 19:11 
GeneralRe: Unambiguously Ambiguous Pin
dan!sh 10-Apr-13 22:07
professional dan!sh 10-Apr-13 22:07 
GeneralLet's "switch" to Something Else PinPopular
Tom Delany2-Apr-13 9:31
Tom Delany2-Apr-13 9:31 
GeneralRe: Let's "switch" to Something Else Pin
Brisingr Aerowing2-Apr-13 12:13
professionalBrisingr Aerowing2-Apr-13 12:13 
GeneralRe: Let's "switch" to Something Else Pin
Freak302-Apr-13 21:44
Freak302-Apr-13 21:44 
GeneralRe: Let's "switch" to Something Else Pin
Bernhard Hiller2-Apr-13 22:29
Bernhard Hiller2-Apr-13 22:29 
GeneralRe: Let's "switch" to Something Else Pin
PIEBALDconsult3-Apr-13 5:13
mvePIEBALDconsult3-Apr-13 5:13 
I did similar in C about twenty years ago, but I could only fit two characters into a character literal.

If you'll pardon my rusty C:

char* s ;
// read a line from a file into s
short* i = s ;
switch ( *i ) ...


This enabled me to easily parse some reports. I wish I still had the code. Sigh | :sigh:
GeneralRe: Let's "switch" to Something Else Pin
H.Brydon13-Apr-13 14:22
professionalH.Brydon13-Apr-13 14:22 
GeneralRe: Let's "switch" to Something Else Pin
PIEBALDconsult13-Apr-13 19:39
mvePIEBALDconsult13-Apr-13 19:39 
GeneralRe: Let's "switch" to Something Else Pin
H.Brydon14-Apr-13 9:07
professionalH.Brydon14-Apr-13 9:07 
GeneralRe: Let's "switch" to Something Else Pin
OriginalGriff3-Apr-13 6:25
mveOriginalGriff3-Apr-13 6:25 
GeneralRe: Let's "switch" to Something Else Pin
Tom Delany3-Apr-13 8:02
Tom Delany3-Apr-13 8:02 
GeneralRe: Let's "switch" to Something Else Pin
OriginalGriff3-Apr-13 8:14
mveOriginalGriff3-Apr-13 8:14 
GeneralRe: Let's "switch" to Something Else Pin
BobJanova3-Apr-13 23:27
BobJanova3-Apr-13 23:27 
GeneralRe: Let's "switch" to Something Else Pin
jibalt5-Apr-13 19:20
jibalt5-Apr-13 19:20 
GeneralRe: Let's "switch" to Something Else Pin
BobJanova8-Apr-13 0:48
BobJanova8-Apr-13 0:48 
GeneralRe: Let's "switch" to Something Else Pin
jibalt8-Apr-13 23:42
jibalt8-Apr-13 23:42 
GeneralRe: Let's "switch" to Something Else Pin
BobJanova9-Apr-13 23:23
BobJanova9-Apr-13 23:23 
GeneralRe: Let's "switch" to Something Else Pin
jibalt10-Apr-13 6:33
jibalt10-Apr-13 6:33 
GeneralRe: Let's "switch" to Something Else Pin
Rob Grainger9-Apr-13 2:59
Rob Grainger9-Apr-13 2:59 
GeneralRe: Let's "switch" to Something Else Pin
jschell9-Apr-13 9:05
jschell9-Apr-13 9:05 
GeneralRe: Let's "switch" to Something Else Pin
jibalt10-Apr-13 6:34
jibalt10-Apr-13 6:34 
GeneralRe: Let's "switch" to Something Else Pin
jschell10-Apr-13 8:17
jschell10-Apr-13 8:17 
GeneralRe: Let's "switch" to Something Else Pin
jibalt25-Apr-13 15:44
jibalt25-Apr-13 15:44 

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.