Click here to Skip to main content

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, embarrasing 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: IF-free codes PinmemberMember 460889823-Feb-13 8:07 
GeneralRe: IF-free codes Pinmemberihoecken26-Feb-13 5:23 
GeneralRe: IF-free codes PinmemberSarK0Y28-Oct-14 13:13 
GeneralRe: IF-free codes PinmemberIngo29-Oct-14 0:20 
QuestionRe: IF-free codes PinmemberSarK0Y29-Oct-14 10:16 
AnswerRe: IF-free codes PinmemberIngo31-Oct-14 2:41 
GeneralRe: IF-free codes PinmvpDave Kreskowiak5-Mar-13 4:53 
GeneralSpurious use of goto... [modified] PinmemberRob Grainger7-Feb-13 2:46 
A true gem...
 
If CurrentContext = "D" Then GoTo c45
 
GetUserDataRecord aForm
 
c45:
 
There were no other ref's to c45, so replaced by...
 
If CurrentContext <> "D" Then GetUserRecord aForm
 

Further down in same procedure:
 
    GoSub ResolveTabOrder
 
    ' Other code here

    Exit Function
 
ResolveTabOrder:
 
    If uControlNbr < 2 Then Return
 
    ' More code here

    GoTo ResolveTabOrder
End Function


modified 7-Feb-13 7:54am.

GeneralRe: Spurious use of goto... Pinmemberjoe_j8-Feb-13 0:37 
General77 PinprotectorAspDotNetDev6-Feb-13 13:43 
GeneralRe: 77 PinmemberMarco Bertschi16-Feb-13 6:17 
GeneralRe: 77 PinmemberNaerling18-Feb-13 21:48 
GeneralRe: 77 PinprotectorAspDotNetDev19-Feb-13 8:12 
GeneralRe: 77 PinprotectorAspDotNetDev19-Feb-13 8:15 
GeneralRe: 77 PinmemberNaerling19-Feb-13 8:22 
Generalworking with Dates... Pinmemberjoe_j6-Feb-13 4:03 
GeneralRe: working with Dates... PinmemberStefan_Lang7-Feb-13 2:40 
JokeRe: working with Dates... PinmemberV.8-Feb-13 1:13 
GeneralRe: working with Dates... Pinmemberjoe_j8-Feb-13 1:17 
GeneralWhen you aren't even sure WHY you're writing bad code [modified] Pinmemberphilip_cole6-Feb-13 0:26 
GeneralRe: When you aren't even sure WHY you're writing bad code Pinmemberjoe_j6-Feb-13 4:05 
GeneralRe: When you aren't even sure WHY you're writing bad code Pinmembers_mon6-Feb-13 4:38 
GeneralRe: When you aren't even sure WHY you're writing bad code PinmemberCHill609-Feb-13 14:26 
GeneralRe: When you aren't even sure WHY you're writing bad code PinmemberFred Flams6-Feb-13 22:16 
GeneralRe: When you aren't even sure WHY you're writing bad code PinmemberYvesDaoust6-Feb-13 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150123.1 | Last Updated 27 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid