Click here to Skip to main content
15,888,100 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: I didn't write this.. Pin
PIEBALDconsult9-Nov-17 2:22
mvePIEBALDconsult9-Nov-17 2:22 
GeneralRe: I didn't write this.. Pin
Sascha Lefèvre9-Nov-17 0:23
professionalSascha Lefèvre9-Nov-17 0:23 
GeneralRe: I didn't write this.. Pin
Daniel Pfeffer15-Nov-17 0:23
professionalDaniel Pfeffer15-Nov-17 0:23 
GeneralRe: I didn't write this.. Pin
Sascha Lefèvre15-Nov-17 0:26
professionalSascha Lefèvre15-Nov-17 0:26 
GeneralRe: I didn't write this.. Pin
Rob Grainger10-Dec-17 12:40
Rob Grainger10-Dec-17 12:40 
GeneralRe: I didn't write this.. Pin
Sascha Lefèvre11-Dec-17 5:27
professionalSascha Lefèvre11-Dec-17 5:27 
GeneralEnum num num Pin
Duncan Edwards Jones25-Oct-17 0:49
professionalDuncan Edwards Jones25-Oct-17 0:49 
GeneralRe: Enum num num PinPopular
PeejayAdams25-Oct-17 1:47
PeejayAdams25-Oct-17 1:47 
Don't you just love underscores?

I once saw a sproc written by someone who had never heard of DATETIME as a datatype. There were about 3 million lines of "code" and, needless to say, it made vintage cat puke look pretty. The single most lamentable aspect of it, though, was that he padded his names with underscores to make everything the same length (especially ironic given that he didn't see any reason to format his code in any way whatsoever). It all went something like:
select some bilge from badlynamedappointmenttable where is_monday______morning = 0 and is_monday____afternoon = 0 and is_tuesday_____morning = 0 and is_tuesday___afternoon = 0 and is_wednesday___morning = 0 ...  

Reams and reams and reams of it.

How long did it take to type? How many hours did he sit there wondering why no-one had ever bothered to put some kind of date handling mechanism into an otherwise sophisticated RDBMS engine? How many times did he resist the temptation to rename his idiot columns because he couldn't figure out how many underscores to type?

These, and many other questions, will probably remain unanswered for as long as the one of what on earth someone meant by ...
'Generates search string using the hierarchy:
     '1. SEDOL and ISIN and CUSIP  2. SEDOL and ISIN    3. SEDOL    4. ISIN   5. CUSIP
     Public Enum HierarchycalEquitySeachType As Integer
         SEDOL_ISIN_CUSIP___SEDOL_ISIN___SEDOL___ISIN___CUSIP
     End Enum

?
98.4% of statistics are made up on the spot.

GeneralRe: Enum num num Pin
charlieg25-Oct-17 3:10
charlieg25-Oct-17 3:10 
GeneralRe: Enum num num Pin
Duncan Edwards Jones25-Oct-17 4:24
professionalDuncan Edwards Jones25-Oct-17 4:24 
GeneralRe: Enum num num Pin
OriginalGriff25-Oct-17 22:06
mveOriginalGriff25-Oct-17 22:06 
GeneralRe: Enum num num Pin
Bernhard Hiller25-Oct-17 23:08
Bernhard Hiller25-Oct-17 23:08 
GeneralRe: Enum num num Pin
OriginalGriff26-Oct-17 0:15
mveOriginalGriff26-Oct-17 0:15 
GeneralRe: Enum num num Pin
Brisingr Aerowing25-Oct-17 19:48
professionalBrisingr Aerowing25-Oct-17 19:48 
PraiseRe: Enum num num Pin
Duncan Edwards Jones25-Oct-17 20:16
professionalDuncan Edwards Jones25-Oct-17 20:16 
GeneralWhat the elephant did I just step in? Pin
Dave Kreskowiak23-Oct-17 4:45
mveDave Kreskowiak23-Oct-17 4:45 
GeneralRe: What the elephant did I just step in? Pin
madwilliamflint23-Oct-17 4:48
madwilliamflint23-Oct-17 4:48 
GeneralRe: What the elephant did I just step in? Pin
Dave Kreskowiak23-Oct-17 5:34
mveDave Kreskowiak23-Oct-17 5:34 
GeneralRe: What the elephant did I just step in? Pin
raddevus23-Oct-17 5:21
mvaraddevus23-Oct-17 5:21 
GeneralRe: What the elephant did I just step in? Pin
Dave Kreskowiak23-Oct-17 5:36
mveDave Kreskowiak23-Oct-17 5:36 
GeneralRe: What the elephant did I just step in? Pin
Rob Grainger10-Dec-17 12:43
Rob Grainger10-Dec-17 12:43 
GeneralRe: What the elephant did I just step in? Pin
MarkTJohnson23-Oct-17 6:49
professionalMarkTJohnson23-Oct-17 6:49 
GeneralRe: What the elephant did I just step in? Pin
Bernhard Hiller23-Oct-17 22:49
Bernhard Hiller23-Oct-17 22:49 
GeneralRe: What the elephant did I just step in? Pin
Sander Rossel24-Oct-17 0:04
professionalSander Rossel24-Oct-17 0:04 
GeneralRe: What the elephant did I just step in? Pin
Nagy Vilmos24-Oct-17 1:03
professionalNagy Vilmos24-Oct-17 1:03 

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.