« How Big Should Your Class Be?| Main | Octopus Delay »
Attack Of The Interface Octopus

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