Comment by jedberg
1 year ago
This post just gave me an epiphany. I work with some programmers in their 20s. They are some of the best programmers I've ever met. But they never seem to enter "flow state". In fact, they welcome distractions. And now I think I know why.
When I was coming up, you needed to enter flow state to be a good programmer. Because you had to keep track of all the functions and their signatures, all the different flows and objects, all the different files. And if you got interrupted, you had to reread the code to "load" all that back into your working memory.
But now the tools do that for them. They can click on a function and see the definition. The copilot and autocomplete will keep track of all the minutiae for them. So they don't need flow state to be productive.
This revelation may get me to actually switch from vim to something with all these modern features. Maybe it's finally time for me to try VSCode.
Especially since my kids never let me hit flow state anymore even if I wanted to!
This is something I have been noodling with a bit. I'm 40 (started in my late 20's). I welcome the distractions as well.
When I was learning, I would always have a movie or TV show on in the background.
On stream, I am constantly responding to chat. But I am able to delay that by up to a minute most times. So I get most of my work done in short bursts.
BUT, while distracted by a TV show or a chatter on stream, my brain is probably not completely distracted. It becomes a moment for diffuse thought to kick in rather than relying purely on focused thought. (For anyone reading and unaware, diffuse thinking is what causes "shower thoughts")
So, those distractions are just a way of forcing myself to toggle between thinking states.
Diffuse thought is also the reason why I never end on a resolution for the day. I always try to have something that I can stew on overnight while going to sleep, waking up, showering, doing the dishes, etc. I have solved several bugs on my morning commute back when I used to go into the office.
Something somewhat related. People who do non-traditional sleep patterns like biphasic, or even something as extreme as uberman, are able to get to sleep faster than most people with traditional sleep patterns. It is something that you can actually train and practice. Forcing diffuse thought more often maybe helps it kick in quicker too?
So one of my current projects has a part that is five coordinated microservices. Two of them need to use concurrency that modern tooling doesn’t love out of the box. The entire system has to have strict timing and low latency. Autocomplete can help with some pieces but this isn’t actually that much code. What it requires is being able to visualize the whole thing, be able to test exactly how the underlying libraries respond to different kinds of errors, and how to prevent deadlocks. I have yet to meet an LLM capable of reasoning about deadlocks, catching signals within threads of a process, correct semantics of anonymous pipes and their buffers, etc. In order to work on something like this it does require flow state. You can’t just casually add a few lines or rework some module. You need to visualize the entire system, including error flows, before you can start changing it.
I could likely use some basic autocomplete for things like a function signature, but most times I have the function implementation on one side of my screen and where it’s being used on the other and chances are I’m changing both at the same time. Vim is wonderful for this kind of work.
If you'll allow me to shill my company for a second, I'd be interested if you could take a look at DBOS[0] and tell me if it might simplify your problem. It's designed for making microservices a lot easier to reason about, and might help make your system a lot simpler.
[0] https://docs.dbos.dev/why-dbos
That seems quite clever but for this specific use case it likely won’t solve the difficult bits. Namely I am using threads and subprocesses mixed with asyncio and PyAV to transcode real time video. Does DBOS allow you to store the internal state of Python modules written in C? How does it deal with recreating subprocesses and threads?
2 replies →
You don’t need to ditch vim to have these features! Mostly they’re using lsp in a client (editor) / server relationship. You can run the same tooling happily from vim (I use neovim, but I believe it’s all implemented in vim too).