Click here to Skip to main content
15,746,759 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: trying to figure out if number is negative Pin
Jarek Kruza26-Oct-09 2:31
Jarek Kruza26-Oct-09 2:31 
GeneralRe: trying to figure out if number is negative Pin
Omar Gameel Salem26-Oct-09 3:06
professionalOmar Gameel Salem26-Oct-09 3:06 
JokeRe: trying to figure out if number is negative Pin
AspDotNetDev30-Oct-09 17:08
protectorAspDotNetDev30-Oct-09 17:08 
GeneralRe: trying to figure out if number is negative Pin
Jeroen De Dauw26-Oct-09 3:13
Jeroen De Dauw26-Oct-09 3:13 
GeneralRe: trying to figure out if number is negative Pin
PIEBALDconsult26-Oct-09 4:40
professionalPIEBALDconsult26-Oct-09 4:40 
GeneralRe: trying to figure out if number is negative Pin
Keith Barrow27-Oct-09 7:55
professionalKeith Barrow27-Oct-09 7:55 
GeneralRe: trying to figure out if number is negative Pin
David Skelly28-Oct-09 23:56
David Skelly28-Oct-09 23:56 
GeneralWhen ASP.NET programmers don't know JavaScript Pin
Gordon Kushner12-Oct-09 5:14
Gordon Kushner12-Oct-09 5:14 
You find this in the overlong validation routines...

function isNumeric(strString) {
    var strValidChars = "0123456789";
    var strChar;
    var blnResult = true;

    for (i = 0; i < strString.length && blnResult == true; i++) {
        strChar = strString.charAt(i);
        if (strValidChars.indexOf(strChar) == -1) {
            blnResult = false;
        }
    }
    return blnResult;
}


Developer, meet isNaN(), isNaN() meet developer.
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
Paulo Zemek12-Oct-09 5:54
mvaPaulo Zemek12-Oct-09 5:54 
JokeRe: When ASP.NET programmers don't know JavaScript Pin
Jeroen De Dauw12-Oct-09 7:30
Jeroen De Dauw12-Oct-09 7:30 
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
Electron Shepherd13-Oct-09 0:20
Electron Shepherd13-Oct-09 0:20 
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
Luc Pattyn13-Oct-09 3:40
sitebuilderLuc Pattyn13-Oct-09 3:40 
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
robocodeboy15-Oct-09 0:19
robocodeboy15-Oct-09 0:19 
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
PIEBALDconsult13-Oct-09 11:38
professionalPIEBALDconsult13-Oct-09 11:38 
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
Gordon Kushner13-Oct-09 12:39
Gordon Kushner13-Oct-09 12:39 
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
dojohansen15-Oct-09 0:12
dojohansen15-Oct-09 0:12 
GeneralRe: When ASP.NET programmers don't know JavaScript Pin
Lutosław15-Oct-09 22:38
Lutosław15-Oct-09 22:38 
GeneralCode In Need Of Cleanup [modified] Pin
Kevin Marois8-Oct-09 12:29
professionalKevin Marois8-Oct-09 12:29 
GeneralRe: Code In Need Of Cleanup Pin
GibbleCH9-Oct-09 4:50
GibbleCH9-Oct-09 4:50 
GeneralRe: Code In Need Of Cleanup Pin
AspDotNetDev26-Oct-09 1:16
protectorAspDotNetDev26-Oct-09 1:16 
GeneralWasted space Pin
Jim (SS)8-Oct-09 6:22
Jim (SS)8-Oct-09 6:22 
GeneralRe: Wasted space Pin
Jaime Olivares8-Oct-09 9:05
Jaime Olivares8-Oct-09 9:05 
GeneralRe: Wasted space Pin
Jim (SS)8-Oct-09 9:12
Jim (SS)8-Oct-09 9:12 
GeneralRe: Wasted space Pin
dojohansen15-Oct-09 0:23
dojohansen15-Oct-09 0:23 
GeneralRe: Wasted space Pin
josda10008-Oct-09 9:39
josda10008-Oct-09 9:39 

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.