If there’s only one thing I could teach someone before they started learning to program, I’d teach them how to be consistent.

Successful self-taught developers don’t have any special abilities that others don’t possess.

What they do have are the habits, routines, and/or life circumstances that allow them to consistently apply effort towards their studies.

I believe the hardest part of teaching yourself programming isn’t the difficulty of the material but rather setting up your life in a way that allows you to consistently chip away at your goal.

Existing habits are hard to break. Expectations of the people around you are hard to manage. These factors are often overlooked.

The key difference between someone who has successfully taught themselves programming and someone who has failed is that one person stopped before the job was done and the other person didn’t. It’s that simple.

A slow learner who shows up consistently will always outperform a fast learner who quits early.

Regardless of who you are, learning to program is a large undertaking that requires a sizable commitment of time. Until we discover a way to upload memories into our brains, the only reliable way we can make it through this large pile of hours is through consistency.

Shortcuts and hacks don’t work. It’s not possible to become proficient at programming by drinking a case of Red Bull and studying for 3 days straight.

Just like eating an elephant, learning programming can only be done one bite at a time.

Tiny Habits

Tiny Habits is the best methodology I've found when it comes to changing your behavior and becoming more consistent.

Tiny Habits is a behavior change framework developed by Dr. BJ Fogg. BJ Fogg is the founder of the Behavior Design Lab at Stanford University and is largely considered one of the world’s leading experts in behavior and habit change.

In my opinion, Tiny Habits provides the best framework for behavior change. It’s backed by both research and real-world applications.

Through his years of research, BJ Fogg has found only 3 ways people change their behavior.

  1. Epiphanies
  2. Environment changes
  3. Taking baby steps

Out of the three options, epiphanies are the most unreliable. People can’t usually create an epiphany on demand. If you can, well, you might have some sort of superpower.

Changing your environment is a good option if you can manage it. However, most self-taught developers I meet are trying to fit their studies into their already busy lives.

This leaves taking baby steps as the best option. Taking baby steps is available to everyone and it’s easy to apply to your life once you know the basics.

Tiny Habits is a framework centered around taking baby steps.

Tiny Habits have three main pieces.

  1. An anchor
  2. A tiny behavior
  3. A reward

In the remainder of the article, I’ll explain the three parts of Tiny Habits and look at ways you can apply it to self-taught development.

The Fogg Behavior Model

The core component of Tiny Habits is the Fogg Behavior Model. The Fogg Behavior Model is represented by the formula B = MAP.

Behavior = Motivation * Ability * Prompt

Motivation — Hopes, fears, pleasure-seeking, pain avoidance, social acceptance, and social rejection.

Ability — Your ability to perform a task, which includes: time, money, physical effort, mental effort, social deviance, and routine.

Prompt — An internal or external trigger that reminds you to do the behavior.

The Fogg Behavior Model is represented visually by the graph below.

A behavior occurs when motivation, ability and a prompt converge at the same time. If these three variables converge above the Action Line then a behavior occurs. If not, then nothing happens.

As you can see, our motivation and ability work together to bring behaviors into existence. Hard to do behaviors require a high level of motivation and easy to do behaviors require a low level of motivation.

I like to think of the Fogg Behavior Model as a bit of code that runs in our brains.

The prompt triggers a code block that checks the variables ‘ability’ and ‘motivation’. If either variable is high/low enough then it returns a behavior. If not, then it returns nothing.

The Fogg Behavior Model is a simple but powerful discovery that can have a large impact on your approach to learning software development.

It will act as the foundation for developing Tiny Habits and should be referenced frequency.

Avoid motivation

A habit can only be created when a behavior consistently stays above the Action Line.

There are only two ways this can occur.

  1. Maintain a high level of motivation.
  2. Make a behavior easy to perform.

Maintaining a high level of motivation over a long period of time is possible. As Neicheze said, “He who has a why to live can bear almost any how.”

But I wouldn’t bank on it.

As I’m sure we’ve all experienced, our motivation comes and goes without warning. One day we're excited about a new project and the next we struggle to find the energy to get off the couch.

We're often tricked into feeling like the wave of motivation we're riding will last forever. But it never does.

Our external motivations lose their power or shift away. Our internal motivations slowly dwindle due to the constant assault from our fears and doubts.

We lose the fire we once had and we end up right back where we started.

We humans are complex and our motivations are inconsistent.

For these reasons, motivation is the most volatile variable in the Fogg Behavior Model.

James Clear, author and blogger, developed a fantastic graphic illustrating the effect of motivation on our habits.

Motivation should be thought of as a fair-weather friend. Its presence is nice but it shouldn’t be trusted with anything important.

The safe thing to do is to side-step motivation and design your study habit with the assumption that your motivation will always be low.

Staying under the ebbs and flows of motivation is the only reliable path to consistently repeating a behavior.

Identifying a tiny behavior

A common mistake people make when developing a new habit is starting too big. We tend to think of behavior change as one big step rather than a series of smaller steps.

Big behaviors are attractive because they feel like the most efficient route. We tell ourselves something like, “If I study for 3 hours a day then I’ll learn programming in no time.”

However, big behavior changes are fragile because they rely on a high level of motivation.

Since motivation can't be trusted, easy to do behaviors are the best path towards consistency.

Unlike motivation, prompts and ability are almost completely in our control. We can choose a well-crafted prompt or decide on a behavior that’s within our ability.

A tiny behavior can be discovered by experimenting with the subcomponents of the Ability variable from the Fogg Behavior Model (time, money, physical effort, mental effort, social deviance, and routine).

Imagine each one of these subcomponents as a dial you can turn up and down. The key is to turn them as low as possible without changing the nature of the behavior.

For example, BJ Fogg recommends flossing one tooth to start a flossing habit. It’s hard to say no to flossing one tooth.

The tiny behavior for learning to code could be something as simple as logging into your computer and opening a browser.

As the illustration in the last section points out, it needs to be “so easy, you can’t say no.”

It might seem like a waste of time doing something so small.

Remember, what we’re after are long-term changes. Each tiny behavior acts as the foundation that future behaviors are built upon.

If you want to do more, go for it. Treat it as extra credit. Just make sure you never do less than the tiny behavior.

Setting up a prompt

Next, we need to identify a prompt that will act as an anchor for the new habit.

Prompts are simply a reminder to act. These can include notifications, people, remembering something or other habits (among other things).

Behaviors can’t exist without a prompt.

Spend some time making sure your prompt is worthwhile. The new habit will fall apart if the prompt isn’t well-established and well-anchored in your life.

I’ve found the best prompts are those that leverage existing habits. You can make the end of one habit the prompt for a new one. I’ve also found visual cues like sticky notes to be effective.

Use the following fill-in-the-blank sentence when trying to figure out your prompt. After I _____ I will ______.

For example, after I make my morning coffee I will sit down and open freeCodeCamp.

You will probably need to rework your prompt if you find yourself consistently forgetting to do your tiny behavior.

Moving from the prompt to your tiny behavior should feel natural. If it’s not, then either your prompt or tiny behavior needs to be reworked.

Finding a good anchoring prompt will require some experimentation.

Identifying a reward

The last thing you need to remember when developing your study habit is to reward yourself.

We are hardwired to repeat behaviors that provide us with positive feedback. It’s a signal to our brains that a behavior has value and is worth repeating.

Rewards need to be immediate and positive. If either of these two things is missing then the reward won’t be effective.

Avoid negativity if you fail. Positive reinforcement is the only way to grow new behaviors. Negative reinforcement can only shrink existing behaviors.

At a minimum, you need to reward yourself immediately after you complete your tiny behavior. For bonus points, you can also reward yourself when you remember your prompt and during the actual tiny behavior.

The easiest reward at your disposal is an instant celebration (out loud or quietly). Try telling yourself “Good job” or give a little fist pump. These small acts can go a long way.

Rewarding yourself after each tiny behavior might seem silly. However, rewards are a fundamental part of habit formation.

BJ Fogg points out that, more than anything else, emotions create habits. Rewards are the mechanism that injects positive emotions into the new behavior.

Setting up your prompt and tiny behavior only plant the seeds. Rewards provide the sunshine and water that allow a habit to grow.

You won’t need to reward yourself forever, just until the behavior becomes a habit.

Tiny behavior to Tiny habit

Once you have a solidly anchored prompt, a tiny behavior identified, and a reward setup, the only thing left to do is let time work its magic.

As time goes on, the new behavior will slowly move to the right on the Fogg Behavior Model.

As your programming ability increases and your new study habit becomes routine, increasing the time and intensity will feel natural.

The key is to only increase the time and intensity of your study habit when you feel comfortable doing so. Don’t force it.

Forcing the behavior will cause both your Motivation and Ability to decrease, which will slowly push you below the Action Line.

You are trying to build a solid foundation that future habits can be built upon. Moving too quickly can put that in jeopardy.

If you fail at any point, don’t look at it as a personal failure but rather a design failure. Your behavior either wasn’t small enough or your prompt wasn’t a solid anchor.

As I’ve mentioned, it’ll take some experimentation to get it right.

Life can be hectic sometimes so don’t get upset if you abandon your new Tiny Habit altogether. When the opportunity presents itself, reassess your prompt and tiny behavior and start fresh.


I truly believe anyone can learn to program if they are consistent.

Teaching yourself programming isn’t easy. Each day can be a grind. However, you don’t give yourself a chance if don't consistently show up.

I hope you've found Tiny Habits useful. I think it's an important tool when designing a consistent study habit.

You'll be surprised how easy and fun behavior change can be once you start small.

Big changes start from small beginnings.

If you want to hear about other insights I've learned along the way, follow my alter ego Zero to Programmer on Twitter. The goal of the account is to help you learn to code more efficiently.