Wednesday, February 21, 2007
« Learn about REST via Rails | Main | OS X Install Guide for Ruby, Rails, MySQ... »
In addition to being reminded that readability is more important than "clean well factored code" in unit tests, I've also recently been reminded how wonderful small, focused classes can be.  As designs evolve, classes tend to grow.  If you don't keep a close eye, they can grow out of control and take on way too many responsibilities.  As classes grow, they become harder and harder to manage.  All the sudden, it becomes harder to find things, and harder to figure out what the code is intended to accomplish.  By breaking classes apart into small, focused classes it's much easier to understand the things that each class is responsible for.  Rather than taking on a handful of different responsibilities, your classes should have a single responsibility. This will help keep them focused on doing one thing, and doing it well. 

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):