Learn To Code Through Projects, Not Courses


(Or learn anything, for that matter)

“WE ONLY KNOW WHAT WE MAKE.” - GIAMBATTISTA VICO (PHILOSOPHER)

🖥 Why learn to code?

Learning to code is a really valuable skill. You can use it to build things that impact the world. And it’s a desirable skill in the current job market.

But it’s not easy. It takes a long time to learn.

There are different approaches you can take, with stacks of different courses and bootcamps available.

However, I think your focus should be on self-designed projects. Here are 6 reasons why:

🥅 (1) Projects most accurately replicating the end goal

At the end of the day, what is the purpose of learning to code?

The exact end goal will vary, but in a broad sense for many it will be:

Your aim should be to build the ability to do that, as soon as possible.

Courses are great for getting a foundation of understanding. They can help you know what’s possible. But they will only take you so far.

In a course environment, things have been deliberately simplified. Your code gives the same end result as the instructor – success!

However, you will only start to learn the additional complexities when you do your own thing. What languages and libraries should I use? How best to clean my data? How can I integrate data from one source with another?

You can only build these skills outside of the ‘classroom’ environment.

🥳 (2) Projects can get you through The Dip

The quickest way to learn something is to enjoy it. The moment it switches from “I should probably do this” to “I would like to do this” is when the real progress starts.

Learning to code can be exciting, particularly at the start when everything’s new.

But it can also quickly get frustrating. There are times when you just can’t figure out why your code isn’t working. Or you spend ages just trying to configure your coding environment or install a new library.

If you’re learning to code in your free-time, and don’t have any true “skin in the game”, it can be easy to give up. Seth Godin calls this The Dip.

What’s the best source of momentum to get through The Dip? Fun.

And that fun comes from play. Making projects are the way that you play with code.

A project enables you to try something new. To venture into the unknown.

It’s an experience you can’t get from an online course. Thousands have written that code before and thousands will after. The code will probably end up somewhere in a folder on your computer, and never be used in the real world (unless you adapt it for your own projects).

And solving your own problem is always going to be more engaging than solving someone else’s.

🛤 (3) Projects help you track progress

Seeing your improvement is a great source of motivation.

Learning through a series of projects is a great way to track that improvement.

It’s really satisfying to look back on an old project, and instantly see 100 ways you could improve it. Those things are obvious to you now, but they weren’t back then.

The progress from courses is less clear. You may have a certificate, but it doesn’t demonstrate to yourself the extent to which you still know the content.

I’d highly recommend spending a little bit of extra time to keep track of your projects and learnings.

I’d suggest including:

  1. a timeline of all projects (including those you didn’t finish)
  2. the code itself, or reference to where you’ve kept it, and
  3. thoughts, challenges and key learnings from each project.

With time, this can become a really invaluable resource, for you and potentially for others.

I use Notion to track the projects (but a plain-old word document would do fine). For the code, I use GitHub. (If you don’t have a GitHub account, I’d recommend signing up and starting to upload your code.) You may not feel confident in your code right now, but you can always (i) put the code in a private repository or (ii) delete it later.

🛠 (4) Projects can be useful

For me, the end-goal of coding should always be to build something useful.

This may feel out-of-reach at times, particularly early on.

But what about trying to code something that’s useful for 10 people? A simple website for a local society? A tool to find articles on a niche topic? Code that automates a simple, specific task?

One early project of mine was enabling students to share academic resources via our college medical society website. Another project, while I worked as a psychiatric doctor, was for my community mental health team. It performed a simple search over data in Excel to identify what physical health checks were required for each patient.

Or how about writing code that’s useful for one person? What part of your life could you write code to help with?

I made my Job Web Scraper because I was tired of manually checking different job listing websites. Similarly, I made my Intentional YouTube Video Finder because I didn’t like being at the mercy of the YouTube algorithm and wanted a way to find videos that were valuable to me.

Of course, it’s going to be difficult to make truly valuable or scalable projects when you’re starting out. You’re not going to make the next AlphaGo after completing your first online course.

But view it as an iterative process. With each new project, you build on top of knowledge from the previous, and incrementally add more value.

And don’t forget – we don’t code in a silo. You can adapt someone else’s code to a new situation and provide value to a new audience. And likewise, others can build on top of the code that you share.

🧾 (5) Projects keep you accountable

If you know you’re going to share your code, you’ll want to make it good.

Making a project for someone else to use or that you will share in the public domain is a great way to keep yourself accountable. It will help you to go the extra mile.

Further down the line, this accountability arises naturally; you have an employer or customer expecting good code. But before you reach that point, you have to establish the accountability yourself.

🚪 (6) Projects can create opportunities (even ones you can’t predict)

Here are only a few of the added benefits from making and sharing projects:

Other people can use the code. This is really cool. Good code is not a finite resource. After sharing my YouTube Video Finder, other people built on it further.

You can make money. I’ve been contracted for work based on code I’ve shared. And a project portfolio can play a role in getting hired for full-time jobs.

You may inspire others. Many of my project ideas have come from things I’ve seen others do. It can also be inspiring to see the journeys that other people take.

I didn’t upload my early code because I didn’t think it was good enough. I’ve now gone back and uploaded it all, in case that bad code can help inspire others to get started. I’ve shared a timeline of all my projects and code repositories here.

🏁 Get Started

I hope I’ve convinced you that projects are the way to go.

Courses certainly have their place. But you need to get off them as soon as possible and get onto the real learning (ie. projects).

Need some inspiration? I listed out every project I’ve ever done and what I learnt. I also recorded a “Coding for Medicine” Tutorial series, which tackles different medical problems with code.

Need some technical advice? Drop me a comment below or tweet @ChrisLovejoy_ and I’ll share my thoughts.

The possibilities for making cool things with code are endless - let’s get started! :)

🤩 Enjoy this article?

Subscribe to my newsletter for updates on my projects.


Many thanks to Luke Harries, Abdel Mahmoud and Alok Suresh for feedback on this article.