This naming convention is one of the patterns in Kent Beck's book Smalltalk Best Practice Patterns. IMHO this book is a must-have even for non-smalltalkers, as it really helps naming things and writing self-documenting code. Plus it's probably one of the few pattern langages to exhibit Alexander's quality without a name.
Another good book on code patterns is Smalltalk with Style, which is available as a free PDF.
Generally, the convention is that instance variables and accessors use the bare noun, and parameters use the indefinite article plus either a role or a type, or a combination. Temporary variables can use bare nouns because they rarely duplicate the instance variable; alternatively, it's quite frequent to name them with more precision than just an indefinite article, in order to indicate their role in the control flow: eachFoo, nextFoo, randomChild...
I already got some hand printed year calendars from crispinfinn.com (http://farm3.static.flickr.com/2595/3931755944_2259ef928a_b.jpg). I'm also getting A Pattern Language for an architect interested dad (http://www.amazon.co.uk/Pattern-Language-Buildings-Construction-Environmental/dp/0195019199).
If you haven't, I highly recommend A Pattern Language. It's full of fascinating insights into the ways functional design interacts with our lives (and perhaps moreso, how dysfunctional design impedes it).
This naming convention is one of the patterns in Kent Beck's book Smalltalk Best Practice Patterns. IMHO this book is a must-have even for non-smalltalkers, as it really helps naming things and writing self-documenting code. Plus it's probably one of the few pattern langages to exhibit Alexander's quality without a name.
Another good book on code patterns is Smalltalk with Style, which is available as a free PDF.
Generally, the convention is that instance variables and accessors use the bare noun, and parameters use the indefinite article plus either a role or a type, or a combination. Temporary variables can use bare nouns because they rarely duplicate the instance variable; alternatively, it's quite frequent to name them with more precision than just an indefinite article, in order to indicate their role in the control flow:
eachFoo
,nextFoo
,randomChild
...I already got some hand printed year calendars from crispinfinn.com (http://farm3.static.flickr.com/2595/3931755944_2259ef928a_b.jpg). I'm also getting A Pattern Language for an architect interested dad (http://www.amazon.co.uk/Pattern-Language-Buildings-Construction-Environmental/dp/0195019199).
http://www.amazon.com/Pattern-Language-Buildings-Constructio...