Click here to Skip to main content
15,887,683 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: 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 
Picture this. VB.NET code written by a newb that needs to be updated with some support for a new file format.

I'm looking at a single method that's 17 pages(!) long and doesn't return anything.

It contains NINETY EIGHT If statements. Some are chained together with ElseIf, some are nested down to five levels deep.

There is lots of this:
VB.NET
    If condition-expression Then
        ' Do nothing
    ElseIf condition-expression Then
        If condition-expression Then
            ' Empty block
        Else
            ' Holy elephant, do something here!
        EndIf
    ElseIf condition-expression Then
        ' Holy elephant, do something here!
    ElseIf condition-expression Then
        ' Yeah, another empty block here too!
    Else
        ' Oh! And this block is empty too.
End If

Shoot me. Please. I beg of you.
System.ItDidntWorkException: Something didn't work as expected.

A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

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 
GeneralRe: What the elephant did I just step in? Pin
AlphaDeltaTheta31-Oct-17 8:06
AlphaDeltaTheta31-Oct-17 8:06 
GeneralRe: What the elephant did I just step in? Pin
Rob Grainger5-Nov-17 22:36
Rob Grainger5-Nov-17 22:36 
QuestionEnglish question Pin
megaadam12-Oct-17 3:26
professionalmegaadam12-Oct-17 3:26 
AnswerRe: English question Pin
den2k8812-Oct-17 3:31
professionalden2k8812-Oct-17 3:31 
AnswerRe: English question Pin
megaadam12-Oct-17 3:42
professionalmegaadam12-Oct-17 3:42 
JokeRe: English question Pin
den2k8812-Oct-17 3:46
professionalden2k8812-Oct-17 3:46 
GeneralRe: English question Pin
peterkmx12-Oct-17 6:35
professionalpeterkmx12-Oct-17 6:35 
AnswerRe: English question Pin
PeejayAdams12-Oct-17 3:37
PeejayAdams12-Oct-17 3:37 

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.