Click here to Skip to main content
11,647,828 members (56,663 online)

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: Message Other user using CodeProject Pin
OriginalGriff27-Dec-12 22:23
mvpOriginalGriff27-Dec-12 22:23 
GeneralRe: Message Other user using CodeProject Pin
Suvabrata Roy27-Dec-12 23:22
memberSuvabrata Roy27-Dec-12 23:22 
GeneralRe: Message Other user using CodeProject Pin
Jan Steyn9-Jan-13 21:48
memberJan Steyn9-Jan-13 21:48 
GeneralRe: Message Other user using CodeProject Pin
OriginalGriff9-Jan-13 22:06
mvpOriginalGriff9-Jan-13 22:06 
GeneralRe: Message Other user using CodeProject Pin
ProgramFOX26-Dec-12 3:46
memberProgramFOX26-Dec-12 3:46 
GeneralMake the font red! No, black! Can we do both? Pin
AnalogNerd20-Dec-12 8:51
memberAnalogNerd20-Dec-12 8:51 
GeneralRe: Make the font red! No, black! Can we do both? Pin
Rob Grainger20-Dec-12 9:21
memberRob Grainger20-Dec-12 9:21 
GeneralRe: Make the font red! No, black! Can we do both? Pin
Zac Greve20-Dec-12 11:23
memberZac Greve20-Dec-12 11:23 
GeneralRe: Make the font red! No, black! Can we do both? Pin
jlopez78826-Dec-12 18:21
memberjlopez78826-Dec-12 18:21 
GeneralRe: Make the font red! No, black! Can we do both? Pin
Marcus Kramer27-Dec-12 6:23
memberMarcus Kramer27-Dec-12 6:23 
GeneralRe: Make the font red! No, black! Can we do both? Pin
Zac Greve30-Dec-12 12:08
memberZac Greve30-Dec-12 12:08 
GeneralRe: Make the font red! No, black! Can we do both? Pin
Rob Grainger4-Jan-13 9:58
memberRob Grainger4-Jan-13 9:58 
GeneralVal Grind (the wrong kind) Pin
Rob Grainger20-Dec-12 5:12
memberRob Grainger20-Dec-12 5:12 
GeneralRe: Val Grind (the wrong kind) Pin
Naerling20-Dec-12 10:40
memberNaerling20-Dec-12 10:40 
At my current job we've got a lot of legacy code like that. Just put + "" to the end of every object you can imagine. It will effectively convert the object which you already had to a string and from there you can convert it back to whatever you want (but Val() is indeed very popular!).
My company even had its own Val() function which returned 0 if an Exception was thrown Laugh | :laugh:
It's an OO world.
public class Naerling : Lazy<Person>{
    public void DoWork(){ throw new NotImplementedException(); }
}

GeneralRe: Val Grind (the wrong kind) Pin
Nagy Vilmos20-Dec-12 22:55
memberNagy Vilmos20-Dec-12 22:55 
GeneralRe: Val Grind (the wrong kind) Pin
Brady Kelly2-Jan-13 21:46
memberBrady Kelly2-Jan-13 21:46 
GeneralRe: Val Grind (the wrong kind) Pin
Nagy Vilmos2-Jan-13 22:52
memberNagy Vilmos2-Jan-13 22:52 
GeneralRe: Val Grind (the wrong kind) Pin
LesF4-Jan-13 9:51
memberLesF4-Jan-13 9:51 
GeneralRe: Val Grind (the wrong kind) Pin
Rob Grainger4-Jan-13 10:09
memberRob Grainger4-Jan-13 10:09 
GeneralRe: Val Grind (the wrong kind) Pin
Naerling4-Jan-13 11:56
memberNaerling4-Jan-13 11:56 
GeneralRe: Val Grind (the wrong kind) Pin
Member 46088986-Jan-13 11:45
memberMember 46088986-Jan-13 11:45 
GeneralRe: Val Grind (the wrong kind) Pin
Naerling6-Jan-13 12:26
memberNaerling6-Jan-13 12:26 
GeneralRe: Val Grind (the wrong kind) Pin
Chris Quinn24-Dec-12 0:19
memberChris Quinn24-Dec-12 0:19 
GeneralRe: Val Grind (the wrong kind) Pin
Rob Grainger29-Dec-12 3:19
memberRob Grainger29-Dec-12 3:19 
GeneralRe: Val Grind (the wrong kind) Pin
Chris Quinn31-Dec-12 0:17
memberChris Quinn31-Dec-12 0:17 
GeneralRe: Val Grind (the wrong kind) Pin
Rob Grainger31-Dec-12 2:57
memberRob Grainger31-Dec-12 2:57 
AnswerRe: Val Grind (the wrong kind) Pin
Mark Hurd3-Jan-13 14:32
memberMark Hurd3-Jan-13 14:32 
GeneralRe: Val Grind (the wrong kind) Pin
Rob Grainger4-Jan-13 9:55
memberRob Grainger4-Jan-13 9:55 
GeneralRe: Val Grind (the wrong kind) Pin
Mark Hurd4-Jan-13 14:56
memberMark Hurd4-Jan-13 14:56 
GeneralRe: Val Grind (the wrong kind) Pin
playstation328-Dec-12 21:22
memberplaystation328-Dec-12 21:22 
JokeRe: Val Grind (the wrong kind) Pin
RafagaX3-Jan-13 4:57
memberRafagaX3-Jan-13 4:57 
GeneralRe: Val Grind (the wrong kind) Pin
dshillito3-Jan-13 10:58
memberdshillito3-Jan-13 10:58 
GeneralRe: Val Grind (the wrong kind) Pin
Rob Grainger4-Jan-13 9:56
memberRob Grainger4-Jan-13 9:56 
GeneralRe: Val Grind (the wrong kind) Pin
cpkilekofp11-Jan-13 7:02
membercpkilekofp11-Jan-13 7:02 
GeneralRe: Val Grind (the wrong kind) Pin
Rob Grainger11-Jan-13 7:42
memberRob Grainger11-Jan-13 7:42 
GeneralI am the Legend of Grimrock Poster Pin
Rob Grainger17-Dec-12 11:35
memberRob Grainger17-Dec-12 11:35 
GeneralRe: I am the Legend of Grimrock Poster Pin
Zac Greve17-Dec-12 17:25
memberZac Greve17-Dec-12 17:25 
JokeRe: I am the Legend of Grimrock Poster Pin
Member 829282421-Jan-13 3:01
memberMember 829282421-Jan-13 3:01 
GeneralIt does what now? Pin
Member 869907216-Dec-12 8:23
memberMember 869907216-Dec-12 8:23 
GeneralRe: It does what now? Pin
Zac Greve16-Dec-12 9:47
memberZac Greve16-Dec-12 9:47 
GeneralRe: It does what now? Pin
Brady Kelly16-Dec-12 20:40
memberBrady Kelly16-Dec-12 20:40 
GeneralRe: It does what now? Pin
Pete O'Hanlon17-Dec-12 3:59
protectorPete O'Hanlon17-Dec-12 3:59 
GeneralRe: It does what now? Pin
kdmote17-Dec-12 5:51
memberkdmote17-Dec-12 5:51 
GeneralRe: It does what now? Pin
Marius Bancila21-Dec-12 1:08
memberMarius Bancila21-Dec-12 1:08 
GeneralRe: It does what now? Pin
jlopez78826-Dec-12 18:26
memberjlopez78826-Dec-12 18:26 
AnswerRe: It does what now? Pin
VUnreal8-Feb-13 10:32
memberVUnreal8-Feb-13 10:32 
GeneralWho needs a UL? Pin
AnalogNerd14-Dec-12 10:50
memberAnalogNerd14-Dec-12 10:50 
GeneralRe: Who needs a UL? Pin
Brady Kelly16-Dec-12 20:39
memberBrady Kelly16-Dec-12 20:39 
GeneralRe: Who needs a UL? Pin
englebart17-Dec-12 2:35
memberenglebart17-Dec-12 2:35 
GeneralRe: Who needs a UL? Pin
AnalogNerd17-Dec-12 2:54
memberAnalogNerd17-Dec-12 2:54 

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
Web03 | 2.8.150804.4 | Last Updated 4 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid