RSS

Tag Archives: compiler warnings

#27 Don’t Declare Variables at the Top

Somewhere long ago you attended a course that said that all variables should be declared at the top of the method.  Modern languages allow you to declare the variable at the point in the code that it is initialized and this is a significant advantage.  However, the outdated idea of declaring all variables at the top of the method persists.  This post explains why this is a bad idea. Read the rest of this entry »

 
Leave a comment

Posted by on April 14, 2012 in Coding, Example Code

 

Tags: , , ,

#26 Never Suppress Warnings

There are often ways to specify within the code that you want to suppress some or all of the warnings that the compiler might produce. Read the rest of this entry »

 
Leave a comment

Posted by on March 23, 2012 in Coding

 

Tags: , ,