[Anon] Management and Refactoring

Well, we have our second victim for the Anonymous Blog. As noted before, this is not a single person's space, it is available to anyone who requests it. Therefore, I and no one else around here can claim accuracy or accept blame for anything said here. Please add your thoughts or if you'd like to post yourself, please let me know. - Editor, KC

I am part of a team working on a fairly big, complex piece of software. Over the last six years many, many different programmers have worked on it. The code shows it, too. There are various serious issues with the program: The performance could be much, much better and a lot of code could be simplified greatly. My colleagues and I have identified several areas that would lend themselves to meaningful refactoring work, some of them involving quite significant internal changes. Here's the problem though: All our development (be it new features or fixing of existing bugs) are very much schedule driven. This is a huge problem for us.

Martin Fowler advises in his book Refactoring to simply not tell management. The idea being that we simply assume refactoring as part of the job which will effectively yield a better system, overall faster development, etc. Refactoring should be included in any time estimates. But, what are we to do though, if management is stuck in a mindset of short-term thinking? Developers are directly given the message that maintainable code is not a priority, the only thing that counts is fast results. Of course, that sort of thinking was over the years directly responsible to many of the problems of the code base today.

How do you sell management on refactoring (and allowing time for it), if only the very next fix/feature counts to them? Developers are being told that future maintenance should not be a concern and they should basically just worry about cranking out code quickly.

I'd appreciate any input the community might have!

I feel your pain

But unfortunately, I have no answers.

Don't allow broken windows

I believe refactoring should be part of the development process and not a separate phase. Basically, as new features are added, questionable code can be refactored, as it is discovered. I am assuming, you have a strong, automated testing framework in place.