Click here to Skip to main content
15,888,097 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: Programming Hell Pin
Bernhard Hiller29-Dec-10 19:27
Bernhard Hiller29-Dec-10 19:27 
GeneralRe: Programming Hell Pin
_Maxxx_6-Feb-11 19:14
professional_Maxxx_6-Feb-11 19:14 
GeneralRe: Programming Hell Pin
Michael Agroskin3-Jan-11 15:40
Michael Agroskin3-Jan-11 15:40 
RantMagic Numbers Pin
Adrian.Tawse28-Dec-10 6:39
Adrian.Tawse28-Dec-10 6:39 
GeneralRe: Magic Numbers Pin
AspDotNetDev28-Dec-10 7:09
protectorAspDotNetDev28-Dec-10 7:09 
JokeRe: Magic Numbers Pin
fjdiewornncalwe28-Dec-10 8:16
professionalfjdiewornncalwe28-Dec-10 8:16 
GeneralRe: Magic Numbers Pin
AspDotNetDev28-Dec-10 8:19
protectorAspDotNetDev28-Dec-10 8:19 
GeneralRe: Magic Numbers PinPopular
Adrian.Tawse28-Dec-10 12:03
Adrian.Tawse28-Dec-10 12:03 
Mea culpa, mea culpa, mea maxima culpa. I was wearing the wrong glasses.
And now for a new snippet:
A software package was being put together for release and a colleague remarked of one item "Oh God, not that pile of sh*t". I asked why and he said that it corrupted floppies. Now this was before the days when the FAT file system was build into Unix. The utility attempted to write Unix files to a DOS FAT floppy. It did this by opening the device in RAW mode and read and wrote whole sectors, including the FAT table. When transferring text files it would read a sector’s worth of data, scan for \n, shift everything up one, and insert \r. This, of course, would result in buffer overflow. What followed the buffer in memory? You guessed it, the FAT table, which was duly written back to the floppy at the end; it took about ten seconds to notice the problem. I went to the Team Leader to say “You cannot possibly ship this; I can fix it in minutes”. His reply was that they had had a summer student in ad it had taken him all summer to do that, and on no account was I to touch a line; it was to ship exactly as is. “It is OK when used with newly formatted floppies, and the file is not too big” I am not sure who I was more amazed with, the summer student or the Team Leader.
GeneralRe: Magic Numbers Pin
Anna-Jayne Metcalfe18-Jan-11 0:45
Anna-Jayne Metcalfe18-Jan-11 0:45 
GeneralRe: Magic Numbers Pin
_Erik_29-Dec-10 5:37
_Erik_29-Dec-10 5:37 
GeneralRe: Magic Numbers PinPopular
OriginalGriff29-Dec-10 6:43
mveOriginalGriff29-Dec-10 6:43 
GeneralRe: Magic Numbers Pin
_Erik_29-Dec-10 7:00
_Erik_29-Dec-10 7:00 
GeneralRe: Magic Numbers Pin
Adrian.Tawse29-Dec-10 8:01
Adrian.Tawse29-Dec-10 8:01 
GeneralNaming ! ! ! PinPopular
senny27-Dec-10 3:16
senny27-Dec-10 3:16 
JokeRe: Naming ! ! ! PinPopular
_Erik_27-Dec-10 3:24
_Erik_27-Dec-10 3:24 
GeneralRe: Naming ! ! ! Pin
Joe Simes27-Dec-10 11:06
Joe Simes27-Dec-10 11:06 
GeneralRe: Naming ! ! ! Pin
fjdiewornncalwe27-Dec-10 5:43
professionalfjdiewornncalwe27-Dec-10 5:43 
GeneralRe: Naming ! ! ! Pin
wizardzz27-Dec-10 11:18
wizardzz27-Dec-10 11:18 
GeneralRe: Naming ! ! ! Pin
Ray Guan27-Dec-10 20:53
Ray Guan27-Dec-10 20:53 
GeneralRe: Naming ! ! ! PinPopular
Ravi Sant27-Dec-10 22:35
Ravi Sant27-Dec-10 22:35 
GeneralRe: Naming ! ! ! Pin
WiGgLr30-Dec-10 0:05
WiGgLr30-Dec-10 0:05 
GeneralRe: Naming ! ! ! Pin
TorstenH.3-Jan-11 4:38
TorstenH.3-Jan-11 4:38 
GeneralRe: Naming ! ! ! Pin
Hooga Booga17-Jan-11 4:59
Hooga Booga17-Jan-11 4:59 
GeneralPerformance Genius PinPopular
Ibrahim Yusuf25-Dec-10 16:21
Ibrahim Yusuf25-Dec-10 16:21 
GeneralRe: Performance Genius PinPopular
OriginalGriff25-Dec-10 21:52
mveOriginalGriff25-Dec-10 21:52 

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.