Deep Simplicity Part 6

Code Naked

  • Homepage
  • About
  • Contact

Jan 6: Deep Simplicity Part 6

The next rule in Deep Simplicity is Keep All Entities Small. This is one of the rules that I think should be more of a guideline. Jeff Bay thinks that a class should be no more than fifty lines. I think adding the corollary that it's fifty lines without comments makes this rule a little more palatable.

That being said, Jeff does have some good reasons for limiting the class size. The first reason is that classes that are more than fifty lines long tend to do more than one thing - which is bad because it makes them harder to understand and harder to reuse. Another good point is that a class that is small is going to fit onto your screen without scrolling, being able to see as much of it as possible means that it is easier to grasp all of the responsibilities of the class.

That's it for this one, next time we'll talk about rule #7: Don't Use Any Classes with More Than Two Instance Variables
Posted by Matthew Purdon in Software Development Comments: (0) Trackbacks: (0)

Trackbacks
Trackback specific URI for this entry

No Trackbacks

Comments
Display comments as (Linear | Threaded)

No comments


Add Comment

Standard emoticons like :-) and ;-) are converted to images.
 
 

Subscribe

Archives

  • March 2010 (0)
  • February 2010 (1)
  • January 2010 (4)
  • December 2009 (6)
  • Recent...
  • Older...

Categories

  • XML Technology
  • XML Databases
  • XML MySQL
  • XML Software Development
  • XML Being a Contractor
  • XML Client Side
  • XML PHP
  • XML State of the Art


All categories

Blog Administration

Open login screen

Recommended Reading

Amazon.com: Domain-Driven Design: Tackling Complexity in the Heart of Software (0076092019565): Eric Evans: Books
Amazon.com: Refactoring: Improving the Design of Existing Code (9780201485677): Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts: Books
Amazon.com: Patterns of Enterprise Application Architecture (0076092019909): Martin Fowler: Books
Amazon.com: The Nomadic Developer: Surviving and Thriving in the World of Technology Consulting (9780321606396): Aaron Erickson: Books

Feedburner

Numeric Feedburner ID Required!




 

Layout by Andreas Viklund | Serendipity template by Carl