Clarity over brevity in variable and method names

David on Signals vs. Noise:

At times being exceedingly clear will seem almost silly at first glance. The name of the method or variable can be longer than the operation being performed! But the silliness quickly dissipates the first time you return to a piece of code and know exactly what it does.

Same goes for CSS class names. At times I think it’s totally stupid how long a class name can get but it almost always pays off in understanding my code even months later.

Veröffentlicht am Dienstag, 11. September 2012