News for hackers. Stuff that matters.
Re:Why is it so hard to see code from 5 minutes ago? by theli0nheart on Thursday February 18, 2021 @11:23PM (#26189694)
If there’s a specific implementation that’s especially hairy, I’ll just copy that block and comment it out before continuing. Instant reference. And if I’m rewriting more than 10 or so lines at a time of complex business logic, something is wrong.

But also, `git diff`.

Re:Why is it so hard to see code from 5 minutes ago? by doubletgl on Friday February 19, 2021 @05:37AM (#26191593)
Thought the same, copy-pasting valuable blocks as a reference into a comment worked fine. If it exceeds a one block rewrite, make small dirty commits to keep track of things.

On one hand it's nice that there are tools to support devs who get lost in their undo-redo history, on the other I feel like it's a matter of good habits to not even have this problem.

of course changing habits is hard, so maybe tooling is justified in this case. I'm just happy I don't have nother "history" type mental model to deal with.