Archive for January, 2010

Best Programming Practices #2 – Parameters

Thursday, January 28th, 2010

This may seem like a no brainer, but it is often done wrong.

Set your parameters once and once only.  In other words, if you have ANY value that will be used more than once in your program, set a variable to that value and use the variable in the body of the program.

In other words:

variable1 = 40

width=variable1

rows=variable1

NOT

width=40

rows=40

Sure it’s one extra step now.  But if you ever change that value (and you probably will!), you’ll be able to change it in one place rather than hunting and searching for the fifty different places where you hard coded the value into your program.  It also means that you only have to worry about typos the first time through the program, not after each value change.

And of course, it goes without saying that you should keep all your parameters in one, easy-to-find place.  Your future self will thank you.

Go Green With Computer Recycling!

Wednesday, January 13th, 2010

Don’t throw your old electronics in the trash. Many electronics contain substances that can be harmful to the environment, and they should be recycled and disposed of properly. In the Columbus area, your company can use a service with free pickup and recycling services such as Possitivity (http://www.possitivitygreen.com/), or use the internet to find another environmentally responsible way to recycle your personal electronic waste.