As my collegues know, I find well-written code quite important – sloppy, unstructured and hard-to-read code is prone to have more bugs and is more difficult to maintain at the same time. Naming classes, methods, variables, etc. is an important task if you want to get readable code. Since I just found a few “bad” names in my own code (the same class had a
getAllStatistics and a
getGlobalStatistics method, and I had to interpret the code to see the actual difference between both) I’m happy to note a few good texts on the subject:
- Ottinger’s Rules for Variable and Class Naming is extensive and has good examples;
- K. Scott Allen compiled a few more links in The Greatest Challenge in Software Development
I’ll think of better names for my methods tomorrow!