Click here to Skip to main content
15,905,232 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: I'm speechless about this piece of code. [modified] Pin
Xiangyang Liu 刘向阳12-Nov-07 8:28
Xiangyang Liu 刘向阳12-Nov-07 8:28 
GeneralRe: I'm speechless about this piece of code. Pin
leppie12-Nov-07 20:11
leppie12-Nov-07 20:11 
GeneralRe: I'm speechless about this piece of code. Pin
darkelv12-Nov-07 13:05
darkelv12-Nov-07 13:05 
JokeRe: I'm speechless about this piece of code. Pin
Rajesh R Subramanian12-Nov-07 20:42
professionalRajesh R Subramanian12-Nov-07 20:42 
GeneralRe: I'm speechless about this piece of code. Pin
KarstenK12-Nov-07 21:23
mveKarstenK12-Nov-07 21:23 
GeneralRe: I'm speechless about this piece of code. Pin
Pete O'Hanlon12-Nov-07 21:49
mvePete O'Hanlon12-Nov-07 21:49 
JokeRe: I'm speechless about this piece of code. Pin
codemunkeh14-Nov-07 9:52
codemunkeh14-Nov-07 9:52 
GeneralSnobbish replies Pin
Michael Pauli15-Nov-07 2:48
Michael Pauli15-Nov-07 2:48 
Why can't not ONE of you folkes be grown up enough to simply say that the rubbish:

://it checks if it contains 11 char (dd/MMM/yyyy)
if (Convert.ToInt16(chkdate.Length.ToString()) != 11)
{
// Do something if not.
}

SHOULD be:

:// it checks if it contains 11 char (dd/MMM/yyyy)
if (chkdate.Length != 11)
{
// Do something if not.
}

How hard can it be?

It's OK to pinpoint bad code like that but it's not OK not to come up with a useable alternative.



Michael M., mm it-consult dk.

GeneralRe: Snobbish replies Pin
Tony Wesley15-Nov-07 7:11
Tony Wesley15-Nov-07 7:11 
GeneralRe: I'm speechless about this piece of code. Pin
Tony Wesley15-Nov-07 5:40
Tony Wesley15-Nov-07 5:40 
GeneralRe: I'm speechless about this piece of code. Pin
Michael Pauli15-Nov-07 23:05
Michael Pauli15-Nov-07 23:05 
GeneralRe: I'm speechless about this piece of code. Pin
Tony Wesley16-Nov-07 6:20
Tony Wesley16-Nov-07 6:20 
Generalhelp pls Pin
FREAK880210-Nov-07 20:50
FREAK880210-Nov-07 20:50 
GeneralRe: help pls Pin
leppie11-Nov-07 1:17
leppie11-Nov-07 1:17 
GeneralRe: help pls Pin
Phil J Pearson11-Nov-07 3:02
Phil J Pearson11-Nov-07 3:02 
GeneralRe: help pls Pin
Luc Pattyn11-Nov-07 4:09
sitebuilderLuc Pattyn11-Nov-07 4:09 
GeneralRe: help pls Pin
Pete O'Hanlon11-Nov-07 10:12
mvePete O'Hanlon11-Nov-07 10:12 
JokeRe: help pls Pin
Anthony Mushrow11-Nov-07 10:38
professionalAnthony Mushrow11-Nov-07 10:38 
GeneralRe: help pls Pin
Luc Pattyn11-Nov-07 10:42
sitebuilderLuc Pattyn11-Nov-07 10:42 
GeneralRe: help pls Pin
Pete O'Hanlon11-Nov-07 23:23
mvePete O'Hanlon11-Nov-07 23:23 
GeneralRe: help pls Pin
BadKarma13-Nov-07 1:56
BadKarma13-Nov-07 1:56 
GeneralRe: help pls Pin
Ri Qen-Sin13-Nov-07 1:16
Ri Qen-Sin13-Nov-07 1:16 
JokeRe: help pls Pin
Vasudevan Deepak Kumar14-Nov-07 1:30
Vasudevan Deepak Kumar14-Nov-07 1:30 
GeneralRe: help pls Pin
Justin Perez14-Nov-07 4:27
Justin Perez14-Nov-07 4:27 
AnswerRe: here's how to use quantum crypto in VB Pin
NimitySSJ29-Nov-07 20:34
NimitySSJ29-Nov-07 20:34 

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.