What is the most effective way to add functionality to unfamiliar, structurally unsound code?

Posted by Coder on Programmers See other posts from Programmers or by Coder
Published on 2012-02-16T01:30:40Z Indexed on 2012/03/21 5:39 UTC
Read the original article Hit count: 318

This is probably something everyone has to face during the development sooner or later.

You have an existing code written by someone else, and you have to extend it to work under new requirements.

Sometimes it's simple, but sometimes the modules have medium to high coupling and medium to low cohesion, so the moment you start touching anything, everything breaks. And you don't feel that it's fixed correctly when you get the new and old scenarios working again.

One approach would be to write tests, but in reality, in all cases I've seen, that was pretty much impossible (reliance on GUI, missing specifications, threading, complex dependencies and hierarchies, deadlines, etc).

So everything sort of falls back to good ol' cowboy coding approach. But I refuse to believe there is no other systematic way that would make everything easier.

Does anyone know a better approach, or the name of the methodology that should be used in such cases?

© Programmers or respective owner

Related posts about software-development

Related posts about architecture