Billions of dollars are spent every year to behaviorally program me. You probably know what it’s like trying to reign control back from The Algorithm. What if you could use technology to regain control and break unwanted habits?
A few years ago, I’d catch myself scrolling the comments on Reddit’s front page articles looking for something, idk what, but it couldn’t have been the rehashed remarks (100% this), all caps comments expressing an emotion (SERIOUSLY?), and generally low information comments. It was a roulette wheel. I wanted to stop and decided it was time to bring out the big guns.
I came across the Pavlok in 2018. The Pavlok is a wrist-watch that delivers a shock. The device had the right cyberpunk and biohacking vibes to catch my attention. It was primarily marketed for smoking cessation: every time you felt the impulse to smoke, you’d press the device and it would deliver a shock. I’m not a smoker but guess what? They had an API! Although the device was designed for smoking cessation, its API opened up new possibilities for tackling other habits.
With habits, there are 3 stages: a trigger, the behavior, and the reward. Operant conditioning is learning that occurs when behaviors are followed by consequences. Generally speaking, there are 4 types along 2 dimensions:
- Positive Reinforcement - apply a pleasant stimulus after the behavior
- Negative Reinforcement - remove an unpleasant stimulus after the behavior
- Positive Punishment - apply an unpleasant stimulus after the behavior
- Negative Punishment - remove a desirable stimulus after the behavior
For breaking habits, the Pavlok provided a source for positive punishment. Additionally, operant conditioning is much more effective when the stimulus follows immediately after the behavior.
To quit Reddit, I wanted the Pavlok to deliver a painful shock every time I visited Reddit, and I wanted it automated with low latency (less than a second). I only had this habit on my dopamine-delivery-device (smartphone). So I setup a VPN on a VPS, monitored for DNS requests to Reddit with tcpdump, and sent a shock request to the Pavlok API. I don’t have the code on hand, but ChatGPT may give it to you if you ask politely.
Initially, I set the API to send a vibrate signal. I wanted to test out any kinks (no pun intended) in the setup. Sure enough, filtering for DNS queries to reddit.com had false positives. There were two reasons. Embedded social media links to share articles on Reddit made DNS queries. Also, firefox would do DNS pre-fetching whenever I opened a new tab. To patch this, I checked for a DNS query to a Reddit subdomain which was queried when loading the front page. AFAICT, there wasn’t a way to disable DNS pre-fetching in firefox. After no false positives for a few days, I changed the API call from vibrate to shock.
I was shocked 1 time. It was surprisingly effective.
The morning after I enabled it, I was on the toilet and pulled out my phone as usual. A dopamine-fiend needs their fix. That early morning half-awake stupor was interrupted by a painful shock. I remember the emotions. At first, fear and confusion. Then anger, at myself, with the realization that I visited Reddit. But after a few seconds, I was ecstatic that it worked and caught me during my early-morning-brain-fog-auto-pilot.
I don’t have the stats anymore but the plot looked something like this.
Interestingly, it wasn’t the positive punishment that was the primary driver for behavioral change. Instead of getting shocked, I was playing this fun game of catching myself on auto-pilot opening a new tab to visit Reddit. I’d stop myself, breaking the habit loop and preventing a shock from being delivered. The negative reinforcement made me smile whenever I caught myself. The positive punishment, the one time it happened, made me angry at myself for not catching the habit.
It’s easy to see the current state of technology as fitting for a Black Mirror episode. But we can harness the very principles that drive product addictiveness, and use them to empower ourselves. In a world dominated by algorithms, it takes a small shock to remind us that we have tools to gain some agency.