Superhuman by Habit

Cover image of Tynan’s book “Superhuman by Habit”

Sometime last year I read a short, simple, yet eye opening book called: Superhuman by Habit. I was made aware of this book due to my of frequenting Farnam Street — an excellent blog that I’d recommend to anyone.

The basic premise of the book is that habits can be transformative as they build up gently and are eventually freed of the willpower needed to sustain them. The idea is that if something requires constant willpower — week one, week two, week three etc. — over time chances are your willpower will one day fail. To paraphrase Nassim Taleb’s wisdom — your willpower is fragile: on the long run it will fail you; habits are anti-fragile.

The goal is to introduce a small change for which the willpower required to sustain is little and that can pass from a forced conscious activity to a near subconscious habit.

In Discipline is Freedom Jacko Willinik stresses that one simply just has to do it — there is no tomorrow, no later this week, no new year’s resolution. Do it now. Which coincides with the idea of small changes — we cannot just run a marathon now, but we can go out for a run today.

So taking all of this advice, I went ahead and tried to pursue this lofty goal of a better self.

A little history

About two years ago I was probably in the worst physical shape of my life. Lingering back and neck injuries severely affected my mobility, I became quickly fatigued, and headaches became a daily occurrence. I needed to take care of my health and using all the information I had obtained from long before (yoga, qigong, meditation) and gleefully embracing the idea of becoming , I pursed a path of betterment.

But I encountered an obstacle. Tracking. A large tasks looms big on your mind. It occupies your attention, dancing in front of you and distracting you from other things. But small things, like not putting sugar in your coffee, slip by. Maybe somebody you know is getting the coffee for you, maybe your of using sugar is getting in the way without you noticing.

So I built a little app. And to be technically correct it is simply a web application served over a browser — I did not bother deploying it on the App Store or Google Play.

The Habitmaker

I called it the “Just Did It” app and then renamed it to the more enigmatic “Habitmaker”. Essentially, it is just a list.

The app has a couple of features:

Create a task
Once a task has been created it shows up on the home screen everyday.

Complete a task
You click the checkbox to let you know that you have completed the task.

A reminder/summary email
Something to let you know how good you’ve done today.

Tech Stack

React
React has become my framework of choice for the front end. It strikes the right balance between purity of design and efficiency in application.

Firebase
Firebase provides a very simply way of using a database, social auth, and serverless functions without having to worry about infrastructure. Since I chose to use Sendblue (see below) for emails I had to adopt a paid option. I chose Blaze because for my particular use case it seemed to end up costing less than the Flame plan which comes in at $25/month.

cron-job.org +Sendblue
I used cron-job.org to schedule a daily scheduled task to call a Firebase function. The Firebase function will query the db to determine what’s left (i.e. which tasks were not accomplished) and send an email. The email address is also saved in the db. Sendblue’s api is far simpler to use than Google’s SMTP service and the price point is more lucrative than Sendgrid.

The first function will populate the DB with a set of emails to be sent, and a listener function attached to that reference will send the email. This is in essence a message queue like workflow. But Firebase being a real-time db instead of a queue makes removing the message optional. You can just keep as a type of log and delete it weekly or something like that — making debugging easier, by for example attaching the response from the email service to the message object.

The choice of cron-job.org was also driven by ease of implementation.

The Result

I am able to track my progress. I am reminded of having missed something as mundane as doing 10 push-ups (yes, just 10). And I am able to form habits — from my experience it takes about 3 weeks for mild habit formation.

But, the habit needs to be so that it can be done quickly even as the rest of the day is messy. And the first couple of weeks you need to figure out workflows — like doing yoga without a mat — that minimize dependencies. Once the body becomes accustomed a lot of things happen.

Your body feels unsatisfied unless you do the exercise; your body starts going into flight mode at the sight of white sugar etc. and eventually the thing that was so difficult becomes your new status quo. And you can move on to the next round.

You can try out the app here: habitmaker.baavaanee.ca — let me know how it goes. Keep in mind that this is a personal project and there is no SLA :(.

Thoughts. And Illusions.