News for hackers. Stuff that matters.
Re:Ask HN: When coding, how to do remember what you were doi... by lost_my_pwd on Tuesday January 12, 2021 @11:07AM (#25748708)
Long ago I was reading about Ernest Hemingway's approach to dealing with writer's block and one thing he said has stuck with me and proved quite successful for both "coder's block" and remembering where I left off from the last coding session:

  I always worked until I had something done and I always stopped when I knew what was going to happen next. That way I could be sure of going on the next day…
Re:Ask HN: When coding, how to do remember what you were doi... by rpdillon on Tuesday January 12, 2021 @03:59PM (#25753561)
So glad you mentioned this! Back when I coded a lot more, I'd write a failing test with a note (e.g. "Fix date handling when converting from non-GMT timezones") letting me know where to pick up.

These days I keep a worklog for each day that I can flip through, and mark various items as TODO in the log. That allows me to track state over more days, which is useful when there are half a dozen projects to track.

Re:Ask HN: When coding, how to do remember what you were doi... by csolorio on Tuesday January 12, 2021 @11:16AM (#25748866)
I do the same. Additionally, I'll generally write an unexecutable bit of code where I left off. If I try to start again the program will error out on the line I left off on.
Re:Ask HN: When coding, how to do remember what you were doi... by swilliamsio on Wednesday January 13, 2021 @03:06AM (#25759460)
Yea, this is definitely the way. Stop at a logical stopping point. Leaving at the point where a task or sub-task is completed ensures the next time you come back there's a logical next step for you to begin.