Re:Design patterns have (mostly) flopped
by vlado on Tuesday September 28, 2010 @08:19AM
(#1735416)
Agree. Actually design patterns are really good to apply at refactoring time. You often cannot foresee what problems you will be facing and how your code will evolve in order to start trying to stuff in all the patterns you are familiar with. Write code -> see a problem -> identify a possible pattern -> refactor accordingly. This is also learning design patterns by doing.
[ Parent
| on HN ]
I've found that Anti-Patterns (http://en.wikipedia.org/wiki/Anti-pattern) are the best approach for refactoring. They explicitly start with recognizing a bad pattern (frequently one which once made sense but no longer does) and then explicitly prescribe methods to refactor them into something better.