Full transcript of “2-Minute Rule to Learn Coding - Atomic Habits”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:00 Do you ever feel like you are just watching online video tutorials but not actually getting closer to becoming a Software Engineer? You always tell yourself that this time, you are going to finish the online course you started. But when you actually sit down to learn coding, it just feels like any other boring task like washing dishes or doing laundry. And you find it impossible to make any progress. So, the question is “How do you stay motivated when learning to code?”. And that’s where Atomic Habits by James Clear comes in. If you have not heard about this book, you are probably not into self help books at all. This book answers questions like What are habit loops? How to prime your environment to make progress on your goals? And How to use Dopamine Spikes to stick to good habits? By answering all these questions, I will show how you can build the life changing habit of learning programming. Let’s do this. Imagine a plane taking off from Los Angeles for New York. Just before the take off,
0:46 the pilot accidentally changes the flight path by 3.5 degrees which is almost negligible. It’s such a small change that neither the cabin crew nor the passengers notice anything. When the plane lands, the passengers find themselves doing a sniff test because they are walking on the clean streets of Washington DC instead of New York. The point is that very small changes can completely change the trajectory of our lives. And just like the cabin crew and the passengers, we do not see the immediate results of these changes. But in the long run, the effect of these tiny changes compound and the final outcome can be very different. As a new programmer, you would think that you need to build something revolutionary to make it into the tech industry. But in reality, all you need to do is take small steps towards your goal everyday and you will be there before you know it. Keep scrolling Instagram or watching Youtube and you will be no better programmer than today in one year. Build tiny atomic habits that help you learn
1:35 programming every day and you will be very close to landing that Software Engineer job in one year. Building habits is fine but sticking to them is where the real challenge lies. That’s because you might not feel that your programming skills are improving from day to day. When you start learning programming, you expect to see a linear improvement. But here is what actually happens. In the beginning, you will not see any results. James Clear calls this part of the graph “The valley of disappointment”. This is where most people lose motivation, give up and go back to their old habits. But in reality, the returns for your effort are actually delayed. Once you go past this initial phase, you will start feeling like a superhuman. Learning a new language, building projects and getting a job you want will suddenly start coming naturally to you. And when you look back at that first piece of code you wrote, you will definitely laugh at yourself. My wife and I still make fun of the first portfolio website I made, to this day. By the way, that's
2:24 not the website I made. I am too ashamed to show my website but I will just say this. The website I made had this rotating cube where each side of the cube had the name of one of my tech skills. Anyway, in the rest of the video, we will not just learn how to build these atomic habits but also how to stick to them. Let’s start with how to build the habit of learning programming. Before I can answer that, we first need to understand how we build any new habit. And that’s where “Habit Loop” comes in. Cue, Carving, Response, Reward. That’s the loop that builds any good or bad habit that we repeat over and over again. Let’s understand the habit loop with the help of a bad habit that we all suffer from. The phone vibrates, that’s your Cue. You crave to see who the notification is from. Response, you pick up the phone. And the reward, 30 minutes of Dopamine release scrolling Instagram. Cue, feeling bored with the video tutorial. Craving,
3:11 want to see something entertaining. Response, pick up the phone. Reward, watched entertaining Mrbeast videos for another hour. Soon, your mind starts making associations between watching youtube when you're getting bored with the tutorial. And you end up building the bad habit of wasting your time during your programming session. But can you use the same habit loop to build good habits? Let’s start with the Cue. When you want to learn programming, what is that one thing that you need with you without which you can not even start your lesson? No, I am not talking about a cup of coffee here. I am talking about your laptop. Can you use your laptop as your cue and guilt you into learning programming? The answer is Yes and that’s exactly what James Clear recommends in Atomic Habits. He suggests you should make your cue unmissable by placing it in the middle of your room - in full view. Even better if you can place it where you waste the most amount of your time. If you play a lot of video games,
3:58 place it near your gaming chair so it’s visible when you start a new game. Cue alone would not be sufficient, you also need to use implementation intentions to your advantage. Studies have shown that often why people don’t stick to good habits is not because of lack of motivation, but because they don’t have clarity of what they want to achieve. When you say “Tomorrow, I will learn programming”. It’s just an intention that has no clarity. So, instead of saying that, you should attach an implementation plan to your intention. So, instead of just learning programming, you should say something like “Everytime the alarm goes off in the morning, I would get up and do a programming lesson for 2 hours on my desk”. By making this small change, you will provide your mind clarity on what to do right after you wake up. Another way to do the same thing is by stacking habits. Stacking habits simply means attaching the new habit you want to build with a current habit. So,
4:43 instead of doing a programming lesson when the alarm goes off, you would say something like “Right after I brush my teeth, which I hope is a habit you have already built, I would do a programming lesson for 2 hours on my desk”. If you stack habits like this, you are more likely to stick to them if you practice them long enough. And don’t forget to place your laptop in the middle of the room for this to work. Cue along with implementation intention will give you the motivation you need to start learning programming. But, this motivation by itself is not enough to keep you going. That's because we humans don’t do things for which we get nothing in return. To understand why that is, we need to first learn about the motivation hormone, Dopamine. In 1954, neuroscientists did a study where they blocked the release of Dopamine in lab rats with the help of electrodes. And what they found was astonishing. Without Dopamine, these rats lost
5:29 their will to eat, drink or reproduce. And as a result, all of them died. This sad experiment tells us how important Dopamine is for motivation and here is how it affects us humans. Dopamine is released every time you swipe up on an Instagram reel. And the same Dopamine is also released when people do drugs. In both cases, Dopamine is responsible for creating the cravings that make us perform these bad actions again and again to a point where these actions become our habits. But can we trick ourselves into using the same Dopamine to build good habits? Before I answer that, if you want to give me a huge Dopamine spike, you can subscribe to the channel. Moving on, an engineering student from Ireland named Ronan managed to use Dopamine to his advantage. Ronan wanted to become fit by exercising more but he could not find motivation to workout. Instead he would spend hours watching
6:15 Netflix. So, what did he do to exercise more? He combined the two. He connected his bike to the laptop and wrote a program that would let him watch Netflix only if he was cycling above a certain speed. This is called Temptation bundling. You take something that you already enjoy doing and use it as a reward for the habit that you want to build. Here’s how you can use temptation bundling to help you progress in your programming lessons. You can write a program that tracks the amount of time you spend in your code editor. This program can then use this time to control the amount of time you get to spend on your phone. By doing this, you can directly tie learning programming to a habit that you already enjoy doing. If anyone in the Power Community wants to take up the challenge to build this program, let me know in the comments. I will make sure to share your program with everyone in the community. Another thing that can help you build the habit of programming is “The 2 minute rule”. When you
7:01 set unrealistic goals for yourself, it becomes very difficult to stay motivated to work on them. James Clear recommends making habit building easy by taking small steps every day. He recommends starting with only 2 minutes a day. For example, if you want to build the habit of reading more, you can start by reading just 2 minutes a day. And if the book is interesting, you will be reading much more than that in no time. For programming in Java, that would mean writing this “public static void main'' function. And that would do us no good. So, here is what I recommend: “2 exercises a day”. And if you stick to it for 30 days, I am very sure that you will be doing much more than 2 exercises in a day at the end. If you are willing to take this as a challenge, write “#30DayChallenge” in the comments. Come back after 30 days and post a reply to this comment to share your progress. I’ll be waiting. Building the habit to learn coding is one thing, but being efficient when learning to
7:47 code is even more important. If you want to know how to learn more in less time, watch this video. My name is Sahil and I will see you in the next one.