Studying programming: what to learn next?

Fri 08 May 2020, by Matthew Segal
Category: Programming

A lot of people trying to teach themselves programming have an anxiety about what they should be learning. There is an endless array of options - you've seen these ridiculous lists of online courses, right? There's too much to learn and not enough time! You don't want to waste time learning something that doesn't matter.

This dilemma can manifest as a general sense of dread about the task ahead of you, or it can lead you to ruminate over specific technolgies: should I learn Java or Python? Flask or Django? Which framework is best? What should I learn to get myself a job?

Follow your enthusiasm

I recommend you dissolve this question by learning about things that interest you. Stuff that you're enthusiastic about. Stuff that gets you going. You wanted to learn programming for a reason, right? Why was that - what about it seems cool to you? Work on that!

If you don't know what's cool about programming, then you should explore the landscape: sample lots of things until you find something you like. Try lots of small projects: make a webpage in HTML, do some hacking challenges, learn about databases, or functional programming, etc. You can use this "rabbit holes" technique to pose some interesting questions for yourself.

You might have a goal like "I want to be a backend web developer". I think you can work towards this goal while still learning things that interest you. For example, if you're into hacking at the moment, you can learn about hacking webservers.

It's all just practice anyway

Here's the thing, it doesn't really matter what you learn next, at least not early on. As a beginner coder, you're going to fucking suck at everything you do, so you might as well have fun while you're sucking. Your first few months will just be learning to program, in general, and the most important thing to do is to write a lot of code.

If you're interested in the content you're learning and the code you're writing then you will do so much more practice than if you're just grinding. Conversely, you'll burn out if you're forcing yourself to work on something you don't care about. This isn't some airy-fairy feel-good advice telling you to "follow your dreams" - you will do more productive work if you're interested in what you're doing.

Why is practice so important? In programming there are a bunch of meta-skills that you don't learn deliberately, but you'll learn them by writing a lot of code. I'm talking about how to debug your code, how to find solutions to problems online, how to read documentation. There are "coding muscles" in your brain that you need to exercise. Picking up these meta-skills is more important than knowing some specifc web framework, like Ruby on Rails (RoR).

Here's why: if you try to learn RoR early it'll take you weeks to learn the basics of the framework. You'll struggle to navigate the online documentation and command-line tools. You'll make Ruby language syntax errors while trying to learn framework-specific concepts. On the other hand, you can learn the basics of RoR in a weekend after 6 months of programming. You'll only need to pick up the RoR-specific stuff because you already have a solid background in coding.

Just to clarify: I'm not saying that you shouldn't learn Ruby on Rails in your first week of learning to code. I'm saying that you shouldn't force yourself to learn Ruby on Rails because you're trying to optimise for getting a job in the shortest time possible.

There's practice, then there's practice

A note on "practice". I said that it's important for a beginner, and suggested that writing a lot of code is good practice. I think that's mostly true, but there are some things you can do to get better faster:

  • Deliberately try out new skills and techniques in your work: "in this project, I'm going to try the 'object oriented' style I just learned". In another project you might try the "functional style".
  • Re-visit your old projects and think about how/if you could make them better with your new skills. You'll learn a lot by trying to read the code you wrote a month ago.
  • Try to get some feedback on your code from more experienced developers.

Start by building things

When I said "learn about hacking webservers" earlier, you might imagine yourself reading a textbook on hacking and then reading a textbook on webservers. Maybe that works for you, but I don't like that approach. I think you should start your learning journey with a practical challenge. In this hacking example it might be to complete the first stage of the Over the Wire wargames. There are two reasons for this.

Firstly, you do not know what you need to learn. How could you? Having a practical goal grounds you in reality and forces you to confront your ignorance. Here's an example: I literally did not know what "backend web development" was when I was building my first website (this ~v10). Even so, I wanted new list items to remain on the page after I refreshed it in my browser. To get that to work, I learned a lot about backend web dev: HTTP, APIs, Linux, virtual machines, web servers, JSON, web frameworks, WSGI, etc. I had no idea that I needed to know what a "JSON" was when I set out on that path, but my practical project lead me there.

Secondly, it's much easier to learn things when you have an implementation in mind. If you are building something, then when you need to learn a new concept you'll think:

Hmm, I need to learn more about JSON and HTTP are to get this task done.

You'll be motivated because you will quickly be able to use that new knowledge. Contrast that to someone handing you a massive list of web technologies and telling you to study them all. Do you think you'll be motivated to slog through that list?

To clarify: I'm not telling you not to read textbooks. I'm saying that you should read textbooks after you've found a practical problem that inspires you to learn more. Nand2Tetris is a great example of this. It's an online course where they trick you into reading a textbook by first asking you to build a computer.


Next time you catch yourself agonising over your next coding project, new framework or online course, just ask yourself: is this fun? Will I learn something new? If so, go for it!

If you have any feedback or questions email me at [email protected]