CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

Size Matters

Unnecessarily long methods and overgrown classes are a huge pet peeve of mine on software projects.  Apparently Bob Koss thinks so too in Size Matters.

One of the points he makes is that more classes and more methods often equate to simpler code.  Amen. On a project several years ago I worked with a client developer who was not exactly enthusiastic about working with a team of consultants.  His big complaint about our design was that he could do the whole thing in 2-3 TCL files.  I still shudder to think what that would have actually looked like.

By the way, the ObjectMentor blogs moved to http://blog.objectmentor.com.
 



Comments

Jeffrey Palermo said:

Amen,

I had a developer brag to me once that he had been able to keep a certain system _down_ to 73 classes!  Never mind that many were thousands of lines of pure static methods with names like Util, Shared, etc.

# January 16, 2007 7:32 AM

Raymond Lewallen said:

What a nightmare.  I've never understood the less classes scenario that so many people still believe is the best way to write software.  In my experiences, these have many times been seasoned vets of the coding world (20+ years) and have extensive experience in procedural languages, so I certainly understand where habit comes from in many cases.  Still, that's more of an excuse than a reason for writing code that measures 9 on the richter scale of hard to maintain, even harder to scale.  Don't anybody flame me here, as I know plenty of seasoned vets who know more about oop than I do and are certainly tools for guidance when writing software.  I'm merely speaking of my personal experiences.

# January 16, 2007 9:21 AM

Steve Harman said:

>>I had a developer brag to me once that he had been able to keep a certain system _down_ to 73 classes

*shudder*

# January 16, 2007 1:05 PM

Jeremy D. Miller said:

Ayende, I'm betting there's a good story in there somewhere right?

# January 18, 2007 2:39 PM

Ayende Rahien said:

Well,

I neglected to mention that the system is also:

- Able to read any CSV file

- Validate numerators

- Store it in a DB

- Send chunked files to specified WS (per file)

- Handle big files and unreliable networks.

- Excellent error handling

- Easily extensible

Etc...

# January 20, 2007 2:41 AM

Ayende Rahien said:

And also transactional :-)

# January 20, 2007 2:44 AM

wow gold said:

Cool, the post.

Thanks for the information.

# March 6, 2008 11:43 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP