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: Successfully writing to a string literal Pinmembernewton.saber19-May-14 5:34 
GeneralThe Exception to the C# Rules PinmemberBrady Kelly15-May-14 18:55 
GeneralRe: The Exception to the C# Rules PinprofessionalBernhard Hiller15-May-14 21:54 
GeneralRe: The Exception to the C# Rules PinprofessionalShameel16-May-14 0:53 
GeneralRe: The Exception to the C# Rules PinmentorKeith Barrow19-May-14 6:28 
GeneralRe: The Exception to the C# Rules PinprofessionalBernhard Hiller19-May-14 22:46 
GeneralRe: The Exception to the C# Rules Pinmembercpkilekofp19-Jun-14 9:50 
GeneralVB6 code that emits VB6 code PinmemberMrChug7-May-14 16:12 
' Grasshopper, take a deep breath ...
err2go = "    sErrDescr = ""Error "" & Err.Number & "" '"" & Err.Description & ""'"" & vbCrLf &_
         "" occurred in " & fileName & " " & gErlRoutine & """ & _" & vbCrLf & _
         "    IIf(Erl <> 0, "" at line "" & cstr(Erl) & ""."", ""."")"
Print #fOut, err2go
' ... now exhale
 
 
This was a project that needed error handlers everywhere[1]. Using structured comments the source was preprocessed to automatically insert error handlers. Run time errors produced full stack traces with none of the bother of having to code an actual error handler manually. Sweet!
 
[1] Really. Trust me.
They will never have seen anything like us them there. - M. Spirito

GeneralI can't set title for this post!!! PinmemberMeysam Tolouee2-May-14 18:45 
GeneralRe: I can't set title for this post!!! <- then what's that? You trying to confuse me? PinprofessionalEddy Vluggen3-May-14 8:25 
GeneralRe: I can't set title for this post!!! PinmemberPIEBALDconsult3-May-14 12:14 
GeneralRe: I can't set title for this post!!! Pinmembercpkilekofp19-Jun-14 11:05 
GeneralSome useful extension methods PinprofessionalBrisingr Aerowing2-May-14 13:41 
GeneralRe: Some useful extension methods PinmemberPIEBALDconsult2-May-14 14:50 
GeneralRe: Some useful extension methods Pinmemberrobocodeboy13-May-14 21:52 
QuestionRe: Some useful extension methods PinprofessionalMatt T Heffron5-May-14 14:45 
AnswerRe: Some useful extension methods PinprofessionalBrisingr Aerowing5-May-14 15:30 
GeneralRe: Some useful extension methods PinmemberBobJanova6-May-14 0:43 
GeneralThinking Inside the Box Pinmemberkmoorevs24-Apr-14 12:11 
GeneralRe: Thinking Inside the Box Pinmemberahmed zahmed28-Apr-14 7:35 
GeneralRe: Thinking Inside the Box PinprofessionalNagy Vilmos29-Apr-14 11:05 
GeneralRe: Thinking Inside the Box Pinmemberkmoorevs29-Apr-14 11:51 
GeneralRe: Thinking Inside the Box PinprotectorOriginalGriff30-Apr-14 8:13 
GeneralRe: Thinking Inside the Box PinprofessionalArgonia30-Apr-14 5:00 
GeneralRe: Thinking Inside the Box PinmvpRyanDev29-Apr-14 12:52 

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
Web04 | 2.8.140916.1 | Last Updated 18 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid