Click here to Skip to main content
15,897,891 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.

 
GeneralThis one made me sigh Pin
CARPETBURNER6-Dec-07 0:40
CARPETBURNER6-Dec-07 0:40 
GeneralRe: This one made me sigh Pin
Sathesh Sakthivel6-Dec-07 1:49
Sathesh Sakthivel6-Dec-07 1:49 
GeneralRe: This one made me sigh Pin
Russell Jones6-Dec-07 2:51
Russell Jones6-Dec-07 2:51 
GeneralRe: This one made me sigh Pin
Mike Dimmick6-Dec-07 22:59
Mike Dimmick6-Dec-07 22:59 
GeneralRe: This one made me sigh Pin
Ri Qen-Sin7-Dec-07 5:10
Ri Qen-Sin7-Dec-07 5:10 
GeneralRe: This one made me sigh Pin
Jeffrey Walton7-Dec-07 22:03
Jeffrey Walton7-Dec-07 22:03 
GeneralRe: This one made me sigh Pin
Paul Conrad8-Dec-07 5:05
professionalPaul Conrad8-Dec-07 5:05 
GeneralThe holy comma operator [modified] Pin
Doc Lobster26-Nov-07 2:47
Doc Lobster26-Nov-07 2:47 
happened to me today: (in C++)

if (condA ||
    condB ||
    condC ||
    condD,
    condE) 
{
    ...
}


Of course I wanted to "or" all conditions, but at some point I must have figured to be in a list or something. For anyone not familiar with the comma operator, its worth looking at. I didn't make use of it except e.g. int x=3, y=5; until now (and thats a couple of years).


-- modified at 11:52 Monday 26th November, 2007
GeneralRe: The holy comma operator Pin
Steve Hansen26-Nov-07 4:36
Steve Hansen26-Nov-07 4:36 
GeneralRe: The holy comma operator Pin
jhwurmbach26-Nov-07 5:20
jhwurmbach26-Nov-07 5:20 
GeneralRe: The holy comma operator Pin
Kastellanos Nikos27-Nov-07 22:40
Kastellanos Nikos27-Nov-07 22:40 
GeneralRe: The holy comma operator Pin
Tony Wesley26-Nov-07 5:26
Tony Wesley26-Nov-07 5:26 
GeneralRe: The holy comma operator Pin
Doc Lobster26-Nov-07 6:35
Doc Lobster26-Nov-07 6:35 
GeneralRe: The holy comma operator Pin
Nemanja Trifunovic26-Nov-07 6:53
Nemanja Trifunovic26-Nov-07 6:53 
GeneralRe: The holy comma operator Pin
Chris Losinger26-Nov-07 7:15
professionalChris Losinger26-Nov-07 7:15 
GeneralRe: The holy comma operator Pin
Michael Dunn27-Nov-07 16:47
sitebuilderMichael Dunn27-Nov-07 16:47 
GeneralRe: The holy comma operator Pin
Anthony Mushrow27-Nov-07 2:38
professionalAnthony Mushrow27-Nov-07 2:38 
GeneralRe: The holy comma operator Pin
Michael Davey 127-Nov-07 12:08
Michael Davey 127-Nov-07 12:08 
GeneralRe: The holy comma operator Pin
Mehmet Suyuti Dindar27-Nov-07 22:50
Mehmet Suyuti Dindar27-Nov-07 22:50 
GeneralRe: The holy comma operator Pin
f228-Nov-07 7:19
f228-Nov-07 7:19 
GeneralRe: The holy comma operator Pin
jschell11-Dec-07 10:03
jschell11-Dec-07 10:03 
GeneralGive me a gun pliz Pin
DoomedOne23-Nov-07 7:40
DoomedOne23-Nov-07 7:40 
GeneralRe: Give me a gun pliz Pin
Chris Meech23-Nov-07 7:54
Chris Meech23-Nov-07 7:54 
GeneralRe: Give me a gun pliz Pin
leppie23-Nov-07 13:27
leppie23-Nov-07 13:27 
GeneralRe: Give me a gun pliz Pin
Ri Qen-Sin24-Nov-07 5:51
Ri Qen-Sin24-Nov-07 5:51 

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.