Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Thursday, April 23, 2009

On Naming

Good naming is the key to good design. Here is the best discussion of naming (in programming) that I have ever come across. It comes from a 1996 book called Smalltalk With Style. The authors have generously made their book freely available.

It takes a while to download, so here are the good bits (20 images). I'm a fan of Guideline 11: "Use predicate clauses or adjectives for Boolean objects or states". For example, motorRunning is a great name for a boolean field.





















6 Comments:

Post a Comment

<< Home