This person needs to make small git commits as they refactor, and use git bisect to find which one broke the test, then fix it and squash that fix into that commit with interactive rebase ...<p>Time is not like money in that <i>no</i> time that elapses is ever yours to get back. Whereas sometimes money that leaves your hands is actually still yours.<p>Giving up on a refactoring because of some failed tests could be wasteful.<p>How much time you put into the refactoring already should enter into your decision making because if you throw it away, you may have to put in a comparable amount of time to redo the job.<p>If you've sprayed 15 coats of lacquer on a piano and a fly lands into your 16th one, do you strip it and start again, or just sand out the blemish and keep going? What if it's half a coat on a ukulele?
There is a distinct difference between using the past for evaluating your next move, and being attached to past experiences. The latter will get in the way of critical thinking and can lead to bad decisions.<p>But humanity is in a stage of evolution such that we are very attached to past experiences, I can see them influencing everything I do, even on things such as whether or not I'll continue a code refactoring.<p>I think the author's Poker example is good. If you are attached to your loss from your last game, you won't be able to play the next game in a good mental shape for winning. With technical problems I think this means: don't get attached to your frustration when things are going wrong. Maybe the right thing is to stop the refactoring altogether because you have other priorities, it doesn't matter, as long as you are able to let it go.
Nice article, fun to read, I nearly gave up at 3/4 but the sunk cost fallacy took me to the end and I’m glad it did as I enjoyed the reference back to poker. The gem in this article for me was the part about it being more valuable to wind back to the last green the more you have pressed on. I’ll take that thought with me!
When Kent recently gave a talk at Plato's Elevate Conference, he was asked: "What is the thing you enjoy where you completely lose track of time?" He said "Poker." without a second of hesitation. He clearly loves the game to come up in his writing.
Yes, I have to always remember the sink cost fallacy… but remember it can also motivate you to continue on when times are tough so that you do not give up