Click here to Skip to main content
15,887,676 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: If it fails, try again Pin
Richard Deeming6-Jun-17 0:20
mveRichard Deeming6-Jun-17 0:20 
GeneralRe: If it fails, try again Pin
abmv23-Jun-17 9:14
professionalabmv23-Jun-17 9:14 
GeneralPetrovich Pin
Brisingr Aerowing15-May-17 11:54
professionalBrisingr Aerowing15-May-17 11:54 
PraiseRe: Petrovich Pin
Marco Bertschi15-May-17 12:30
protectorMarco Bertschi15-May-17 12:30 
PraiseRe: Petrovich Pin
enhzflep25-May-17 23:23
enhzflep25-May-17 23:23 
GeneralVery WTF worthy Mass Effect bug Pin
Brisingr Aerowing6-May-17 14:02
professionalBrisingr Aerowing6-May-17 14:02 
GeneralRe: Very WTF worthy Mass Effect bug Pin
Nathan Minier8-May-17 2:08
professionalNathan Minier8-May-17 2:08 
JokeComments Can Hurt PinPopular
Brady Kelly14-Apr-17 7:57
Brady Kelly14-Apr-17 7:57 
I have a few SQL scripts as embedded resources in my app, for EF seeding. To make sure other coders, or me much later, don't go looking for these scripts, I added the following comment to the first line of each one:
-- This file is used as an embedded resource and not included in the build output.

Then I build a little ResourceManager that for now just reads embedded files, and when I tried it out:
var script = ResourceManager.ReadEmbeddedTextFile("SeedIdTypes.sql");

and hovered over the script destination var, I never saw past the comment, which I had forgotten about, saying This file is used as an embedded resource and not included in the build output, and I assumed it was the CLR complaining about my build settings for the script file. A wasted half hour later, I looked closer, and saw the SQL, realised the script was being read, and the "error message" was my own comment. Laugh | :laugh: Blush | :O
Immanentize the Eschaton!

GeneralRe: Comments Can Hurt Pin
ZurdoDev14-Apr-17 8:18
professionalZurdoDev14-Apr-17 8:18 
GeneralRe: Comments Can Hurt Pin
Brisingr Aerowing14-Apr-17 11:31
professionalBrisingr Aerowing14-Apr-17 11:31 
GeneralRe: Comments Can Hurt PinPopular
Marc Clifton14-Apr-17 13:29
mvaMarc Clifton14-Apr-17 13:29 
GeneralRe: Comments Can Hurt Pin
Brady Kelly14-Apr-17 18:11
Brady Kelly14-Apr-17 18:11 
GeneralRe: Comments Can Hurt Pin
Gary Wheeler3-May-17 7:13
Gary Wheeler3-May-17 7:13 
GeneralRe: Comments Can Hurt Pin
RedDk15-Apr-17 7:25
RedDk15-Apr-17 7:25 
GeneralRe: Comments Can Hurt Pin
Yusuf18-Apr-17 10:30
Yusuf18-Apr-17 10:30 
GeneralRe: Comments Can Hurt Pin
Brady Kelly19-Apr-17 2:53
Brady Kelly19-Apr-17 2:53 
GeneralThe truth is out there Pin
zequion12-Apr-17 20:57
professionalzequion12-Apr-17 20:57 
GeneralRe: A new place has been created PinPopular
EveryNameIsTakenEvenThisOne12-Apr-17 21:21
professionalEveryNameIsTakenEvenThisOne12-Apr-17 21:21 
GeneralRe: A new place has been created Pin
PeejayAdams12-Apr-17 22:33
PeejayAdams12-Apr-17 22:33 
GeneralRe: A new place has been created Pin
Jörgen Andersson12-Apr-17 22:21
professionalJörgen Andersson12-Apr-17 22:21 
GeneralRe: A new place has been created Pin
megaadam12-Apr-17 22:33
professionalmegaadam12-Apr-17 22:33 
GeneralRe: A new place has been created Pin
zequion12-Apr-17 22:47
professionalzequion12-Apr-17 22:47 
GeneralRe: A new place has been created Pin
U. G. Leander12-Apr-17 23:00
professionalU. G. Leander12-Apr-17 23:00 
GeneralRe: A new place has been created Pin
Marco Bertschi12-Apr-17 23:42
protectorMarco Bertschi12-Apr-17 23:42 
GeneralRe: A new place has been created Pin
U. G. Leander12-Apr-17 23:44
professionalU. G. Leander12-Apr-17 23:44 

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.