One Line of Code Every Day: A Powerful Habit

Today I want to propose a new habit for you which will ensure that you are on the path of continuous improvement in Python — on the path to mastery.

Maybe you have read the book “The Power of Habit” by Charles Duhigg (wiki). The Pulitzer-Price winning author talks about forming keystone habits that will change each and every area in your life.

For example, he describes an unhealthy, unhappy, smoking, and heavy woman. This woman one day decided to start running every day. That was the keystone habit that caused a chain reaction of positive changes throughout different areas of her life. She stopped smoking, started to eat healthier, became fit and confident, slept better, and planned for her first marathon. She also became more focused at work, and more successful in her career. Everything changed to the better. Only because of this one thing (running every day). It was like a domino effect: changing one thing caused a chain reaction in her life.

If you want to become a master coder, I want to challenge you today:

Implement one keystone habit which you will do every day for the rest of your life. It’s a simple habit but nonetheless powerful.

Here’s the challenge: Write one line of code every day.

It’s a simple habit. But if you do this, your results will blow up. I started this habit two years ago and since then everything changed for me. I created my online learning platform Finxter.com that produces new Python experts daily. The platform is implemented in pure Django with HTML/CSS/JavaScript on the front-end. Although I didn’t know much about these technologies, I quickly learned and mastered them because of my daily habit of writing one line of code every day.

I have a computer science degree and just came out of a doctoral research program in computer science so I have some background knowledge. But nonetheless, these technologies were mostly new to me and I had to learn them just like everybody else.

The site attracted tens of thousands of coders online and it grows rapidly. And all of this only because of my habit to code at least one line of code every day. Indeed, I marked my calendar with a red ‘x’ if I finished the coding habit. And I ensured that the chain was never-ending.

After all, it’s just one line of code — even if it’s a comment.

If you calculate it, you’ll come with a mere 365 lines of code in a whole year. But this is far from what really happens. In reality, this habit will cause you to write tens of thousands of lines of code every year just because of the physics involved: inertia. If you write one line, it’s likely that you write another, and another. Ultimately, you will find yourself writing hundreds of lines of code every day.

So, as an ambitious coder, you may ask: why not implementing the habit of writing 100 lines of code every day (instead of only one)?

Because you’ll not push it through. The barrier is too high. Oftentimes, you’ll not open your code editor because you don’t feel like it’s possible to write 100 lines of code. You’ll procrastinate. Believe me, even if you are a disciplined person, set the threshold to one line of code every day. It’s simple and there is no excuse not to fulfill it. So you will fulfill it every day.

This keystone habit is easy but make no mistake: it will change your life! In a few years, you will reap rewards you’ve never dreamed of.

Are you up to the challenge?

  • Write a comment below and commit now — publicly and in writing!
  • Share this article with your friends and tell them about your new habit! It’s far more powerful to commit in front of your friends than committing in the web.

Leave a Comment