Atomic Habits by James Clear is filled with actionable advice and research on how to improve your life by building better systems and habits. It's written with all facets of life in mind, but I explored specifically how the ideas from this book can make you a better developer.
The Power of Tiny Habits
Habits are the compound interest of self-improvement.
Good habits compound over time to create positive results, and bad habits compound to create bad results. Learning one new skill won't make you a great developer, but a commitment to lifelong learning will. Not sleeping enough one night might not cause any problems, but consistent lack of sleep can have a huge effect on your productivity and the quality of your work. The kind of developer you become will be a direct result of the habits you build today.
You should be far more concerned with your current trajectory than with your current results.
It's easy to be frustrated and give up when you don't see results right away. Instead of focusing on whether you are getting results immediately, think about if your habits today are putting you on the path to be a better developer a year from now.
Focus on Who You Want to Become
The most effective way to change your habits is to focus not on what you want to achieve, but on who you wish to become.
Your identity emerges out of your habits. Every action is a vote for the type of person you wish to become.
You want to be a great developer, but are your actions aligned with that? Cast votes for the type of developer you want to become. Don't just watch a tutorial, code your own project. Take a second to understand code before you copy-paste. Write tests. Write good documentation. Make that webpage responsive and accessible. Finish what you start. People might not notice right away, but if you are consistent with these actions, people will come to know you as a conscientious and effective developer.
Surround Yourself with People Who Have the Habits You Want
The normal behavior of the tribe often overpowers the desired behavior of the individual. Most days, we’d rather be wrong with the crowd than be right by ourselves.
We tend to imitate the habits of those around us. If you want to be a great developer, surround yourself with great developers. Join online communities or go to meetups and conferences. On days when you don't feel motivated, seeing people around you accomplishing things can be enough to push you to keep developing those habits you want.
The Goldilocks Rule
The Goldilocks Rule states that humans experience peak motivation when working on tasks that are right on the edge of their current abilities.
We tend to lose interest in tasks when they are too easy or too hard. Especially when starting a new habit, you want to make sure it's easy enough that you won't give up, but not so easy that it's boring. You should look for the sweet spot between boredom and failure.
Keep this in mind when deciding what technology to learn or what app you want to build next. Building a portfolio project that uses tech you already know well isn't going to keep you interested. Trying to build a complex SAAS application with multiple new frameworks, tools, and libraries at once is going to be too daunting and challenging to complete. Instead, try building something where you can apply what you already know, plus one or two new things you'll need to learn.
Look for Where the Odds are In Your Favor
Learning to play a game where the odds are in your favor is critical for maintaining motivation and feeling successful.
While it is totally possible to become great at something that is not a natural talent, you're much more likely to stick with a habit that aligns with your natural abilities. For example, Michael Phelps is a great swimmer not only because of all of his consistent hard work and training but also because of his height and build. His body type set him up to achieve success more easily than others, and more success leads to more motivation to keep going. That said, your genetics and natural abilities will only take you so far. The rest requires effort on your part.
Genes do not eliminate the need for hard work. They clarify it. They tell us what to work hard on.
How can you apply this? Ask yourself these questions to find the areas that you are most likely to find success in.
- What feels like fun to you, but feels like work to others?
- What makes you lose track of time?
- Where do you get greater returns than the average person?
- What comes naturally to you?
Maybe you notice that a lot of developers really struggle with design, but for you, it is fun and exciting. Or maybe you enjoy writing algorithms to solve complex problems, whereas other developers dread it. Find ways to incorporate your interests and natural abilities into your work. Software development has many career paths. Set yourself up for success by looking for the path that will keep you motivated and loving what you do.
The Danger of Creating Good Habits
As a habit becomes automatic, you become less sensitive to feedback. You fall into mindless repetition. It becomes easier to let mistakes slide. When you can do it "good enough" on autopilot, you stop thinking about how to do it better.
Once you develop a strong habit, you no longer need to put in conscious thought when performing it. As a developer, this poses some risks. It becomes much easier to make silly mistakes when you're mindlessly writing some code on autopilot. You'll solve a problem the same way you've solved it hundreds of times before, without even stopping to think about if there might be a better way.
To protect yourself from this, occasionally review the things you do mindlessly. Work with other developers and notice what they do that you would have never thought of. Don't let your habits make you inflexible to change. Just because it's the way you've always done it doesn't mean it's the best way.
Look for Your Next 1% Improvement
Can one coin make a person rich? If you give a person a pile of ten coins, you wouldn't claim that he or she is rich. But what if you add another? And another? And another? At some point, you will have to admit that no one can be rich unless one coin can make him or her so.
Think of the most knowledgeable developer you know. Would you have said that they were an amazing developer when they wrote their first line of code? What about the next line? Or the next line? You probably wouldn't. But at some point, they became the person you now think of as an amazing developer.
Writing a few lines of code doesn't feel like much. But eventually, they will add up to you being a much better developer than you are today.