5 ms·
Ask HN: How do you code when you're not feeling well?
I find coding to be hard. Particularly, if I'm not having my best day my productivity while coding plummets significantly.
During days like the ones described, I find exercise and breathing exercises help me get back on track but only moderately.
If anybody has better techniques I would like to learn about them. I am grateful for any advice.
All the best,
Santy
- obahareth 3y agoFor me, I recently got into drinking Yerba Mate (unsmoked, traditional way) and it's made me able to stay productive even in bad days. Not really a technique, but something that worked for me. EDIT: This is for when I'm feeling unproductive/down, not when I am feeling ill. The best thing for illness is rest and the right meds and nutrition.
- santy-gegen 3y agohahaha, I'm from Argentina curiously so I have that solution quite handy. It's good to know your opinion on rest, thank you very much
- JohnFen 3y agoAre you asking about coding when you're sick? I don't. When I get sick, I get stupid. If I try to code in those conditions, I'm very likely to just make a big mess of everything. Big picture, I get better productivity and code quality if I stop coding until I have recovered.
- santy-gegen 3y agoOk, it's kind of what I experience but it's good to know I'm not alone
- h2odragon 3y agoMy health varies unpredictably; some days I'm not really fit to be out of bed, some days I'm pretty good. Bad days, if I feel i can try working on something, I tend to stick to smaller "side" parts of a bigger task. Grooming dotfiles, editing docs, that kind of thing. Limit the possible impact of mistakes, and do things more amenable to non-thinking "change and try again" approaches.
- santy-gegen 3y agoOk, it's an interesting technique. Working on less challenging stuff when not on your best
- deleted 3y ago[deleted]
- codingdave 3y agoI don't. I learned long ago to code when I am feeling like coding, and not code otherwise. This is why I am an advocate of coders having flexible work schedules - sometimes you just aren't feeling it, but you can make up for that when you are.
- chrisdevs 3y agoLet's make a distinction. If you're sick -> take care of that first. Don't work. If you're just having an off day, trouble focusing, not feeling in the mood, that's different. I can suggest a few things that's worked for me. 1) Focus on just doing one thing. Pick your most important project, then pick one specific piece of that, and shut down everything else until you at least complete that. 2) Set a timer. If you're problem is getting started on a new or challenging project, do something like the pomodoro technique where you just promise yourself you'll work on it for X minutes and then stop. This removes some of the barrier to entry and can help you get started. 3) Remove distractions. Similar to the first point, but is Slack always on? Are you getting notifications from your phone? Checking e-mail? This is a problem with our current life, we have too much competing for our attention. A lot of what we need to do to be successful is blocking out the noise so we can focus. Hope this helps!
- h2odragon 3y ago> If you're sick take care of that first. Don't work. This leaves the chronically ill, and medically under-served, no options doesn't it? Sometimes you gotta do things. Even when you're several twinkles short of glittering.
- santy-gegen 3y agoI like the distinction. Yesterday was a mix of days 1 & 2. Agree with all suggestions (I have a quiet desk with notifications turned off usually, so I guess that wasn't the problem). I'll implement the just focus on one part of one project thing though, sounds like a smart strategy. Thanks for sharing your wisdom
- aynyc 3y agoIf you are talking about low energy days, my trick is to write documentation and unit tests. They don't require a lot mental focus, failure has limited impact. This is a trick I've taught to other juniors over the years.
- fullstick 3y agoMy first manager out of college told me "you can't always perform at 100%, it's okay to have off days". That's gotten me through a lot of meh days at work. I usually just try again tomorrow when I can't get anything done. Or I try at 5pm and work later than usual because I didn't do anything all day lol.
- santy-gegen 3y agothanks for the honesty, it makes me feel so much less worse about having days where my productivity is not peak
- LarryMade2 3y agoWhen you aren't up to coding do review of what you have written, make notes on corrections needed as well as any ideas for improvement. Good time to review user experience from your diminished perspective.
- luhego 3y agoI just take a shower and go to sleep. Sleeping makes me feel way better and usually I can code better after that.
- dyingkneepad 3y agoThose are the days where you clean up all your email backlog, do mandatory yearly corporate BS training, update status reports, clean up Jira, etc. I also find that on those days, root-causing bugs is easier than trying to actually write code (that either fixes problems or creates new features).
- santy-gegen 3y agovery funny and on point, specially the mandatory BS training