by ezekg · 2y ago · 0 comments
I also do this. I learned that if I leave a failing test for myself in the morning, I'll think about it on and off and jump right in next session without wasting time on HN or YT for an hour or 2 in the mornings. Sometimes this ends up causing me to work a little bit late, trying to make sure I actually have a failing test written for the problem (sometimes I have an issue without an accompanying test yet), but it's worth the extra effort/time. A failing test gives me something 100% actionable to jump into in the morning, as opposed to leaving e.g. a feature half written which can have an ambiguous starting point in terms of jumping back into it. I can't recommend this enough.
I really agree, and I also thinks it can be helpful to do something similar when taking breaks (have lunch/take a walk while leaving a failing test).
"Understand it in my head" is often a good stopping point too. Because if i actually go and fix it, i may find out i was wrong and spend even more time re-analyzing the issue to reach a new understanding.
Not good sleep but I would seem to be more ‘tuned’ in on the subject.
It kind of flows into the author's other point, "if I’ve got it, use it."