Sleep. Best side task for your brain. How many times has this happened to me? You struggle with a feature or a bug, you think about it, you weigh the pros and cons for hours... because you don't want to start something that will set you back. You're tired, but you don't want to go to sleep until you've at least made a decision for tomorrow. Go to sleep. Now. Then you wake up knowing immediately what to do. You hardly…
I just take a hot bath… best ideas happen in the bathtub for me.
Developer's block
41–50 of 106 posts
Re: Developer's block
#42There's so much good advice in this article. My number one point that i learned the hard way during two decades of writing software: take breaks when your body tells you to. It's an absolute killer if you force yourself to work on your projects just because there's stuff on your to do list, new issues on Github, or whatever. Just stop working if you don't feel it.
I feel like that's great advice for people working on their own side projects. But... I'm employed? I mean surely it translates to "go on vacation" but it's pretty useless advice for days where you simply have to work and can't just... not?
"Sustainable pace" helps, which in my case came down to 37 hour working weeks, not working at weekends, and taking all my vacation (and some extra when my employer let me buy it). I know this might sound like madness to Americans, but as a Brit employed mostly by American companies, it worked fine for me.
I found that taking plenty of breaks during the working day helped. Coffee breaks with colleagues, a decent lunch break (ideally including exercise), and plenty of tea breaks. So many times I've had a good idea or solved a problem during a break, so they are actually productive.
Then there's finding other useful things to do which aren't as taxing as the thing that's blocking you (e.g. the next large feature). Fixing bugs, writing docs, and doing preparatory investigations about the upcoming work are all productive ways to give yourself a bit of a mental break. (This was hardest when working in teams with continual short sprints or doing XP and pairing, but if I allowed myself to start to burn out, my productivity started to decline - essentially my brain was forcing me to take things a little more slowly in order to recover.)
Re: Developer's block
#43The Oxide and Friends podcast [1] did a whole episode on this: Coder's Block (25 Oct 2021) [2]. It had some good stuff in it, the best of which (for me) was: when stuck, write debugging infrastructure. [1] https://oxide-and-friends.transistor.fm [2] https://oxide-and-friends.transistor.fm/episodes/coders-bloc... Edit: punctuation
Re: Developer's block
#44Sleep. Best side task for your brain. How many times has this happened to me? You struggle with a feature or a bug, you think about it, you weigh the pros and cons for hours... because you don't want to start something that will set you back. You're tired, but you don't want to go to sleep until you've at least made a decision for tomorrow. Go to sleep. Now. Then you wake up knowing immediately what to do. You hardly…
I just take a hot bath… best ideas happen in the bathtub for me.
Re: Developer's block
#45Re: Developer's block
#46Re: Developer's block
#47Rolled my eyes on "For experts only: don't do it yet". Shut-up already. I will do it right now because it will nag me forever and then surface will grow, and every time the new code interacts whith what-could-ve-been-optimized I will spend 5min thinking if I should already optimize it
Re: Developer's block
#48If I’ve had a break, gone for a walk, left it overnight, worked on something else simple for a bit and tried the other usual ‘fixes’ and am still stuck then I find ‘just do it’ really helps me. I find if I just write some code even slightly related to the goal, even if it’s complete garbage that gets deleted later, then I get unstuck. Although unfortunately even getting to that point takes a couple of days sometimes.…
Re: Developer's block
#49> A new project and it’s going to be your best ever A good defense against this is borrowing stuff from your prior projects, alongside eventually creating templates for the most common stuff. For example, in new side projects I start, I can borrow the web server (ingress) configuration from the prior ones, same for CI pipelines and a large part of the previous Dockerfiles, sometimes even entire services with all of t…
For example, I used to work on a mainframe product that dumped the address space to disk on a crash. Then it was possible to build all sorts of fancy tooling to analyse the dump. When I moved to a different platform, without those kinds of dumps, it was tempting to try to reinvent all this stuff, but it would have been a massive time sink (and would have failed too).