#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. Continue reading

Advertisement

#27 A Proper Module does NOT need a Config File

It is common for a system or a program to have a config file: that is a file that holds a bunch of settings that can be adjusted by the administrator or user to get desired effect.  A code module, that is designed to be embedded into a running program and is designed to be reused in multiple programs, should NEVER require a configuration file. Continue reading