Explain, then fix
I’ve been thinking about Tidy First during this new era of AI.
Now more than ever, it’s possible to instantly jump from problem to solution. “fix this, commit & push”.
Sometimes though, it’s a much better strategy to work everywhere but the problem. Sneaking around it, tidying up to the left & right of it.
Have a bit of selective amnesia: your task is no longer about solving the problem, but about documenting exactly how it works today. Point out all the flaws, assumptions, warts.
Get that commited & pushed. Now come back the next day, or the next week, and make that change.
That’s when the magic happens. Let’s say the fix was a single line. Instead of seeing a single line diff with zero context, you see:
- The single line diff, and…
- Deletion of the line documenting what is wrong
- Deletion of the test proving that the software behaves incorrectly
You gained understanding, while documenting that process in history for anyone to see down the line.
Sometimes it’s about the journey, not the destination!