Learning Programming through Projects

March 11, 2021, 9:52 p.m.

One day, I had a conversation with a friend about learning computer science, or more specifically learning programming. She said that she wanted to learn programming, but had no idea where to start. She didn't know what to learn, how to learn, and where to find the necessary information. In short, she was lost before she even started. The answer I gave at that time, and the topic I'll be writing about in this blog post is to learn by doing projects.

The very simple reason why this method works is that it gives you an idea of where to start. You won't ever feel lost if you learn programming through projects. The steps are as follows:

  1. Think of something you want to do through programming. It could be anything: a personal website (like I did), a program that sends you a message when a new video of your favourite youtuber gets posted, or even something that combines hardware with software, like an LED that lights up whenever you receive an email.

  2. Break the project up into general steps. For example, using the example of sending a message when a video gets posted, the general steps would be:

    1. Check if a new video is posted

    2. Send a message from the program to my phone if a new video is posted

  3. Start learning! Now that you have a project in mind, the simplest thing to do is to search on Google to learn how to do things. A simple search of "how to get information from a website" or "program that checks website for updates" can get you a long way. You'll learn about web scraping, automatic scripts (daemons), and even a programming language like Python which you need to implement the program.

The main benefit of learning through projects is that you know your final destination. It doesn't matter as much how you get there, you'll certainly learn a lot no matter which method you use or which programming language you code in. The main thing is that you have a project that you want to complete, and you're willing to learn one step at a time to bring your ideas to fruition. Even if you don't know how to get to the final product, it's easy to at least picture the next step: what do you need to do to get one step closer?

Another benefit of project-based learning is that it gives you the motivation to keep going. Working on a project that you're fundamentally excited about, that you can't wait to create, will keep you motivated to persist through all the inevitable bugs and errors that you will have to solve. Without a project, it's very easy to get lost and simply give up. For example, following an online course is good and all, but without any idea of what you're going to do with the things you learn, it's very easy to feel frustrated and give up. Programming is like all things in life: you need a purpose to keep you going.

Let me use a personal example to illustrate. My aim was to develop a personal blog that I can post and continuously integrate new features on. However, I had no idea what I was going to learn. But I knew it was going to be something along the lines of web development, so I had a look at different frameworks and APIs that are commonly used to develop websites, and narrowed down to 3: the MEAN stack (in Javascript), Flask and Django (in Python). All this was a simple matter of searching "web development frameworks". In the end, I settled quite comfortably with Django, as it was meant for python, a language I'm familiar with using, and is more powerful and flexible than Flask despite the relatively steep learning curve.

The next step was another simple google search: "How to code a blog in Django" and "web development in Django". The internet has enough resources to teach you practically anything (this is doubly true for programming related things), and I soon found an online course (CS50 course on Web Development with Python and Javascript) that used Django for web development. After spending a week or two watching all the lectures in the entire course, I knew where to start, and could quite easily get the basic structure of the website going.

The process after that is basically a repeat of what I did before: don't know how to do something? Search it up on google. Read the documentation, go on stack overflow. Learn the necessary stuff required, then implement that on your project. Iterate this over and over again, and I soon had a good looking, functional website I could call my own.

Do you see the advantages of learning through projects now? You go from something as vague as "I want to learn programming" to having a tangible idea of what you want to make, then take one step at a time to get there. Instead of searching blindly for online courses and websites, contextualise your learning by having an end goal in mind: "I am learning x so that I can do y". This way, not only will you learn programming better, you might even end up learning things that you never anticipated! For example, I had to learn about Django tags and tag managers when coding my website. If I were to learn Django on my own without a project to guide me, I'm sure that I would never have gotten around to it.

Therefore, I urge you to try this method out if you want to learn programming. Take a piece of paper, and write down everything you might want to do with programming. It's fine if there's already an app or website that does what you want: you're mainly there to learn, and it's nearly always better to have developed something yourself because it means that you have more control over what it does. You would be able to add features catered to you specifically, and you would also never bump against a paywall in order to get some extra feature. So don't be afraid! Just think of an idea that you really want to see come to life (make sure it gets you excited), and a few google searches would send you well on your way.

Comments

Write a Comment

Name

Body

Andrea April 25, 2021, 12:53 p.m.
Ahhh yes! I've always want to learn more about programming but either stop half way in a online course or don't know where to start. I learnt programming from doing a text classification project recently and it really worked. I was so happy when the program ran smoothly and gave me expected results.
Arina March 16, 2021, 10:26 p.m.
Love this so much💕💕💕 look forward to seeing more posts in the future✨
Vickyyyy March 16, 2021, 10:23 p.m.
I wonder who that friend is? I’m so interested😏 This post is rlly goodddd🥰🥰🥰
Francesca March 16, 2021, 10:23 p.m.
This is super helpful! Thank u so much! Will definitely try ur method one day!