Jonathan Bennett

A Short Programmer Grammar Lesson

If you take my suggestion from yesterday and drastically increase the number of models in you system, there is one problem you’ll run into a lot more: naming things.

Here are a couple suggestions to help easy the pain:

  1. Classes should be nouns. They are the things in you system.
  2. Methods are verbs. These are the actions your nouns can take.
  3. The length of a name should match the area where it is accessible. Calling a loop index variable x is fine. Calling a global variable x is not.

There are a million other rules-of-thumb, but this should get your started.