One of the best ways to improve your skills and upgrade your portfolio to get hired, is to work on practice projects.
It's a win:win idea, but let's be honest - time is a resource we all struggle with.
And so the question becomes "Which practice projects are actually worth working on?"
It can be so confusing! There are so many guides out there listing 10, 20, or even 30 projects or more and honestly, who has the time for that?
Even worse, the projects they share will often repeat the same content and so you never learn anything new! It seriously sucks, and so to help you out, I've put together this list of my top 9 Golang practice projects for beginners and beyond.
Better still? These projects start easy and gradually get harder, so you’ll pick up new elements in each new project.
I've broken this list down into 2 paths:
Pretty handy right?
Oh and if you're stuck for time, I recommend you focus on the top 3 projects first to get the most impact for your efforts.
With all that being said, let's dive in...
This is the first of our “can’t miss” projects, and it's perfect for beginners.
Why?
A web scraper is a great project for getting started with Go because it has a small number of steps. Even better still, Go has packages available to help you with these steps!
This web scraper is a terminal (command line) application. It must connect to a web resource, download specified data, and output it to the terminal.
You can grab the package for this here.
Then, once you’ve built the scraper and got it working, feel free to level up your skills by implementing more features.
Scrape more data:
example.com/blog/1
, example.com/blog/2
, etcAdd CLI arguments and flags to allow the user to customize the application:
Implement rate limiting per domain so the user doesn't get blocked if they make lots of requests
Cache pages so subsequent runs don't need to download the same page again:
The 2nd of our ‘can’t miss projects’ to complete.
Credit cards will often use the Luhn algorithm to confirm the validity of a credit card number. First, implement the algorithm as a microservice and then expose the functionality with a JSON API.
This project is a web-enabled micro service. It accepts a credit card number in an HTTP request before returning a response. The response indicates whether the number is valid according to the Luhn algorithm.
Implementing this project requires a series of steps that looks something like this:
GET
requests having a JSON payloadYou can grab both of the packages for this project below:
You can also add functions to identify credit card numbers used by global payment networks such as Visa, MasterCard, and American Express:
The 3rd and final of our ‘can’t miss’ projects, and it’s a big one!
This is actually the main project inside of my own Go Programming (Golang): The Complete Developer's Guide course.
This desktop GUI project will show you how to use Go’s standard library and structure a large project across multiple packages. You’ll then create a pixel art editor featuring multiple dialogs, pixel painting, color selection, and pan/zoom.
As well as developing your skills and gaining real-world experience, you’ll end up with a project that’ll look great on your portfolio. It truly is a win-win all round, and it’s actually a ton of fun.
You can check out the course and project here.
The course is designed to walk through absolute beginners with no coding experience to the point of having the skills and confidence to get hired.
This means it's a fantastic project for all skill levels, and zero barrier to entry - that’s why I created the project!
Sidenote: These are the top 3 practice projects that I recommend to help you get a broad understanding with Golang.
If you work on just those projects alone, you should have some impressive portfolio work that you can share with prospective employers. But remember, other people are seeing this post too so the more customized you make these projects, the more you'll stand out from other candidates.
Also, if you want to go a little deeper and get even more practice (and really stand out), here are a few extra projects that you can try.
As you probably already know, databases are a critical part of applications, and it’s what we’ll be working with.
So let me explain:
CRUD is an acronym for "Create, Read, Update, Delete", representing the basic operations available when working with a database.
This project implements CRUD operations on a database and exposes the operations through a JSON RESTful API.
While CRUD may use any interface such as web forms, CLI, GUI, etc, using a JSON API is one of the easier ways to expose the operations to an interactive user-layer.
The information saved in the database can be whatever is interesting to you.
It doesn't matter if its comic book information, movie ratings, sports scores, or weather reports. All that matters is that you write an application that can create, read, update, and delete data from the database whenever JSON messages get received.
To get started, you'll need to:
Packages you can use:
Level up your skills by implementing more features:
Processing user input is an essential task for applications.
This project is a standalone web server that hosts forms for gathering user information. It should be able to generate forms from templates and gather form responses.
Form data gets submitted from a browser or HTTP client, which the server then processes. The definition of "processed by the server" can mean whatever you'd like it to mean. At a minimum, you should save the data in a database using CRUD operations and then inform the user of the status of the operation.
The topic for this project is open-ended, and you should choose a topic you're interested in. Some examples of data you can process include user login information, survey data, event tracking, geolocation data, reviews of businesses, and asynchronous chatting.
To get started, you'll need to:
Packages you can use:
Level up your skills by implementing more features:
URL shortener services offer a way to take long, cryptic URLs and turn them into easy-to-remember ones.
The project will require implementing a web server with custom HTTP responses, database accesses, HTML templating, and background job processing. It also needs to have high performance to handle traffic spikes if one of the URLs starts trending.
To get started, you'll need to:
Packages you can use:
Level up your skills by implementing more features:
A student management system allows school administrators to manage student enrollments and generate reports. Administrators should be able to perform CRUD operations to work with student enrollment, set grades, schedule classes, and generate reports.
This project is an interactive menu-driven command-line program. The options available for a user should use a numbering system, and users can type the number of the option they wish to access.
For example
Teachers should have an "Enter Grades" menu option, which allows them to enter grades for students enrolled in their classes.
This project has a lot of small parts, so splitting it into multiple layers will help manage the project's complexity:
view
layer with the business
or data
layer. This layer contains all possible actions that your application can perform.To get started, you'll need to:
Packages you can use:
Level up your skills by implementing more features:
grep
is a command line tool for finding matching patterns of text. It can operate on shell input or file input and is great for highlighting what you are looking for in a large amount of text.
The goal of this project is to re-implement the grep
tool using Go.
To get started, you'll need to:
You can use the following package:
Level up your skills by implementing more features:
A replicated memory cache allows quick access to data using multiple servers.
Data gets saved in memory as a key/value pair to any of the cache servers, and then the data is replicated to other connected servers. This process enables servers in any location to serve and speed up requests to different geographic regions.
This project helps exercise your ability to reason about concurrent and distributed systems. The implementation can use eventual consistency, which means servers don't have to stay in sync simultaneously. As long as they eventually all contain the same data, it's working as intended.
Even better? You can run the application in multiple terminal windows to simulate multiple servers.
To get started, you'll need to:
I'm not giving you any packages with this one. As part of skilling up, you need to be able to find solutions yourself and adapt.
Here's a few tips though.
A naive implementation to replicate data can follow these steps:
Level up your skills by implementing more features:
So there you have it. These are my top 9 beginner to advanced Golang projects for you to work on to sharpen your Golang skills and create a kick ass portfolio.
Remember that if you’re stuck for time or want to focus on getting hired ASAP, I recommend you work on the top 3 first. These can have some of the biggest benefits for your Golang development, while also covering a lot of what you need to know and practice.
And if you want a detailed guide on how to get started with Go and get hired as a Go Developer, check out my complete Go Programming (Golang) course here.