4 ms·
not sure about "the best way", but besides the obvious cases ( factory, singleton ) i apply the Kerievsky's Refactoring To Patterns method. “Instead of thi
by slipwalker 8y ago
not sure about "the best way", but besides the obvious cases ( factory, singleton ) i apply the Kerievsky's Refactoring To Patterns method.
“Instead of thinking about a design that would work for every nuance of a system,
test-first programming enabled me to make a primitive piece of behavior work correctly
before evolving it to the next necessary level of sophistication.”
Kerievsky (2002)
https://www.amazon.com/Refactoring-Patterns-Joshua-Kerievsky/dp/0321213351/ https://www.amazon.com/Refactoring-Patterns-Joshua-Kerievsky...
If a piece of code survives long enough to deserve some refactoring, then i take a closer look at the patterns.