This is Rmetzler's Typepad Profile.
Join Typepad and start following Rmetzler's activity
Join Now!
Already a member? Sign In
Recent Activity
I use the Rule of Three to determine when to refactor my source code. Often enough I need to implement a little bit different behaviour for a special case. I just copy the code I wrote for the simple case and alter it a little bit until my code pass the new test for the special case. This is the simplest thing to do and although other programmers might think of this as a code smell you didn't overengineered it. A little bit later you have to add another special case. This time do not simply copy the code (as this would be a code smell for real), but refactor and generalize it. The three different cases will lead to a more general implementation. Also it is easier to reach this stage from dublicated code than from that overengineered solution you might have come to if you would refactor preemptively.
Toggle Commented Aug 22, 2013 on The Rule of Three at Coding Horror
Rmetzler is now following The Typepad Team
Aug 22, 2013