How to return to the flow faster

ribtoks | 330 points

This is the hack I use: once I’m ready to stop for the day, I figure out a solution (usually to a small bug) but I stop myself from coding it. The next day, the code just flows from my fingers to the keyboard the second I sit down. Works like a charm and I’m right back into it. Just delaying the gratification of seeing another bug crushed.

groovypuppy | 5 years ago

In a nutshell: Know your goal, know what just happened, know what to do next. Maybe obvious, but I agree, critical, and a good thing to make explicit to oneself.

The author presents a lot of seemingly complex tools for this. Mine are, I believe, simpler -- a TODO list in .org mode (goal and next), and git log (for what just happened, always with --name-status to show what files were affected how, and maybe with -p to show the diff).

But you could use anything.

Jeff_Brown | 5 years ago

>The best way is always to stop when you are going good and when you know what will happen next. If you do that every day when you are writing a novel you will never be stuck. That is the most valuable thing I can tell you so try to remember it.

>I had learned already never to empty the well of my writing, but always to stop when there was still something there in the deep part of the well, and let it refill at night from the springs that fed it.

-Ernest Hemingway

https://dianedrake.com/wp-content/uploads/2012/06/Hemingway-...

kanaba | 5 years ago

The author found they needed a terminal replacement to `gitk` and they chose `lazygit`, but I would also like to recommend `tig`[0] as a commandline git browser.

The mentioned kanban software, `kanboard`[1], is super easy to setup and use -- I did a survey of about 10 self-hosted kanban software tools and this was definitely a front-runner in terms of overall simplicity and ease of setup and use. I did not review the plugin architecture at the time, but glad to hear that it is fairly straightforward.

[0] https://jonas.github.io/tig/ [1] https://kanboard.org/

merlincorey | 5 years ago

What typically works for me is just pencil and paper. I have a notebook that I use to log notes for each business day of the week. If I'm having trouble figuring out what I was working on during the previous day, I simply look at the previous day's notes.

Writing notes helps commit things to memory better for me too. Also, using paper to write notes is less of a distraction than using an electronic medium to write notes in this day and age.

broth | 5 years ago

observe–orient–decide–act

https://en.wikipedia.org/wiki/OODA_loop

smallnamespace | 5 years ago

This is partly why I really love the terminal Vim / tmux combo.

Getting back into the swing of things is effortless. You can switch between projects within literally 2 seconds. It's so easy to resume exactly where you left off from the previous session. There's no need to tinker with window layouts or re-open code editors.

Last month I made a video that goes over this workflow at (8:02 is the specifics on switching between projects): https://nickjanetakis.com/blog/using-tmux-sessions-windows-p...

nickjj | 5 years ago

I used to record my desktop all the time, and then even after a short interruption review it to mentally retrace my thought flow. Now I just use IntelliJ's Ctrl+Alt+Left/Right shortcuts to jump around the places I was looking at / modifying. Though reviewing footage was more effective; I might start doing that again.

(For context, I am a game designer at AAA studio and I write a lot of code.)

DecoPerson | 5 years ago

Although the flow is a great place to be in, and I enjoy it very much every time I incidentally discover I am in it. It is not something I actively try to achieve. I believe it can be counter-productive. It must not be a requisite for being able to work.

makach | 5 years ago

It's amazing how much this applies to fiction writing, too. Having a clear outline and keeping it updated really helps - especially if you're not a linear writer and work on multiple points in a single session.

Then again, if more amateur fiction writers did one thing well, I think that fiction in general would be improved.

Endy | 5 years ago

always leave a failing test

slashblake | 5 years ago

I carry around a notebook to write down ideas or solutions that have been grinding away since the last time I sat down to code. On the computer I keep a running task list using notepad for session notes and gitlab kanban for larger tasks. I find that most of the time my session notes are enough to pick up where I left off. If I'm between tasks time to grab a new one from kanban. If an idea pops up while I'm working on something else it is vital to enter a TODO in the source and an issue in gitlab and get back to what I was working on. Gotta stay on task without going down a rabbit hole.

tastyfreeze | 5 years ago

I use git commit messages for this. When I stop working, my commit messages look like these.

“Completed ABC; TODO XYZ”

“WIP ABC; TODO XYZ”

When I get back, all I have to do is check the previous commit.

SingAlong | 5 years ago

I like how the author put a shameless plug right in the middle of the article for something he wrote. Lol

Speakeasys | 5 years ago

Interesting approach. What would you think of having it sync the other way as well - when you edit an item in the Kanban board it edits the todo comment in the code?

cookingrobot | 5 years ago

I budget some time, say 10 minutes before I have to end to summarize the next steps and also to summarize the state of hard problems I’m having.

aj7 | 5 years ago

Very nice setup, but I just maintain a checklist in my READMEs using GitHub-flavored Markdown - works everywhere.

rcarmo | 5 years ago

What about embracing breaks. If you lose it, bookmark things a bit. Go doing something mindless for 20 minutes (walking), when possible something productive .. and when the energy comes back, jump right where you left and dive.

agumonkey | 5 years ago