Hack On Self: The Un-Crash Alarm

Ever get home, tired after work, sit down on a couch, and spend an hour or two sitting down without even managing to change into your home clothes? It’s a seriously unpleasant in-between state – almost comfortable, but you know you’re not really at rest, likely hungry, and even your phone battery is likely about to die. This kind of tiredness can get self-reinforcing real quick – especially if you’re too tired to cook food, or you’re stuck in an uncomfortable position. It’s like the inverse of the marshmallow test – instead of a desire, you’re dealing with lack thereof.

I’ve been dealing with this problem a lot within the last two years’ time. Day to day, I could lose hours to this kind of tiredness. It gets worse when I’m sick, and, it’s gotten worse on average after a few bouts of COVID. It’s not just tiredness, either – distractability and tiredness go hand in hand, and they play into each other, too.

My conclusion, so far, was pretty simple. When I’m tired, delayed but proper rest is way better than “resting” in a half-alert state, even if that takes effort I might not have yet. So, it’s important that I can get up, even if I’m already in a “crashed” position. Sure, I could use tricks like “do not sit down until I’m ready to rest”, but that only works sometimes – other times, the tiredness is too much to handle.

Audio files and sound playback library in hand, negative reinforcement methods fresh in my mind, I went and cooked together a very simple solution.

Anti-Crash Script

When I noticed myself being tired and in a “crash” state, I would think “oh, no worries, I’m going to get up any minute now”. Of course, it was never just a minute, and I decided to hook into that realization, subsurface but close enough that I could justify some intervention to myself.

Would you be surprised if I told you the solution was to ring a siren into my headphones? The algorithm is simple – every time I’m “crashed” and planning to get up “real soon”, I press a button that starts a five-minute timer, programmed to ring a siren into my headphones. When the seconds stop ticking and the siren triggers, I have a choice – get up and then re-trigger the alarm for five more minutes. There is no second choice, really – I don’t give myself one. The part where I get up before turning the siren off is crucial, of course – though, in case of missing willpower, an accelerometer measuring activity could do as well.

Not that much of my willpower would be required – turned out, it typically would be enough of a shock to realize just how quickly five minutes have passed. Consistently, every time I got tired, time would pass much quicker than I could feel it, and the “oh damn it’s been five minutes already” thought made for a surprisingly powerful reality check.

Initially, the script was a tiny local webserver – I had some Flask examples fresh in my mental toolbox, so I took those and wrote two tiny HTML pages, crash and uncrash. The crash page received a seconds argument, indicating how many seconds to wait before ringing the alarm, and the uncrash page stopped the alarm. Keep the two webpages open, and hit Ctrl+R on the page I need – simple enough.

Resistance Is Counterproductive

Later on, I beautified the pages a little – adding background colours, so that it’d be easy for me to find the pages in my laptop’s window switcher and not get confused between them. That was my first attempt to make the crash/uncrash “hooks” more accessible – since, unsurprisingly, having to Alt-Tab a couple times before finding the right page required some mental energy, so I would often forget about them altogether, and developing a habit of using these pages was significantly harder. Thinking back to the very first article and principles I outlined in it – reducing resistance to use was a must.

So, the “crash” webpages got turned into keybinds accessible on my laptop globally. Surprisingly, despite the crash endpoint’s arbitrary integer delay, I didn’t need much granularity. Right now, I only use three buttons , “uncrash”, “crash in 300 seconds” (5 minutes), and “crash in 1 second” (immediate). The “immediate crash” button was a surprisingly helpful one, too. See, the “oh, five minutes truly can pass quicker than expected” lesson has stuck with me – so, when I’d notice myself crashing, I knew better than to waste time trusting in the “just a few minutes” notice.

The keybinds got me to use the script more often – which has helped me find more usecases, and use it even when I’m not sick or super tired. Really, most of the trouble nowadays is noticing when I need to press the button – which, generally, is in the mornings, when I am still groggy and a scheduled appointment might not feel as important as it actually is.

One important aspect turned out to be retriggering the alarm instead of turning it off after five minutes. I get up either way, but usually, the crash doesn’t – I might “crash” immediately afterwards, or a minute-two later. Stopping the alarm ended up being a very intentional “crash is over” decision – so, the “stop” button never got into my muscle memory. I’ve indeed had muscle-memory cycle restarts, giving myself five more minutes without realizing – but I’ve never had muscle-memory stops, which is nice, because stopping the script without even realizing it would be a critical failure condition.

Retrospective: It’s Great, Somehow

Anything missing? Definitely! For one, there are some good keybinds I could add, even if maybe they wouldn’t fundamentally impact how the script is functioning. Say I’ve woken up, and I have to get somewhere early – so I use the “crash” script to get up and get with the gravity of my current situation. As I run around the house doing morning chores, five minutes pass and the alarm rings again, even though I’m currently actively doing something around the house.

Now, running back to the laptop and pressing a keybind isn’t a problem. The problem is that I could be pressing the “reset alarm” button in two different states – either I’m doing well, or I’m not, but it’s the same button. Making two different buttons, one “doing good” and one “still crashed”, would help me collect metadata I could use for a good purpose – and, quite likely, add a trigger for some sort of positive reinforcement.

Other than that? This script has eliminated yet another common failure mode from my life – and, once again, helped improve focus. It’s as simple as simple goes, and, it’s gotten me to a more comfortable point – often, making a difference between an evening lost to tiredness, and an evening of recuperation.

One thing you might notice – to actually work properly, this script requires always-on, wireless headphones. In the next article, I’ll talk about the wireless headphone device I’ve built, why I had to build one instead of buying one, and how that device has helped me solved a bunch of other problems I didn’t realize I had.

19 thoughts on “Hack On Self: The Un-Crash Alarm

  1. Welcome to the world of chronic fatigue which I’m sure a doctor will insist that it’s all mental.

    Nice hack, never thought of doing this, glad to see it does provide the impetus to get up and do something. Will have to try a similar routine to see if it works for me

    1. It shocks me that people disparage mental health issues, taking personal offense and insisting it could only affect others.

      The greatest trick our brain pulled on us is convincing us it’s not part of our body and that we are little people hiding in human suits controlling it as a one way street.

      1. It’s not necessarily a feature of the brain, but the “ego” that we’ve grown to consider as ourselves, which is a cultural aspect. I hate to sound like someone peddling eastern mysticism, but there’s some merit in what they’re discussing.

        I think it was Alan Watts who asked rhetorically, do you beat your own heart? I ask, if you don’t, why does it keep beating?

  2. This is such a simple problem to solve. When I come home I plop in my favorite chair, I set my kitchen timer for 30 minutes, close my eyes and blank my mind. When the timer goes off I get up and have a productive evening. I do this every day.

    1. I prepare or buy something small and put it in the fridge, so when I get home I can just wolf it down and plop on the couch, and then sleep as long as I will without alarms. Work clothes or not – I refuse to worry about that. That deals with the immediate issue of being hungry and tired. Even if I wake up in the middle of the night, I don’t worry about it. I just read a book or browse the news and fall asleep again if that happens, until it’s time to get to work. It’s my recovery time, I do whatever I want with it.

      When I do that for a couple days, I get enough surplus energy to not crash again, so I can go to sleep at a reasonable time and wake up refreshed, eat regularly, and I can restore the normal schedule. If I push myself and work too hard, skip meals, or hang around doing “interesting stuff” way past my usual bedtime, I get exhausted and fall back to the pattern of crashing. When I notice that happening, I make the same preparations and allow myself to crash until I get better again.

      Ultimately, the trick to the whole thing is recognizing the exhaustion and avoiding it, but if it happens then there’s a way to make it better.

  3. I’m glad you’ve developed a solution that works for you, I find myself getting ‘stuck’ in much the same way you call ‘crashing’.

    I think I might benefit from an app that warns me if I’ve spent more than a few minutes doom-scrolling, more than 30 minutes without getting up and moving around, stuff like that. I find it very, very easy to muscle-memory-stop warnings, without really noticing. Mostly this shows up as my calendar having had “flush water heater sediment” on the first weekend of the month for 4 months now, and I always snooze it until I forget again.

    I just wish I could find the reason I’m routinely groggy or tired. Physician keeps saying it could be depression, or perhaps migraine symptoms as I have a family history of painless migraines. My whole generation seems to think it’s just normal for healthy adults to be tired all of the time.

  4. This has all the hallmarks of a technological solution for a problem that’s anything but. Please make sure to take care of your mental health and both mental and physical needs, so you’re not just staying afloat now, but also in the future.

  5. So many things wrong with this article… so many things wrong with the comments as well.

    Okay, being periodically tired during the day can have lots of causes, and it might be productive to do some experiments and see if one of the mundane causes line up with your symptoms.

    First up, do you drink coffee? And how much? Coffee has a listed half-life of 4 hours in the body, it has a known crash when it wears out, and… do you drink a cup or two at regular times and is this the cause of your crash?

    Second up, are you getting enough good sleep? Are you sitting up all night looking at screens with blue LED backgrounds (ie – your phone or TV) before going to bed? Your body needs red light, something approximating sunset, to prepare for sleep. Put off that preparation period and it happens after you go to bed but before you go to sleep. Try reading a book under an incandescent light for an hour before bedtime.

    Third up, is your “sleep hygiene” good? Do you have an old mattress and wake up with aches and pains? Is the environment too noisy, do ambulances bring you out of REM sleep every hour? Is your bedroom dark at night and allow sunlight in in the morning?

    Fourth up, does your day job require a lot of decision making or switching of gears? Our body has a bank account of [one of the neurotransmitters and I can’t remember which one right now], one evening of sleep will not completely refresh the account to full, and so day-by-day the levels get lower and lower until eventually you start the day with a low account balance and then run out during the day, but get a little better over the weekend and feel fully refreshed during a relaxing vacation. It’s why we can come home and feel completely washed out but not physically tired – our body is not evolved to handle a complex environment every day.

    Fifth and onward, is it pre-diabetes? Idiopathic post prandial syndrome?

    Are you getting enough Magnesium? Are you low in vitamin D? Try taking 5000 IU of vitamin D once or twice and see if that gives you more energy. (Note: Low vitamin D is very common.)

    Are you low in Iodine or any of the other micronutrients?

    Do you have a low-lying infection that your body can’t throw off? (Such as, for example, Lyme disease, but there are many others.)

    Really.

    Relying on a band-aid solution to compensate for an underlying medical condition is soooo American, but doesn’t address the actual problem.

    We’re a culture of scientists. List all the possible conditions, do some experiments, and see if you can eliminate all the known causes.

    You might be surprised.

  6. You have made the classic mistake on getting positive/negative reinforcement/punishment backwards.

    Positive/negative refers to the addition/removal of input.
    Reinforcement/punishment refers to the desired behavioral result.

    You say “negative reinforcement”, which means you remove something, or keep the situation the same, to maintain the behavior, which is the exact opposite of what you then describe.

    You mean positive punishment, because you are [adding] an alarm, and your goal is to [discourage] the behavior of sitting there zoned out.

    IMO it’s a dumb convention tht only confuses people, but I don’t make the rules.

    1. Oh I’ve talked about this in my previous article! I’d say, I’m trying to talk in a way that I’m intuitively understood by an average reader – I’m not writing for the field, that’d be, a large task, I’m merely pulling “positive reinforcement” and “negative reinforcement” out of the collective consciousness. Hope I can be forgiven for making this somewhat harder to read for people with a relevant background, if that makes sense… a lot of terminology I need to invent here, anyway, guess I’m doing that all throughout.

      1. That’s fine. We can use terms any way we like as long as we define our use of them to the reader, if they differ from the proper of conventional usage. Sometimes… well, we can use that to pull rhetorical tricks to make a point or win an argument.

        The issue with pulling things out of the “collective consciousness” is always that the collective may not be what you understand it to be. Cultures, demographics and languages differ in their use of terminology.

  7. You need to rest and take care of yourself more; work less. You’re scraping the bottom of the barrel in terms of your productive energy and that’s why you’re “crashing”. I guarantee if you reduce your workload to 80% of what it currently is this problem will go away. An example would be switching to 4/5 time at your job. Everything in the modern world is designed to wring as much productivity out of us as possible. If you want mental health in the modern day, you need the throw the yoke. Buy less, work less, just say NO, to all of it.

  8. idk why everyone is insistent on ragging on the author for finding a hacky little solution that works for them, but good on the author for finding whats worked for them. constant tiredness, low energy, executive dysfunction issues, all just SUCK, and whatever u find that helps u work with ur deal, good on you

    1. I think it’s because the writing gives the subtle impression of selling the problem and the solution as universal instead of explicitly specifying that it’s a personal experience.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.