Lots of people are deciding that software is a lucrative field that they want to explore. But I’ve seen lots of my friends decide they want to learn how to program in order to get better job prospects, only to give up on it a few weeks later. What’s going on here?

Here is the advice I give to people who are considering learning to code, either for a career change, or just for fun:

1. Build a project

Some people think that programming languages are cool and fun to learn. Most people do not. Odds are, you fall into the latter camp. And if you go to some website where you can learn programming languages for free, you’ll get sick of it pretty quickly.

So don’t think “Hey, I’ve heard that Python is pretty cool. I’ll learn python!” Instead, think “I’d like to build this cool {website/game/deathray}” - and then figure out what tools you will need to build that! It’s way more efficient and motivating that way. Obviously, if you’re a beginner, start small. For example, you could say “I want to build a personal website from scratch.” Then, the tools you’d need to learn would be HTML, CSS, and maybe a bit of JavaScript. That way, you think of cool things you want to do, and then learn the things that will help you build that thing.

2. Focus on immediate results rather than long-term goals

In the previous point I said you should pick a small project to start. There is research to support the fact that people tend to be better motivated by immediate results, rather than long-term goals. If you pick a project that is too big and complex while you’re still learning, you’ll hit lots of roadblocks early on, you won’t feel like you’re accomplishing your goals, and you’ll get demotivated and quit.

So, keep the projects small and simple at first!

3. Push through the difficult times

Programming is hard. Seriously. There is so much to learn, and even people who have been in the field for years and years are still learning new things every day.

You will face lots of challenges that will make you want to bash your head against a wall. Recognize that this happens to everyone, and do your best to push through it. I often remark that the most important thing I learned from my Computer Engineering degree had nothing to do with the content of the courses - I learned that if I push myself really hard, and don’t let myself get demotivated by problems that seem too difficult, that I can solve problems that seemed almost impossible when I started.

Remember: Imposter syndrome is real. We all experience it.

4. Write down what you learned

At some point during these challenging times, you’ll have a breakthrough and suddenly understand something you didn’t before. Write down your learning! It’s a really valuable exercise that will help solidify the knowledge, and you can come back to it later and see that a) you worked through a difficult challenge and persevered, and b) you may need to actually reference the solution later if you have forgotten how to solve it.

5. If you think you may want a career in software, build a portfolio

Having a portfolio of all the cool projects you have built looks super impressive to potential employers. It shows that you have experience with a range of technologies, and that you have an interest in the field. Plus, if you have written down what you learned, you can share that with interviewers and impress them even more!