When I am coding for a long time, my emotional state tends to reflect the code. If it's not compiling when I think it should, I get frustrated. If everything is acting predictably, like I expect it to, I feel great.<p>After a day of programming, it takes me a while to get used to talking to a human being. During the day, my feelings reflect those of a computer - it is dry and unemotional, so I am too.<p>Does anyone else experience similar things? How do you deal?
Whenever I finish a software project and return to electrical engineering, where I have to worry about parasitic capacitance, inductance, thermal noise, propagation delays, and pages of datasheets for something as simple as a single transistor, I realize how much easier and more satisfying electrical engineering is than programming, where I have to deal with truly unpredictable phenomena like libraries, APIs, and development environments so bloated they make Quartus and Vivado seem fast.<p>It turns out quantum mechanics and pages of empirical analysis are a plus, because they are well documented and everything behaves as expected. When I program, I spend more time reverse engineering other software, to try and make sense of the lacking, outdated, and often outright incorrect documentation than I spend writing my own software. I can't spend any extended period of time doing that and still keep my sanity.
I've actually noticed some things make me disproportionately upset.<p>If I hit a wall working on coding logic, I kind of get annoyed and take a short break and come back and try some more.<p>If I'm doing _anything_ involving databases and API calls I get actually ANGRY when something doesn't work.<p>My theory:
Explaining logic in syntax feels natural, since we do it talking to each other all the time.<p>Exchanging information in structure feels unnatural, since we don't do it in interpersonal communication. If we're talking about a subject we don't have to first define a schema and endpoints. Our brains do all that automatically.<p>Imagine trying to use migrations and API routes to represent the memory access, changes in data, and relation mapping our minds do when studying new subjects or learning new information about old topics.<p>I HATE DATABASES.
I think of programming as literally speaking a foreign language. My job is to translate ideas between two realms without loosing the essence in the translation. A for loop is like a rambling sentence, with purpose. The work of software allows me to start and restart this translation until it ends up exactly as it needs to be. The medium is changeable, dynamic, and ultimately meaningful. There is no other feeling like it… factorio gets close but doesn’t cut the mustard when it comes to the essence of code. It is poetry, imprecise yet stunningly beautiful. What a rush.
I noticed this frustration gets worse with a long feedback loop.<p>I recently reworked a CI pipeline over two weeks, and it was a nightmare to make tiny changes, push it, and wait 5-10 minutes to see another error because of a YAML typo.<p>If possible, I try to shorten this feedback loop early.<p>Another option is picking something radically different to work on for a while, if possible.
Clear signs of unconscious deep flow state. It takes time to get back from it. It also makes you a good programmer. There are ways to avoid/exit it (e.g. shower) if you want, but ymmw with timings and quality.<p>I’d suggest pushing work further in the day if possible. So that you live your life, then code, then go to sleep.
If I spend a couple hours or more doing "deep work" writing code, I often find I need an hour or two of cool-down time before I can really have much in the way of emotions again.
Sometimes I get so frustrated that I wonder if I'll ever make it big via programming.<p>Then I go to sleep, wake up, and I finally solve the bug.<p>Rinse and repeat.
I'm fucking livid right now because I have to rebuild my local dev env because the django project we use is installed locally and _something_ _somewhere_ made it so I couldn't run migrations any longer. No worries, our operations teams made a set up script that bootstraps the project. Except it just totally borked my entire environment and the script is failing over itself possibly due to some env vars set in some other script, utility, or dotfile.<p>I want to just get some shit done. And I have now spent 5 hours trying to patch up a problem that should never have even existed. I work at a place with 50+ eng teams sharing this code base. This simply shouldn't even be a thing. I should be able to clone, run a setup script, and just code.<p>So, yeah, I'm in a shit-ass mood now. And the worst part is that my feelings are totally self-imposed. _I_ want to feel productive. Apparently the org doesn't really care, so if they want to pay me to not be able to work, so be it I guess? I don't like it.
Yeah, I tend to get to feeling a similar way. I deal with it in a few ways:<p>- Listen to calming music, not anything aggressive or angry. This makes a huge difference for me.<p>- Take time to prepare so that I expect speed bumps, not an easy ride. This can be in the form of just taking a beat to think about a problem right before starting or general, preparatory journaling in the morning.<p>- Take breaks when I’m stuck. Getting away from the problem or talking to someone else (rubber ducky style) really does help.<p>- Learn and reflect on what went wrong. Sometimes it’s easy to blast by and solve a problem without thinking about it. For me, at least, that’s a recipe for getting myself into the same problem again in the future and not remembering how I solved it. Sometimes, this is something I can proactively take time to fix so myself or others don’t encounter it again.<p>- Scheduling my day. I try to schedule my day so that I have meetings as early as possible in the morning and then I do programming in blocks in the late morning and afternoon. Being able to avoid distractions removes some compounding frustration.