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

 
GeneralMessage Removed Pin
9-Feb-10 5:17
professionalJeremy Hutchinson9-Feb-10 5:17 
GeneralRe: Bad join Pin
OriginalGriff9-Feb-10 5:27
mveOriginalGriff9-Feb-10 5:27 
GeneralRe: Bad join Pin
Andrew Rissing9-Feb-10 5:56
Andrew Rissing9-Feb-10 5:56 
JokeRe: Bad join Pin
Stanciu Vlad9-Feb-10 9:09
Stanciu Vlad9-Feb-10 9:09 
GeneralRe: Bad join Pin
Jeremy Hutchinson9-Feb-10 10:35
professionalJeremy Hutchinson9-Feb-10 10:35 
GeneralRe: Bad join Pin
Nagy Vilmos10-Feb-10 3:33
professionalNagy Vilmos10-Feb-10 3:33 
GeneralRe: Bad join Pin
Vasudevan Deepak Kumar10-Feb-10 22:34
Vasudevan Deepak Kumar10-Feb-10 22:34 
GeneralAnother fine gem mined from the codebase Pin
Wes Jones5-Feb-10 13:29
Wes Jones5-Feb-10 13:29 
<code>
Private Function SomeCrappyCode(lsDate As String) As Long
  On Error GoTo ErrorHandler

  Dim llRetval
  Dim llPosition As Long
  
  'Updates the US Month Name in SQL Date to Locale
  'Month Name in Locale Language
  
  llPosition = InStr(lsDate, "Jan")
  If llPosition > 0 Then
    lsDate = Left(lsDate, llPosition - 1) & Format(DateSerial(98, 1, 1), "MMM") & right(lsDate, Len(lsDate) - 3)
    llRetval = True
    Exit Function
  End If
  
  'Copy & paste the above code block 11 more times for Feb...December  

  mlUpdateMonthStringLocale = llRetval
    
Exit Function
ErrorHandler:

  WriteErrorLogEntry Err.number, "SomeCrappyCode", Err.description
  Exit Function
  Resume

End Function
    
  
</code>

JokeRe: Another fine gem mined from the codebase Pin
Jeroen De Dauw5-Feb-10 21:19
Jeroen De Dauw5-Feb-10 21:19 
GeneralRe: Another fine gem mined from the codebase Pin
Lutosław7-Feb-10 2:41
Lutosław7-Feb-10 2:41 
GeneralRe: Another fine gem mined from the codebase Pin
Wes Jones7-Feb-10 6:05
Wes Jones7-Feb-10 6:05 
GeneralRe: Another fine gem mined from the codebase Pin
Lutosław7-Feb-10 12:51
Lutosław7-Feb-10 12:51 
GeneralGoSub Return's Pin
Rob Grainger4-Feb-10 4:57
Rob Grainger4-Feb-10 4:57 
GeneralRe: GoSub Return's Pin
Luc Pattyn4-Feb-10 5:11
sitebuilderLuc Pattyn4-Feb-10 5:11 
GeneralRe: GoSub Return's Pin
Rob Grainger4-Feb-10 8:53
Rob Grainger4-Feb-10 8:53 
GeneralRe: GoSub Return's Pin
Nagy Vilmos4-Feb-10 10:31
professionalNagy Vilmos4-Feb-10 10:31 
GeneralRe: GoSub Return's Pin
David Skelly4-Feb-10 22:42
David Skelly4-Feb-10 22:42 
GeneralRe: GoSub Return's Pin
Tim Carmichael4-Feb-10 8:53
Tim Carmichael4-Feb-10 8:53 
GeneralWhere may I find this person, their immediate family, anscestors and future descendants so I may take revenge upon them all? Pin
Wes Jones3-Feb-10 12:37
Wes Jones3-Feb-10 12:37 
GeneralRe: Where may I find this person, their immediate family, anscestors and future descendants so I may take revenge upon them all? PinPopular
Luc Pattyn3-Feb-10 13:00
sitebuilderLuc Pattyn3-Feb-10 13:00 
GeneralRe: Where may I find this person, their immediate family, anscestors and future descendants so I may take revenge upon them all? PinPopular
Keith Barrow4-Feb-10 0:52
professionalKeith Barrow4-Feb-10 0:52 
GeneralRe: Where may I find this person, their immediate family, anscestors and future descendants so I may take revenge upon them all? Pin
Wes Jones5-Feb-10 13:19
Wes Jones5-Feb-10 13:19 
GeneralRe: Where may I find this person, their immediate family, anscestors and future descendants so I may take revenge upon them all? Pin
NavnathKale29-Mar-10 2:46
NavnathKale29-Mar-10 2:46 
GeneralRe: Where may I find this person, their immediate family, anscestors and future descendants so I may take revenge upon them all? Pin
Distind4-Feb-10 4:19
Distind4-Feb-10 4:19 
JokeRe: Where may I find this person, their immediate family, anscestors and future descendants so I may take revenge upon them all? Pin
Jeremy Tierman4-Feb-10 11:38
Jeremy Tierman4-Feb-10 11:38 

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.