Classes to avoid (code complete)

Class names like InvoiceReader, PriceCalculator, MessageBuilder, ArticleReader, InvoiceReader are not actually verb names. They are really “noun agent-noun” class names. See agent nouns. A verb class name would be something like Validate, Operate, Manage etc. Obviously these are better used as methods and would be quite awkward as class names. The biggest problem with “noun … Read more

Why put private fields and methods at the top of class?

It stems from the days when you had to declare everything—that includes functions as well as variables—before you could use them. The internal (private) variables and functions went at the top of the file and the external (public) functions went at the bottom of the file. This meant that the public functions could reference the … Read more