Click here to Skip to main content
15,912,897 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
#realJSOP16-Sep-08 11:12
professional#realJSOP16-Sep-08 11:12 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 3:38
cpkilekofp25-Sep-08 3:38 
GeneralRe: To me this is a coding horror, and to you? Pin
dighn16-Sep-08 11:51
dighn16-Sep-08 11:51 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 3:40
cpkilekofp25-Sep-08 3:40 
GeneralRe: To me this is a coding horror, and to you? Pin
Swinefeaster16-Sep-08 19:40
Swinefeaster16-Sep-08 19:40 
GeneralRe: To me this is a coding horror, and to you? Pin
Kevin McFarlane17-Sep-08 0:38
Kevin McFarlane17-Sep-08 0:38 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 3:41
cpkilekofp25-Sep-08 3:41 
GeneralRe: To me this is a coding horror, and to you? Pin
Kevin McFarlane17-Sep-08 0:16
Kevin McFarlane17-Sep-08 0:16 
I use the style of your second example though usually with brackets around the expression.

m_boolVar = (intVar != 0);

However, recently I've been moving towards dispensing with the brackets too, partly prompted by my refactoring tool.

Kevin

GeneralRe: To me this is a coding horror, and to you? Pin
Andrew Torrance17-Sep-08 2:57
Andrew Torrance17-Sep-08 2:57 
GeneralRe: To me this is a coding horror, and to you? Pin
cpkilekofp25-Sep-08 3:43
cpkilekofp25-Sep-08 3:43 
GeneralLets call it a wrap... Pin
geoffs17-Sep-08 5:16
geoffs17-Sep-08 5:16 
GeneralRe: Lets call it a wrap... Pin
cpkilekofp25-Sep-08 3:46
cpkilekofp25-Sep-08 3:46 
GeneralRe: To me this is a coding horror, and to you? Pin
leonej_dt18-Sep-08 21:47
leonej_dt18-Sep-08 21:47 
GeneralRe: To me this is a coding horror, and to you? Pin
geoffs19-Sep-08 4:56
geoffs19-Sep-08 4:56 
GeneralRe: To me this is a coding horror, and to you? Pin
leonej_dt19-Sep-08 5:43
leonej_dt19-Sep-08 5:43 
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 
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 

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.