Click here to Skip to main content
15,887,427 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: When I say I am going to do a thing... Pin
Kornfeld Eliyahu Peter18-Jun-14 8:50
professionalKornfeld Eliyahu Peter18-Jun-14 8:50 
GeneralRe: When I say I am going to do a thing... Pin
OriginalGriff18-Jun-14 8:58
mveOriginalGriff18-Jun-14 8:58 
GeneralRe: When I say I am going to do a thing... Pin
Jörgen Andersson18-Jun-14 20:37
professionalJörgen Andersson18-Jun-14 20:37 
GeneralRe: When I say I am going to do a thing... Pin
Nagy Vilmos18-Jun-14 21:36
professionalNagy Vilmos18-Jun-14 21:36 
GeneralRe: When I say I am going to do a thing... Pin
Richard Deeming19-Jun-14 1:30
mveRichard Deeming19-Jun-14 1:30 
GeneralRe: When I say I am going to do a thing... Pin
cpkilekofp19-Jun-14 7:25
cpkilekofp19-Jun-14 7:25 
GeneralRe: When I say I am going to do a thing... Pin
Bernhard Hiller19-Jun-14 22:32
Bernhard Hiller19-Jun-14 22:32 
GeneralInteresting boolean technique PinPopular
Dan Neely16-Jun-14 8:08
Dan Neely16-Jun-14 8:08 
C#
if (e.Message.StartsWith("Case we don't care about"))
{// easier to read than sticking a ! in the conditional
}
else
{
    errorToDisplay += "\n" + e.Message;
}



8 years ago I apparently thought I was being clever by having an empty then block and only having actual code in the else branch. WTF | :WTF:
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius

Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt

GeneralRe: Interesting boolean technique Pin
Marc Clifton16-Jun-14 8:14
mvaMarc Clifton16-Jun-14 8:14 
GeneralRe: Interesting boolean technique Pin
Dan Neely16-Jun-14 8:21
Dan Neely16-Jun-14 8:21 
GeneralRe: Interesting boolean technique Pin
DaveAuld16-Jun-14 8:55
professionalDaveAuld16-Jun-14 8:55 
GeneralRe: Interesting boolean technique Pin
harold aptroot16-Jun-14 22:21
harold aptroot16-Jun-14 22:21 
GeneralRe: Interesting boolean technique Pin
BillW3316-Jun-14 9:11
professionalBillW3316-Jun-14 9:11 
GeneralRe: Interesting boolean technique Pin
Deflinek16-Jun-14 9:53
Deflinek16-Jun-14 9:53 
GeneralRe: Interesting boolean technique Pin
PIEBALDconsult16-Jun-14 11:11
mvePIEBALDconsult16-Jun-14 11:11 
GeneralRe: Interesting boolean technique Pin
Bernhard Hiller16-Jun-14 21:18
Bernhard Hiller16-Jun-14 21:18 
GeneralRe: Interesting boolean technique Pin
OriginalGriff17-Jun-14 5:38
mveOriginalGriff17-Jun-14 5:38 
JokeRe: Interesting boolean technique PinPopular
PaulLinton17-Jun-14 19:49
PaulLinton17-Jun-14 19:49 
GeneralRe: Interesting boolean technique Pin
Bernhard Hiller17-Jun-14 21:42
Bernhard Hiller17-Jun-14 21:42 
GeneralRe: Interesting boolean technique Pin
Super Lloyd18-Jun-14 20:28
Super Lloyd18-Jun-14 20:28 
GeneralInteresting technique used in some Legacy code! Pin
DeathByChocolate16-Jun-14 3:52
professionalDeathByChocolate16-Jun-14 3:52 
GeneralRe: Interesting technique used in some Legacy code! Pin
Nagy Vilmos16-Jun-14 3:56
professionalNagy Vilmos16-Jun-14 3:56 
GeneralRe: Interesting technique used in some Legacy code! Pin
DeathByChocolate16-Jun-14 4:02
professionalDeathByChocolate16-Jun-14 4:02 
GeneralRe: Interesting technique used in some Legacy code! Pin
Kornfeld Eliyahu Peter16-Jun-14 4:01
professionalKornfeld Eliyahu Peter16-Jun-14 4:01 
GeneralRe: Interesting technique used in some Legacy code! Pin
DeathByChocolate16-Jun-14 4:22
professionalDeathByChocolate16-Jun-14 4:22 

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.