Xp Refactoring Pitfalls

XpPitfalls

Problem: Refactoring is hard. Really hard.

Problem: Refactoring depends on high-level OOAD / Design Patterns skill and experience. Problem: Large refactorings. Refactorings that feel like they should be easy yet take a long time; you could end up getting only halfway done, which means your code is worse that it was at the start (since now it expresses the same thing in two different ways). Problem: Customers hate refactoring, since it doesn't add value. They will press you to add more features. (Note that this pressure can actually be good! It can help keep you from thrashing (see below).) WillemBogaerts's response: Problem: Thrashing: endlessly refactoring the same code to be marginally better (or just different) without contributing to velocity or to business value. Problem: Existing large unclean (legacy) code bases are really hard to refactor. Problem: Refactoring and Collective Code Ownership can cause disorientation. People may sit down and see code that looks completely foreign. This may require people to re-learn the whole system, or (worse) to make them feel like they have to relearn it when all they want to do is write some code. They get a sense of nausea and vertigo when sitting down to look at code, and there's no high-level view, and this hurts morale and productivity. Problem: OAOO can lead to Demeter gone mad. You could end up bloating your interfaces. Problem: OAOO can lead to a nest of small objects. Writing new code or debugging you end up getting lost in a maze of pointers.


CategoryRefactoring


EditText of this page (last edited June 28, 2005) or FindPage with title or text search