Monday, May 16, 2011

Use multiple files


For any non trival program your program should be broken up into functional groups. Each group should be in it's own file.

This allows you to develop each part independently, test it, debug it, etc. This is helpful because when you go to write the main part of the program you already know that all your tools work.
It also keeps each part in an easy to find location. It also allows you to work with a smaller chunk of code.

One other advantage is that this makes it easier to reuse components from your old code.