Click here to Skip to main content
15,893,722 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: A function that does... nothing... :-). Pin
supercat924-May-10 6:31
supercat924-May-10 6:31 
GeneralRe: A function that does... nothing... :-). Pin
Luc Pattyn24-May-10 7:03
sitebuilderLuc Pattyn24-May-10 7:03 
GeneralJoining stuff, the hard way Pin
Jeroen De Dauw22-May-10 19:48
Jeroen De Dauw22-May-10 19:48 
GeneralRe: Joining stuff, the hard way Pin
PIEBALDconsult23-May-10 6:41
mvePIEBALDconsult23-May-10 6:41 
GeneralRe: Joining stuff, the hard way Pin
Jeroen De Dauw23-May-10 6:54
Jeroen De Dauw23-May-10 6:54 
GeneralBut...wait, what? Pin
JHizzle20-May-10 5:23
JHizzle20-May-10 5:23 
GeneralRe: But...wait, what? Pin
PIEBALDconsult20-May-10 6:17
mvePIEBALDconsult20-May-10 6:17 
GeneralRe: But...wait, what? Pin
scotchfaster20-May-10 7:01
scotchfaster20-May-10 7:01 
I don't know what language that's in, but I'm wondering if relying on the side-effects of assigning a member to itself is a good idea. A compiler (assuming this is compiled code) might reasonably optimize that away.

However, you have to like the comment!
GeneralRe: But...wait, what? Pin
Robert Rohde20-May-10 19:12
Robert Rohde20-May-10 19:12 
GeneralRe: But...wait, what? Pin
Thomas Krojer20-May-10 20:59
Thomas Krojer20-May-10 20:59 
GeneralRe: But...wait, what? Pin
JHizzle20-May-10 22:18
JHizzle20-May-10 22:18 
GeneralRe: But...wait, what? Pin
Robert Rohde21-May-10 5:02
Robert Rohde21-May-10 5:02 
GeneralRe: But...wait, what? Pin
supercat924-May-10 6:40
supercat924-May-10 6:40 
GeneralRe: But...wait, what? Pin
Chris Meech21-May-10 1:34
Chris Meech21-May-10 1:34 
GeneralSide-effects are bad Pin
leppie25-May-10 1:27
leppie25-May-10 1:27 
GeneralRe: But...wait, what? Pin
Hired Mind13-Jul-10 10:50
Hired Mind13-Jul-10 10:50 
GeneralLogical genius! Pin
Simone Serponi19-May-10 3:01
Simone Serponi19-May-10 3:01 
GeneralRe: Logical genius! Pin
Dr.Walt Fair, PE19-May-10 5:19
professionalDr.Walt Fair, PE19-May-10 5:19 
GeneralRe: Logical genius! Pin
Chris Boden19-May-10 5:40
Chris Boden19-May-10 5:40 
GeneralRe: Logical genius! Pin
supercat919-May-10 6:40
supercat919-May-10 6:40 
GeneralRe: Logical genius! Pin
Richard MacCutchan19-May-10 21:44
mveRichard MacCutchan19-May-10 21:44 
GeneralRe: Logical genius! Pin
supercat920-May-10 5:01
supercat920-May-10 5:01 
GeneralRe: Logical genius! Pin
Richard MacCutchan20-May-10 6:54
mveRichard MacCutchan20-May-10 6:54 
GeneralRe: Logical genius! Pin
Simone Serponi21-May-10 4:08
Simone Serponi21-May-10 4:08 
JokeRe: Logical genius! Pin
Stanciu Vlad20-May-10 6:08
Stanciu Vlad20-May-10 6:08 

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.