In my struggle with migraines, the best tool to fight the pain is focusing on code.
I’ve been a migraineur for the past 30 years. My headaches have ranged from mild to extremely intense, and occurred as frequently as five times a week. There have been times in my life when I only had one or two migraine headaches a month. When I was 12 I was diagnosed with migraine with aura (classic migraine). Over the years I’ve kept headache diaries, found patterns that lead to triggers, and tried different treatments. I won’t go into too much detail, but over 30 years I’ve have a lot of opportunities to try different treatments, including BOTOX injections every 24 weeks from my eye brows back to my shoulders, and some pretty strong pain medications.
I often wake up with a migraine, usually hours before my alarm. I am not the type of person who will take a pain killer at 5:00 AM, regardless of how much pain I’m experiencing. My time is too precious; I haven’t taken a sick day in the last five years, and my weekends are well earned time off. Instead, I will wash up and head for my computer and start working on a project. If I can find something to focus intensely on, I distract myself from the pain. There are other tricks too, like caffeine and Advil, but the key is to focus my mind on a task.
The last five Saturdays I have woken up well before 6 AM with a migraine, drank a white Monster zero, took some Advil, and started a project. I’ve built servers, wrote code, basically just hacked away so my mind was focused and occupied. I was productive, I enjoyed my time, I didn’t suffer.
I started my life with computers though the shell. My first desktop computing experience was with a HP-UX workstation my father brought home from work, before we had a DOS PC. I still do most of my serious computing work in a command shell. At work I manage Active Directory, Azure, and Microsoft 365 with PowerShell, and I’ve written official company applications in PowerShell at a previous position. All my home servers run Linux and are headless. Working on them has greatly improved my Linux skills and I’ve improved my home network by doing projects that are useful (pihole, jellyfin, an nginx reverse proxy for jellyfin, a Tor proxy, an OpenVNP). I have more in mind, and I’ll get more headaches, so I’ll definitely write more articles and code.
If you suffer from migraines, I hope you can try something besides suffer or kill the pain with meds. It took me a very long time to be able to stay at work or work on projects instead of laying down in bed and losing that time. When I start getting aura or pre-migraine symptoms, I will take Advil and some caffeine and bear down on something difficult, and escape the pain by focusing my mind. I’m sure there is some connection with being able to work on complex problems and being a migraineur, but for me it’s part of the solution.