Wouldn’t it be great if you could debug your brain as though it were bad code?

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.

You know, like Windows 8.

Your hand gets hot, you pull it back.

Your stomach rumbles, you look for food.

Unfortunately there are alotof events.

But Wait!

We’re Smarter ThanOoh, 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?

But that part is event driven too, which is to say it’s not on all the time.

And when it’s in control, you do so.

But consciousness demands a lot of power.

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 atransition.

For example, if you wake up, that’s a transition.

Arrive at your deskthat’s a transition.

Arrive homethat’s a transition.

We need to change that.

Let’s break it down.

“No”

Firstly, we need to interrupt all other events.

There’s a trick for overpowering mental distractions, and that’s tomake your intention insanely simple.

“No” is about as simple an intention as it’s possible for you to get.

No means simplyreject 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 anywayif your house is on fire, primal instincts will take over.

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 toget done what matters first.

There can be only one.

A crucial distinction here isimportanceversusurgency.

The most important things in lifelike eating healthyare rarely urgent.

And our brain’s buggy events are great at dealing with urgent thingslike the phone ringingall by themselves.

So when given the choice,choose importance over urgency.

Itmakes the most differencein the long run.

“Now”

Start doing the right thing immediately.

Not after you’ve checked your emailimmediately.Don’t give yourself time to even think about it, juststart.

Three short words toprogram a life-changing habit.

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

Image adapted fromLatio(Shutterstock).

Want to see your work on Lifehacker?