« How Big Should Your Class Be?| Main | Octopus Delay »

Attack Of The Interface Octopus

| | Comments (0)

You're on a tight schedule. What do you do?

During my recent rant about partial classes being a bad idea, a commenter said something like "Yeah, but I have a bunch of interfaces to implement in this one class, so of course class is going to get huge. Partial classes let me separate the different interfaces into different files"

Another commenter pointed out that programming is always a compromise, and that articles that say things like "keep your class size small" are fine and mom and apple pie and all of that, but in the real world we know better. Sometimes you gotta take what you get, and monster classes happen. You're on a tight schedule, life gets in the way, nothing is perfect.

So what do you do? You're given a class that has a bunch of interfaces like those above, and already has 3000 lines of code in it. You're supposed to make a change to a couple of methods and be done by COB today. What can you do? Let's assume that each of these interfaces have 20 methods that are required to be implemented, meaning you have 140 required methods from your interfaces. And that's not counting whatever business logic you have.

Suggestions are appreciated. I will give my response in an article later today.

Leave a comment

About this Entry

This page contains a single entry by DanielBMarkham published on May 18, 2006 1:53 PM.

How Big Should Your Class Be? was the previous entry in this blog.

Octopus Delay is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Social Widgets





Share Bookmark this on Delicious

Information you might find handy
(other sites I have worked on)





Recently I created a list of books that hackers recommend to each other -- what are the books super hackers use to help guide them form their own startups and make millions? hn-books might be a site you'd like to check out.
On the low-end of the spectrum, I realized that a lot of people have problems logging into Facebook, of all things. So I created a micro-site to help folks learn how to log-in correctly, and to share various funny pictures and such that folks might like to share with their friends. It's called (appropriately enough) facebook login help