Thursday, September 20, 2012

Things to avoid

Magic numbers, especially if they appear in more than one place. They really want to be named constants, but they also have to be named in a way that is not dependent on the actual value. For example, worldPopulation = 6,973,738,433.