Stefans Blog
![]() |
Stefan Koopmanschap Professional Services Consultant |
|
| Stefan is one of our Professional Services Consultants; he performs audits, development team assessments, training, and technically challenging development projects. Stefan is an advocate of the Symfony framework and runs the Dutch Symfony Portal. |
Friday, May 2. 2008Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
I firmly agree with the principle of refactoring, especially test-driven development, which is, in essence, writing code that you expect to refactor later when tests change.
Take DHTML widgets, for example (my current preocupation) - in order for them to work, you need to create a proof of concept to run in all the browsers you intend to support, not just your [insert favourite browser here]. Only after that, you create a prototype with a semi-finished API, and then you refactor to create a standalone, self-contained widget that can be reused pretty much anywhere.
Or even more common reasons:
You didn't write it -- someone else did You've learned something since the first implementation (hopefully we're all continually learning!) -- and you can make some drastic improvements to maintainability and/or quality. There's also the YAGNI principle -- "you aren't going to need it". Most applications are going to change over time (requirements change, new features and interfaces are added, etc.), but it's a bad idea to try to build in everything from the start... because most of what you imagine now will be needed will not. Instead, you cleanly implement the current requirements, and if you do it well, it'll be easy to refactor later to bring in whatever changes are required. |
Blog


