Powered by Twitter Tools.
Just the thought of ‘refactoring’ can be daunting to a programmer.
Martin Fowler defines ‘refactoring’ as:
Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a ‘refactoring’) does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it’s less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring.
When I first started to look at our library of Legacy Code my first thought was to just scrap the library and start over. Now try to sell that idea to the stake holders. Not going to happen is it. So that’s where refactoring come’s in. But there are a few obstacles we have to over come in this process.
“Throw away my code!!!” you might be saying to yourself right now. Yes, Throw it away. What this does for you is reminds you that you are just practicing and 2nd it separates you from your code.
So there you have a few tips on how to overcome a few obstacles when you start to look at refactoring your legacy code for the first time.
David Yancey
Excellent article! Keep up the good work David.
[...] Refactoring: Getting Started Is the Hardest Part (David Yancey) [...]
Name (required)
Mail (will not be published) (required)
Website