DEV Community

Cover image for My Experience with Learning Golang
Preslav Mihaylov
Preslav Mihaylov

Posted on • Updated on • Originally published at pmihaylov.com

My Experience with Learning Golang

So you want to learn Golang?

Great! Perhaps I could help you. When I learnt I'd be joining Uber, I had some time to prepare for the tech stack ahead. One of the key things I had to get onboarded to quickly was coding in Golang.

So I started searching for good courses around the web, which could help with getting me caught up with the language and its paradigms. Some were great, others were pretty bad. And the bad part is, it isn't obvious at first glance.

Actually, some of the most promoted courses on Golang are some of the most useless ones. So learning Go can be quite frustrating due to the lack of good courses out there.

In this article, I will share what good, bad and ugly courses I've encountered in the bumpy ride of learning Go.

Learning The Basics

This section is for complete beginners to programming. Go to the next one if you are already a seasoned professional.

If you're just getting started with programming, I actually think Golang is not the best choice for it at the moment. Partly, because some of its paradigms are the result of accumulated wisdom from programming languages preceding Go.

One would not be able to understand it's philosophy and design choices if one hasn't seen e.g. how Java/Python/C++ work.

Additionally, probably the bigger problem is that there aren't any good "Introduction to Programming" courses in Golang that I know of. The emphasis is on good.

Sure, there are some quite often recommended:

An Introduction to Programming in GO

I haven't gone through this book myself, but I am breezing through it now and what I see is a set of one-pagers for explaining things beginners quite struggle with - for loops, arrays, functions, etc.

This is probably a good way to learn Golang if you already know some other programming languages, but it would get you nowhere as a beginner.

How to Code: Learn Google's Go (golang) Programming Language

This is probably one of the most recommended courses for beginners, when learning Golang. In my opinion, it is quite bad.

The author does a good job of explaining some of the concepts at a beginner's level, but it's far from perfect.

Additionally, the provided exercises to the course are simply rehashes of the syntax of the language, rather than real problems which would help you learn.

If that's the first ever course you take on programming, you'd have a "feel good" feeling that you are doing good and get a big slap in the face when you get a real programming problem to solve.

The Verdict

These are the two courses for beginners I'm most familiar with. As you see, I find both of them bad for beginners.

There are probably more as Udemy's library is full. If you think there are courses for beginners which are better than these, please recommend them in the comments below, I'm quite curious myself.

But my recommendation for total beginners is to start from somewhere else. Go learn Python first (for example) - here's actually a pretty good course for it.

Learning the Basics With Prior Knowledge

If you are already familiar with another programming language and want to learn Golang for whatever reason, the best resources to get you started in this order are:

A Tour of Go

This is a fast-track to learn Go's syntax in a day. It's a great choice for someone like yourself. Go through it to get familiar with it and get started

Gophercises

Among all the resources on Golang out there, this is the one I adore the most. This is not a step-by-step course on how to code in Golang or build some project by typing the stuff you see the instructor type on the screen.

It's a set of projects with concise requirements you have to implement yourself without any guidance. The only thing you get is a video walkthrough of the author doing the exercises himself.

This is the best way to learn any programming language, if you're not a total beginner. Far too many tutorials and courses out there teach you programming with a set of training wheels along the whole way.

This is a course which removes those training wheels and shows you that you can ride the bike yourself!

There is a reason that the majority of courses are not like these - the easier your course is, the more people will watch it. It has to be a "feel good" experience for people to go through it.

But the harsh reality is that programming is not a "feel good" experience and the sooner you realise that the sooner you'll become a professional developer.

If you're interested in something similar, whether because you did all the Gophercises or because you're learning something else, check out exercism.io.

Data Structures & Algorithms Resources

If you start going through DS & Algorithms by completing the exercises in Golang, you'd be killing two birds with one stone.

You'll be learning/refreshing your algo-fu and you'd be learning Golang at the same time.

There are many good resources on this topic. If you're only looking for good exercises (without supplemental lectures), here are some good options:

Those are resources for small, independent coding problems. Any one would do the trick, these are just suggestions.

Just avoid Hackerrank. It's, surprisingly, a terrible resource for studying DS & Algorithms as most of the problems there are tailored for competitive programming, which is very different from what you need from this subject area for professional development.

Unless you're a 12-year old whizz kid, looking to get into international olympiads, you'd just be wasting your time.

Alternatively, Advent of Code is a more complete experience as it encapsulates both general programming skills and algorithm knowledge/skills.

If you have to choose one resource among all of them, choose this one.

EDIT: One of the people who commented on the article recommended this book as an introduction to Go + learning something quite interesting (building your own interpreter).

I've also shared some resources on this domain in the past, so I'd definitely recommend checking out that book as well.

Getting Into Web Development

In most use-cases, Golang is used for creating web applications. Fortunately, there is a great course to get you into this field with the language:

Web Development with Go

This course is from the same author as the Gophercises course. It doesn't take the same approach, though. It walks you through completing a sufficiently complex project from scratch.

Although it is a complete walkthrough, there are plenty of opportunities to get the driving wheel and attempt to implement any part of the project yourself before the author starts it. That's the way I suggest you go through this course.

The worst thing to do is to just watch the course from start to finish. A slightly better option is to do that while coding along.

The best option is to see what you have to do in the upcoming part, attempt to do it yourself, and watch the author do it afterwards. In this manner, it will take you more time to complete the course, but trust me, you will learn a lot more.

Additionally, there is a supplemental book to the online course. My recommendation is to just read the book and ignore the videos altogether. It's the same content, in a different medium. But you'd go through the material much faster.

Building Microservices with Go

Golang is mainly used for building microservices, not monolith web applications. And yet, there aren't any great courses for this that I know of.

There are some which seem relevant, but not any I could definitely recommend. All of the ones I've linked don't have enough students nor do they look complete enough.

The way I've been learning this subject area, unfortunately, is through my experience at Uber. But that experience and knowledge is not available to the general public.

I feel like this subject needs a proper course been made.

Fortunately, it seems the Gophercises author is having something underway. He is teasing for an upcoming course, called Advanced Web Development in Go.

If you're interested in that, you can subscribe to his site and stay tuned.

Conclusion

So there you have it. Not quite what you expected, probably.

Unfortunately, I really think the current landscape of Go courses isn't very bright in comparison to what's out there for e.g. Javascript or Python.

Nevertheless, I hope that with this article, I've helped you avoid some of the roadblocks along the way and get to the final destination faster and more effectively.

Top comments (1)

Collapse
 
danteinferno001 profile image
danteinferno001 • Edited

appliedgo.com/ @pmihaylov try this one.
DISCLAIMER: Paid but Good.