Software Tips

These tips apply to software development in any language. Many of them are obvious but I hope that some might be useful:

  1. The most reliable code is the code that isn't there. Keep your systems small and simple.
  2. Program code describes what you are doing. Add comments to explain why you are doing it.
  3. If you're writing a case statement it's very easy to forget the EndCase or to write EndIf instead. Write the skeleton of a code structure before filling it in.
  4. Code should be as small and fast as necessary. No smaller. No faster. Don't waste time on an ego trip making it better than it needs to be.
  5. Write an error handler first and make it log errors to a disk file. Use error numbers so that your users can report a number rather than having to read you the text of an error message.
  6. Always write for multiple users and for many languages. The extra features will not always be needed but you'll save time in the long run.
  7. Take a random walk through Help or the manual once in a while. You will find lots of things that you had forgotten.
  8. If you are going to make simplifying assumptions and take short cuts - document them.
  9. Design the structure before you write the code.
  10. The first thing that you add to a program is a means of stopping it. The Cancel button is the first control you add to a form.