While learning the Go programming language, I did something I have been wanting to do for a long time and created a short "curriculum" of projects to develop when learning a new language. The idea of this curriculum is to progressively expand one's understanding of how to do several common programming tasks in the desired language, and should be agnostic enough to work for almost any language.
I made this list public in a Github repository, and in this post I will briefly describe the reasoning behind it and introduce the initial set of projects.
Reasoning
For many developers, embracing new programming languages is an intrinsic part of the professional journey. While some may comfortably settle into a familiar stack, the evolving technological landscape often rewards those who frequently broaden their linguistic horizons.
While it is possible to become reasonably proficient by fumbling your way around, especially if you already know a very similar language, the results are better when you apply deliberate effort to the learning journey. A mixture of understanding the concepts and getting your hands dirty creating something with the language works the best. This curriculum covers only the second part, you should first have taken a short course or read the basic tutorials of the language to get the concepts and theory.
My initial list has 10 projects, starting from the simplest behavior possible (logging some text to the console) and ending with an application to fully manage a resource. Along the way, it exercises programming constructs, interaction with the filesystem and exposing a service through HTTP requests.
By following this sequence and implementing each project, one can acquire a robust intuition for tackling the vast majority of tasks encountered in any language. This gives the confidence to then use the new language effectively for any project requirement.
A Note On Perspective
This list is heavily shaped by my own experience, as someone who has mostly developed for the cloud and desktop, and with a backend focus. It might not cover several things that are important for frontend, mobile and AI/ML development.
The Projects
I created a public Github repository with the list of projects, and I intend to enrich their descriptions and refine the list as insights emerge from using it.
Here is the initial list, with a short description of what each project contributes:
1. Hello World
Classic first program in any language, just print out the message "Hello World" to the console. This makes you understand how to set up, build and run a project in this language.
2. Current day and time greeting
Print to the console a short greeting informing the current day and time. This allows you to learn how to use the standard library of the language, move away from hardcoded values to start using variables, and string formatting.
3. Guess the number game (CLI)
Simple game in which the application chooses a number between 1 and 100 and the user has to guess it in 7 or less attempts. This introduces handling user input, conditionals and loops.
4. Note taking (CLI, local filesystem)
Start a CLI that reads user input until a certain pattern is entered (such as /exit or similar), then saves all the text entered to a file named with the current date and time to a standard folder - optionally, offer a "view" mode in which the notes already saved are displayed. Focus here is learning how to interact with the filesystem and an initial mode of persistence.
5. To-do app (CLI, database/sqlite)
Application that allows users to create tasks and mark them as done from the terminal. Learn how to interact with databases in the language, a good first option usually being sqlite.
6. Hello World (GUI)
Same as the first project, but now displaying "Hello World" in a graphical interface. This project makes you learn the very basics of creating an UI in the language. Depending on the language, this (and the next two projects) might not be relevant, or be redundant - in a language usually applied in a stack that is graphical by nature, the CLI version of these projects will already teach how to create graphical interfaces.
7. Guess the number game (GUI)
Same as the third project, but now with a graphical interface. Most important learnings here being how to receiver user input in a GUI and how your custom logic interacts with the UI rendering loop (often requires basic multithreading understanding). Depending on the language, might not be relevant or be redundant.
8. To-do app (GUI)
Same as the fifth project, but now with a more sophisticated user experience to edit tasks. The main benefit I see for this project is to give a holistic understanding of a complex end-to-end scenario, going from an user interface all the way to a database and back - after finishing this project it should feel like you can comfortably use this language to solve real-world problems in a user-friendly way.
9. Quotes app (REST)
Web application that returns famous quotes from certain people (can be hardcoded) through HTTP requests, preferably applying the read-only parts of REST. This project allows you to learn how to run a web server in this language, and use your custom logic to respond to requests. I do not see the need to also implement the client part for this project, but frontend-focused developers might see the benefit.
10. Album manager app (REST)
Web application that fully manage an "album" resource - allowing the creation, edition, listing and viewing of musical albums. The challenge with this project is implementing the full management of a resource, including its nested entities (an Album has an Artist, a list of Musics, etc.) and database persistence. It serves as a capstone - if you are able to do this, you should feel confident to say you are proficient in the language. Most entry-level jobs would have very similar (if not lesser) expectations, and if you reached this stage it should be very easy for you to go after any subsequent knowledge as the need arises.