01 Jun 2018

Five Tips for Learning How to Code

You’ve made your decision to learn how to code and now it’s time to get started. But how do you do it? As a self-taught programmer I’ve been through the struggle of learning how to code and if I had to do it again, this is how I’d do it.

Make It a Habit

We’re creatures of habit and the more something becomes a part of who you are or what you do the easier it is to do that thing regularly. Habits can be good like running everyday but they can also be bad like following up that run with a bowl of ice-cream because you “earned it” with lost calories.

The best method for me to create a habit is to start small. If I decided I wanted to start running today, I would start with 2-3 scheduled days a week where I run no matter what. At first, I know it’ll suck. But after a couple months you hit a point where not running on your days makes you feel bad. I’ve gone running for the past month, why am I being lazy today and making excuses?

Apply the same mindset to learning how to code. Set aside a few hours a few times a week where you do at least one thing related to coding. If you’re just not in the mood to read through a chapter of a programming book that day, it’s okay. Watch a tech talk on YouTube instead!

If this type of method doesn’t work for you, experiment! If you know you may end up saying “I’ll just do it tomorrow” on one of your scheduled days, maybe a smaller amount of work everyday (Jerry Seinfeld’s “Don’t Break the Chain”) will work better for you.

Break up Your Work

You don’t have to be the biggest gym rat to know that you don’t do all of your lifts at once. You typically break up a lift into sets. So you bench press 10 times, rest for a minute, and repeat that 3 times. Why should intellectual goals be any different?

Instead of sitting down to work on programming for 2 hours straight, why not do 25 minutes of work followed by 5 minutes of rest, 4 times? Not only is this mentally less daunting but I think it’s a great way to force yourself to get started on work. When you sit down to begin and you have 2 hours of work ahead of you, procrastination comes much easier than when there’s only 25 minutes.

This technique is known as the Pomodoro Technique. In addition to being a good way to get me started on work, I’ve also discovered it’s a great way to get into flow state. I’ll do my first 25 minute interval, rest, do my second and by the time the timer has gone off for my second break I’m focused enough that I don’t need it anymore.

If you’re looking for a Pomodoro Timer I recommend Be Focused which is available on all Mac products.

If I’m learning a new skill, Pomodoro is a must. But if I just need to do work related to something I’m already good at, Pomodoro is a kick start to get me on task.

The Buddy System

Learning to program is tough enough already if you’re doing it by yourself so why not do it with a friend instead? This will not only give you two brains to try and make sense of new concepts but it’s also more enjoyable and motivating to learn with someone else too.

Group fitness classes have never been bigger and I imagine this is at least part of the reason why.

Learning with a friend will make you accountable to each other which will hopefully make the both of you less likely to quit. It will also provide the ability for the two of you to talk through problems together and share what you do and don’t understand. Even if one of you is learning front-end development while the other is learning back-end, the two still share much in common and the interaction between the two will only help solidify the concepts for the both of you.

The downside to learning with someone else is you need someone to learn with who you know doesn’t suck. You need to find someone who’s as serious about your new goal as you are. So if you do decide to learn with a friend, don’t hesitate to set a high bar for this partner.

Write About It

If you learned a new programming concept that still isn’t 100% clear, write about it.

Do a search on Stack Overflow to see if anyone has questions or is looking for clarification and contribute with your own answer. If you’re wrong, it may lead to a discussion which will help your understanding. If you’re right, you’re making progress and you just helped someone else.

Write a blog post explaining the concept. Writing and explaining programming to others has been one of the most valuable experiences for me. It helps others while pushing me to really solidify my understanding.

Don’t let being new to programming hold you back either. If you started programming last week, there’s someone who’s starting today. A blog post written by a newbie who doesn’t suffer from the curse of knowledge may be exactly what they’re looking for.

Be Patient

Perhaps the most important part of any goal in life is to be patient. Think long term. Pursue programming knowing that consistent, repeated effort towards learning will eventually lead to success. Nothing is going to happen overnight. Learning and progress isn’t linear.

You’ll have good days and bad days. Don’t dwell on the bad days. Accept it happened, try to avoid them if you can, and move on.

The highs and lows of trying something new is just a fact of life. It’s basically a meme. Maybe you’ve seen learning curves like this one for golf.

Learning Curve

The point is that it doesn’t matter if you golf, program, paint, or run. The labels on the curve will be different, but the feeling of the curve will be the same.

Be patient, make your programming goals a habit, and the slope of that curve will trend upwards.


Before you go...

Feeling stuck copying and pasting from tutorials that don't build realistic applications?

Become an Angular developer by building a real application using open-source libraries with a real API and database.

"The advice and techniques in this book landed me my dream job and literally doubled my salary. Well worth the $99 bucks, so much so that I have been waiting for it to be for sale just to pay the man for the good he has done to my career." -Levi Robertson

CLICK HERE FOR A FREE 8 CHAPTER PREVIEW OF THE ANGULAR TUTORIAL

Learning a front-end framework is hard. "Getting started" tutorials cover the basics but you leave thinking, "Okay, now how do I build something with this?"

The truth is, getting started tutorials aren't all that great for beginners. They're demos to highlight as many features as quickly as possible.

They're great for showing off what a framework can do. They aren't so great for teaching you how to build web apps.

The end result is a basic application that doesn't mimick what it's like building real applications as a front-end developer.

You'll work with a mocked API and database. Application architecture isn't covered. Automated testing is skipped altogether.

Trust me, I've been there. But those days are over.

With The Angular Tutorial, you'll learn how to build applications using a real API and database. You'll leverage 3rd party APIs like Zomato, Google Places, and open-source libraries just as you would in a real job.

The Angular Tutorial assumes you have no previous knowledge of the Angular framework. It starts at the very beginning.

Every piece of code is explained and tested to make you interview ready.

Ready to get started? 👇