Click here to Skip to main content
15,888,521 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: 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 
Your reply appears to imply that C# code should look obvious to people who don't know C#, or even C(++), Java, JavaScript, or quite a few others that have the ternary operator. Not to mention the fact that a semi-intelligent person who does not recognize this construct in C# at least should know, if maintaining the code, that the code *is* C# and be able to find out what it is.

I am not sure what kind of programmers you think C# code should be written for, but personally I think it would be a mistake to attempt making C# read like VB6 for the sake of accomodating maintenance by someone who in essence is a non-programmer.

I'd point out that the "overhead of a function (sic!) call" is academic - at best. The compiler may well decide to inline the code. And even if it did not, there are many cases where the microseconds (if that much) spent on pushing and popping the stack would simply make no difference whatsoever to the value of the program. To me, it is still a horror though - but because it demonstrates a lack of knowledge about the language on the part of the author more than anything else.
GeneralRe: Wasted space Pin
josda10008-Oct-09 9:39
josda10008-Oct-09 9:39 
JokeRe: Wasted space Pin
PIEBALDconsult8-Oct-09 17:05
mvePIEBALDconsult8-Oct-09 17:05 
GeneralRe: Wasted space Pin
V.8-Oct-09 21:37
professionalV.8-Oct-09 21:37 
GeneralRe: Wasted space Pin
dojohansen15-Oct-09 0:32
dojohansen15-Oct-09 0:32 
GeneralRe: Wasted space Pin
V.15-Oct-09 0:34
professionalV.15-Oct-09 0:34 
GeneralRe: Wasted space Pin
dojohansen15-Oct-09 1:03
dojohansen15-Oct-09 1:03 
GeneralRe: Wasted space Pin
V.15-Oct-09 1:27
professionalV.15-Oct-09 1:27 
GeneralRe: Wasted space Pin
Jim (SS)15-Oct-09 5:14
Jim (SS)15-Oct-09 5:14 
GeneralRe: Wasted space Pin
dmjm-h2-Nov-09 13:18
dmjm-h2-Nov-09 13:18 
GeneralRe: Wasted space Pin
Jim (SS)3-Nov-09 4:04
Jim (SS)3-Nov-09 4:04 
GeneralRe: Wasted space Pin
Member 218499724-Nov-09 18:54
Member 218499724-Nov-09 18:54 
GeneralRe: Wasted space PinPopular
David Skelly8-Oct-09 22:44
David Skelly8-Oct-09 22:44 
GeneralRe: Wasted space Pin
PIEBALDconsult9-Oct-09 4:38
mvePIEBALDconsult9-Oct-09 4:38 
GeneralRe: Wasted space Pin
Jim (SS)9-Oct-09 5:31
Jim (SS)9-Oct-09 5:31 
GeneralRe: Wasted space Pin
PIEBALDconsult9-Oct-09 8:19
mvePIEBALDconsult9-Oct-09 8:19 
GeneralRe: Wasted space Pin
Jim (SS)9-Oct-09 8:25
Jim (SS)9-Oct-09 8:25 
GeneralRe: Wasted space Pin
Robert Surtees9-Oct-09 14:49
Robert Surtees9-Oct-09 14:49 

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.