10

So, I have a coding task that takes several days to complete. How can I pick up the next day where I left off the night before? I find it difficult to get straight back into the flow because I first have to find my way around the previous day's code. Any tips?

Comments
  • 7
    Leave yourself comments and todos for one. The moment you think of something to implement that you won’t immediately be tackling, open an issue or write it in a text file somewhere. If all else fails you could try drugs, always best to leave yourself an out
  • 2
    Get a notepad. Day 1 draw miniatures of the files and references between them or even within the file. Next, break down task to necessary steps. Day 2 type out the steps into code, cross out the steps youve done before leaving work, also write down the line of code where you should start the next day. Repeat until done.
  • 2
    Never turn off your computer. So when you come back in the morning, no loading, your cursor, your windows, everything is the same as when you left the day before. At least that's what most mac users do and I've never felt I lost productivity over night. (Of course you'll never get right back in the same "flow", you've disrupted the day before)
  • 2
    I also just make a checklist of everything that needs to be done, ideally with larger tasks split up into multiples.

    For tricky sections in the code it might help to write a detailed comment explaining e.g. why you used a specific approach.

    Obviously it also helps to keep the code readable with good variable names, that's also a matter of practice.
  • 0
    Break your work up in small, self-contained tasks and write down what you need to do. Also write the smallest amount of code possible.
  • 2
    Document rigorously. When you need to make a design decision, write down pros and cons of each option. Save the link to that blog posting that had valuable info. Write useful commit messages that explain the "why" of the commit. And what all the others said.

    You can also do a "daily stand up meeting" with yourself. I wrote a note every day (now it's only once per week) containing what I finished, what I'm about to do that day, challenges, learned tips and tricks, and meta (for reflecting about my work and myself). I found explaining my work (even if it's just to my future self) gave me a clearer understanding of it and helped me getting back to it.

    Hope that helps.
  • 0
    What I do is work on a task until there is a stopping point. And commit to git
  • 2
    I was always taught to start with pseudocode or an outline of your logical thought process on paper. This becomes a practical form of reference when needed, and can help you think through problems a little differently. You can make a simple flowchart and add notes of what you find as you work through the program.
  • 0
    Document.
  • 0
    @sboesch this has worked for me for years now. Also having a notebook for when i really need to remember something.
  • 2
    3 ways I have used for years now:

    1. Dont stop coding until the part of code is done and working, yes its sucks working late, but your code will be done and problem solved.

    2. Dont switch off your PC, leave everything as is, commit on a different branch so your code is safe until your back at your PC the next day.

    3. TODO, sticky notes or a notepad at your desk to make make notes of important parts you need to get back to.
Add Comment