Re:The Mother of All Interview Questions
by delackner on Wednesday August 03, 2011 @01:00AM
(#2839884)
I'm surprised no one has suggested refactoring yet. Joel Spolsky wrote most eloquently on resisting the urge to rewrite quite some years ago. Often the best response to a convoluted brittle looking system is to just attack it with a series of small refactorings that clearly preserve the current behavior, while eliminating unnecessary confusion and complexity until you can finally see clearly the bigger picture.
[ Parent
| on HN ]
'Working Effectively With Legacy Code' by Mike Feathers is an excellent read for tackling systems like this. Basically a series of down-in-the-trenches strategies for getting legacy code under unit tests - even if you're not sure what it's supposed to do - so you can start refactoring with a safety net.