Wouldn't it be great if you could debug your brain as though it were bad code? We might not be able to reprogram ourselves, but we can use the principles of debugging to help ourselves build better habits. Here's how to debug your brain.


Our brains are the most bug ridden pieces of junk since Internet Explorer. To replicate one common bug, try telling your brain to "go to the gym." Most brains will respond by updating their Facebook status and watching cat videos. This is not the desired behavior.


Fortunately I've developed a fix. Let me just explain how the whole human brain works first.

This Code Is a Mess

Looking at our brain, it's clear it was developed by a team of ten thousand monkeys sitting at keyboards. You know, like Windows 8.

The brain is event-driven, which is to say it does almost nothing until an event occurs, and then it responds to the event. Your hand gets hot, you pull it back. Your stomach rumbles, you look for food.


Unfortunately there are a lot of events. There are events for shiny objects coming into view, or for scary monsters, and all of these events are firing in our brain and competing for our limited processing ability.

It's as if the developers were too late to realize this would leave us bouncing between distractions like a cat chasing a laser pointer, and so they hacked in last-minute a priority system.


Unfortunately, our priority system isn't that great; the default priority for sitting down is higher than the priority for working out.


But Wait! We're Smarter Than—Ooh, a Squirrel

Don't we have some kind of clever, conscious brain though? The part that does math and plays chess and copies Sally's homework?


Well, yes. But that part is event driven too, which is to say it's not on all the time. It turns out our brains were optimized for energy efficiency, and they only turn on their CPU (Consciousness Processing Unit) when absolutely necessary. If you've ever realized you've been driving for an hour and hadn't even noticed, that was your consciousness going into Standby Mode.

It's your consciousness that tells you to exercise, even if you don't want to, because it can see the long term benefits are greater than the short term pain. And when it's in control, you do so. But consciousness demands a lot of power. When your mental battery is low, it's easily overpowered out by higher priorities, like playing Hearthstone or checking Twitter.


The Bug Fix

We're going to add a new event of our own to fix things. Non-programmers might call this a "habit."


Our new event is triggered by a transition. For example, if you wake up, that's a transition. Arrive at your desk—that's a transition. Arrive home—that's a transition.

It's at the transition that our behavior is most likely to be hijacked by the highest priority event that happens to be in our brain at the time. If you've arrived home, chances are that event is "I'm knackered" and you'll fall onto the sofa. We need to change that. Here's your new event:


Don't worry if you're not fluent in Brain Programming (B#)—just remember three words: "No. Right. Now." Let's break it down.


Firstly, we need to interrupt all other events. There's a trick for overpowering mental distractions, and that's to make your intention insanely simple. "No" is about as simple an intention as you can get.


No means simply reject everything. If you want to check Facebook, the answer is no. If someone is asking you if you have five minutes, the answer is no. If this will piss someone off, it's still no.

Don't complicate this with exceptions. Exceptions will happen anyway—if your house is on fire, primal instincts will take over. But 99.9% of the time, in our comfortable modern lives, the greatest danger to you is that you live by your outdated survival impulses. Start by saying no to everything.


You might worry that by declining everyone and everything you'll become some kind of sociopathic robot. You'll still have time for those distractions later. Tell people that. The trick is to get done what matters first.

Now ask yourself what is the one "right" thing you should be doing now. I did not say three things. There can be only one.


You shouldn't need to think about this much, because your conscious brain should already have decided for you the night before: it's usually the one thing you want yourself to do all the time, but never find time for.


A crucial distinction here is importance versus urgency. The most important things in life—like eating healthy—are rarely urgent. And our brain's buggy events are great at dealing with urgent things—like the phone ringing—all by themselves. So when given the choice, choose importance over urgency. It makes the most difference in the long run.


Start doing the right thing immediately. Not after you've checked your email– immediately.Don't give yourself time to even think about it, just start. Starting is always the hardest part; the very inertia which makes something hard to start can make it equally hard to stop.


This simple fix works because when you transition from one place to another, your brain is unusually receptive to events. It needs to decide on a new course of action, and once it chooses one it tends to stick to it.

Unfortunately we tend to make stupid decisions at transitions, because we don't think about them:


Interrupt your transitions with the right choices, and you'll find yourself doing what matters far, far more often:


Just remember: "No. Right. Now." Three short words to program a life-changing habit.


As for how you fix Windows 8, I have no idea.

How to Debug Your Brain | Oliver Emberton

Oliver Emberton is an entrepreneur, writer, programmer and artist who writes about life and how to make the most of it.


Image adapted from Latio (Shutterstock).

Want to see your work on Lifehacker? Email Andy .