Click here to Skip to main content
15,913,283 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: Code Optimize Pin
jschell17-Jan-12 11:50
jschell17-Jan-12 11:50 
GeneralRe: Code Optimize Pin
johannesnestler18-Jan-12 5:22
johannesnestler18-Jan-12 5:22 
GeneralRe: Code Optimize Pin
BobJanova17-Jan-12 1:25
BobJanova17-Jan-12 1:25 
GeneralRe: Code Optimize Pin
Rajesh Anuhya17-Jan-12 1:52
professionalRajesh Anuhya17-Jan-12 1:52 
GeneralRe: Code Optimize Pin
KP Lee17-Jan-12 21:11
KP Lee17-Jan-12 21:11 
GeneralRe: Code Optimize Pin
RobCroll18-Jan-12 15:57
RobCroll18-Jan-12 15:57 
GeneralRe: Code Optimize Pin
wg_self27-Jan-12 4:44
wg_self27-Jan-12 4:44 
GeneralCongratulations, you have overtaxed the .NET garbage collector! Pin
ekolis14-Jan-12 9:15
ekolis14-Jan-12 9:15 
GeneralWhy is dates so difficult? Pin
Jan Steyn12-Jan-12 23:26
Jan Steyn12-Jan-12 23:26 
GeneralRe: Why is dates so difficult? Pin
AspDotNetDev13-Jan-12 7:23
protectorAspDotNetDev13-Jan-12 7:23 
GeneralRe: Why is dates so difficult? Pin
John Hunley16-Jan-12 6:51
John Hunley16-Jan-12 6:51 
GeneralRe: Why is dates so difficult? Pin
Florin Jurcovici16-Jan-12 22:13
Florin Jurcovici16-Jan-12 22:13 
GeneralWhat one Should do if Program warns you about one's uninitialized variable? Pin
Mohibur Rashid11-Jan-12 21:29
professionalMohibur Rashid11-Jan-12 21:29 
GeneralRe: What one Should do if Program warns you about one's uninitialized variable? Pin
Nagy Vilmos12-Jan-12 1:00
professionalNagy Vilmos12-Jan-12 1:00 
QuestionRe: What one Should do if Program warns you about one's uninitialized variable? Pin
Julien Villers12-Jan-12 4:32
professionalJulien Villers12-Jan-12 4:32 
AnswerRe: What one Should do if Program warns you about one's uninitialized variable? Pin
Nagy Vilmos12-Jan-12 4:47
professionalNagy Vilmos12-Jan-12 4:47 
GeneralRe: What one Should do if Program warns you about one's uninitialized variable? Pin
Julien Villers12-Jan-12 4:54
professionalJulien Villers12-Jan-12 4:54 
GeneralThe result was that people learnt to check for warnings before they checked in their code. Pin
jsc4216-Jan-12 23:01
professionaljsc4216-Jan-12 23:01 
GeneralRe: The result was that people learnt to check for warnings before they checked in their code. Pin
Nagy Vilmos16-Jan-12 23:54
professionalNagy Vilmos16-Jan-12 23:54 
GeneralRe: The result was that people learnt to check for warnings before they checked in their code. Pin
User 274316217-Jan-12 0:55
User 274316217-Jan-12 0:55 
GeneralRe: The result was that people learnt to check for warnings before they checked in their code. Pin
BobJanova17-Jan-12 0:51
BobJanova17-Jan-12 0:51 
GeneralRe: The result was that people learnt to check for warnings before they checked in their code. Pin
YvesDaoust30-Jan-12 0:47
YvesDaoust30-Jan-12 0:47 
GeneralRe: What one Should do if Program warns you about one's uninitialized variable? Pin
OriginalGriff12-Jan-12 21:31
mveOriginalGriff12-Jan-12 21:31 
In VS there is a very handy little option: Project Properties, Build tab, "Treat warnings as errors" - switch it to "All".
If you don't fix what it complains about, you can't run it.

Modern compilers complain for good reason - it's not like the old days - and if they say "this is not initialized" then it isn't - and if it doesn't give you a problem now, it will later on when you have forgotten that you are ignoring the warning. That's when it gets expensive to fix a problem...because the code that causes it is is a different module, in a different DLL!

Ignoring warnings is lazy stupidity, and you can tell him that from me!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

GeneralRe: What one Should do if Program warns you about one's uninitialized variable? Pin
Mohibur Rashid13-Jan-12 5:12
professionalMohibur Rashid13-Jan-12 5:12 
GeneralCode Repeating PinPopular
Mohibur Rashid11-Jan-12 19:17
professionalMohibur Rashid11-Jan-12 19:17 

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.