13.07.2015 Views

Smalltalk Best Practice Patterns Volume 1: Coding - Free

Smalltalk Best Practice Patterns Volume 1: Coding - Free

Smalltalk Best Practice Patterns Volume 1: Coding - Free

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ClassesThere is probably no coding decision with more effect on the quality of you code than names yougive your classes. If computers were the only audience for code we could just call them C1, C2, C3and have done. The expensive reader is not the computer, it is other people.Naming classes is your biggest billboard for communicating about your system. The first thingreaders will look at when they look at your code is the names of the classes. Those names will gobeyond your code. Insidiously, they leak into everyday conversation. And not just for developers.Ten years down the road you will hear users who know nothing about programming using the classnames you chose.Good class names provide insight into the purpose and design of a system. They reveal underlyingmetaphors. They communicate themes and variations. They break the system into parts, and showhow the parts get put back together.Great naming is an art, and will always remain so (just ask Madison Avenue). Good naming is inthe reach of everyone. Avoiding obvious mistakes and producing names that work together willboost your class names above average.<strong>Coding</strong> <strong>Patterns</strong> page 122 of 147 9/30/2006

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!