Click here to Skip to main content
15,886,724 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: Visual Studio autogenerated code Pin
sucram18-May-09 0:02
sucram18-May-09 0:02 
JokeRe: Visual Studio autogenerated code Pin
0x3c029-Apr-09 10:51
0x3c029-Apr-09 10:51 
GeneralRe: Visual Studio autogenerated code Pin
PIEBALDconsult30-Apr-09 14:18
mvePIEBALDconsult30-Apr-09 14:18 
GeneralRe: Visual Studio autogenerated code Pin
adgonz4-May-09 4:45
adgonz4-May-09 4:45 
GeneralRe: Visual Studio autogenerated code Pin
Megidolaon3-May-09 21:21
Megidolaon3-May-09 21:21 
GeneralRe: Visual Studio autogenerated code Pin
adgonz3-May-09 21:33
adgonz3-May-09 21:33 
GeneralRe: Visual Studio autogenerated code Pin
Megidolaon4-May-09 20:28
Megidolaon4-May-09 20:28 
GeneralRe: Visual Studio autogenerated code Pin
Paulo Zemek6-May-09 3:37
mvaPaulo Zemek6-May-09 3:37 
Even if multiple keys where able to be captured at the same time, using many == will not be a solution.
After all, if the keys where combined using the | operator, as happens with flags, the right way to check the values will be using: if ((parameter & condition) == condition) or if ((parameter & condition) != 0)

But that's not the case with keys. So, this is an ugly code (but not an horror in my opinion).
JokeRe: Visual Studio autogenerated code Pin
Vasudevan Deepak Kumar7-May-09 21:29
Vasudevan Deepak Kumar7-May-09 21:29 
GeneralA VS induced horror by me, kinda Pin
Megidolaon27-Apr-09 22:28
Megidolaon27-Apr-09 22:28 
GeneralRe: A VS induced horror by me, kinda Pin
Thomas Weller27-Apr-09 22:53
Thomas Weller27-Apr-09 22:53 
AnswerRe: A VS induced horror by me, kinda Pin
killabyte28-Apr-09 2:13
killabyte28-Apr-09 2:13 
GeneralRe: A VS induced horror by me, kinda Pin
Jeroen De Dauw28-Apr-09 5:54
Jeroen De Dauw28-Apr-09 5:54 
GeneralRe: A VS induced horror by me, kinda Pin
killabyte28-Apr-09 12:18
killabyte28-Apr-09 12:18 
GeneralRe: A VS induced horror by me, kinda Pin
Kenneth Ballard28-Apr-09 8:54
Kenneth Ballard28-Apr-09 8:54 
GeneralRe: A VS induced horror by me, kinda Pin
Megidolaon28-Apr-09 20:47
Megidolaon28-Apr-09 20:47 
GeneralSwitch Statement from Hell PinPopular
Brady Kelly27-Apr-09 7:18
Brady Kelly27-Apr-09 7:18 
GeneralRe: Switch Statement from Hell Pin
Luc Pattyn27-Apr-09 7:49
sitebuilderLuc Pattyn27-Apr-09 7:49 
GeneralRe: Switch Statement from Hell Pin
Jeroen De Dauw27-Apr-09 10:53
Jeroen De Dauw27-Apr-09 10:53 
GeneralRe: Switch Statement from Hell Pin
BillW3312-May-09 9:51
professionalBillW3312-May-09 9:51 
GeneralRe: Switch Statement from Hell Pin
ricmil4227-Apr-09 11:32
ricmil4227-Apr-09 11:32 
GeneralRe: Switch Statement from Hell Pin
Spunky Coder27-Apr-09 19:41
Spunky Coder27-Apr-09 19:41 
GeneralRe: Switch Statement from Hell Pin
Super Lloyd29-Apr-09 17:38
Super Lloyd29-Apr-09 17:38 
GeneralRe: Switch Statement from Hell Pin
Brady Kelly29-Apr-09 21:57
Brady Kelly29-Apr-09 21:57 
JokeRe: Switch Statement from Hell Pin
Super Lloyd29-Apr-09 22:47
Super Lloyd29-Apr-09 22:47 

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.