Click here to Skip to main content
15,912,977 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: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 3:49
cpkilekofp25-Sep-08 3:49 
JokeRe: To me this is a coding horror, and to you? Pin
leonej_dt25-Sep-08 9:12
leonej_dt25-Sep-08 9:12 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 9:37
cpkilekofp25-Sep-08 9:37 
GeneralRe: To me this is a coding horror, and to you? Pin
leonej_dt25-Sep-08 9:41
leonej_dt25-Sep-08 9:41 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 10:16
cpkilekofp25-Sep-08 10:16 
JokeRe: To me this is a coding horror, and to you? Pin
leonej_dt25-Sep-08 10:19
leonej_dt25-Sep-08 10:19 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 10:25
cpkilekofp25-Sep-08 10:25 
GeneralRe: To me this is a coding horror, and to you? Pin
leonej_dt25-Sep-08 10:56
leonej_dt25-Sep-08 10:56 
When I program (I don't know about other people), my priorities are, in decreasing order:

1. the program has to be as fast as possible
2. the compiled executable has to be as small as possible
3. the source code has to be as small as possible

Any sufficiently good C programmer knows what the double negation does. But, if you can't quite get it, you can define a macro

#define IS_NOT_ZERO(a) !!(a)

And the double negation won't bug your mind everywhere in the code. Poke tongue | ;-P

If you can play The Dance of Eternity (Dream Theater), then we shall make a band.

GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp29-Sep-08 4:03
cpkilekofp29-Sep-08 4:03 
GeneralRe: To me this is a coding horror, and to you? Pin
leonej_dt29-Sep-08 17:49
leonej_dt29-Sep-08 17:49 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp30-Sep-08 7:00
cpkilekofp30-Sep-08 7:00 
GeneralRe: To me this is a coding horror, and to you? Pin
leonej_dt1-Oct-08 15:18
leonej_dt1-Oct-08 15:18 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp2-Oct-08 5:49
cpkilekofp2-Oct-08 5:49 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp2-Oct-08 7:03
cpkilekofp2-Oct-08 7:03 
GeneralRe: To me this is a coding horror, and to you? Pin
geoffs2-Oct-08 10:34
geoffs2-Oct-08 10:34 
GeneralRe: To me this is a coding horror, and to you? Pin
David St. Hilaire24-Sep-08 14:01
David St. Hilaire24-Sep-08 14:01 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 3:49
cpkilekofp25-Sep-08 3:49 
GeneralSomeone please help me .... PinPopular
Monty211-Sep-08 18:27
Monty211-Sep-08 18:27 
GeneralRe: Someone please help me .... Pin
StM0n11-Sep-08 23:45
StM0n11-Sep-08 23:45 
JokeRe: Someone please help me .... Pin
BadKarma11-Sep-08 23:58
BadKarma11-Sep-08 23:58 
GeneralRe: Someone please help me .... Pin
dojohansen16-Sep-08 2:22
dojohansen16-Sep-08 2:22 
GeneralRe: Someone please help me .... Pin
cpkilekofp25-Sep-08 3:58
cpkilekofp25-Sep-08 3:58 
GeneralRe: Someone please help me .... Pin
Nagy Vilmos12-Sep-08 2:26
professionalNagy Vilmos12-Sep-08 2:26 
JokeRe: Someone please help me .... Pin
Chris Meech12-Sep-08 2:39
Chris Meech12-Sep-08 2:39 
JokeRe: Someone please help me .... Pin
CPallini12-Sep-08 3:35
mveCPallini12-Sep-08 3:35 

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.