The Complete Guide to Learning Go

Learning to program can be both challenging and terrifying. Not only are you starting off on a challenging task, but you are often doing it without a map to guide you. While I can’t make learning to program easy, I can help you evaluate the Go resources out there and determine which of those will be suited for your needs.

Everyone learns differently, so I can’t promise that you will love them all, but I suspect you will like most of them and will be able to find plenty that do meet your needs.

This guide is also intended to be helpful to pretty much anyone learning Go; that means both absolute newbies and experienced developers should both be able to find useful resources and a path to success.

Learning Go with Programming Experience

If you have programming experience, I would first suggets starting out with the Go Tour - https://tour.golang.org/welcome/. This will help get you familiar with the syntax in Go and is a nice quick introduction. While the tour is great for experienced developers, I don’t feel like it is great for newbies so keep that in mind.

After that you have to decide what you think is best. You can jump down to the Getting Help section and move on from there, or you can look at some of the resources in the next section and read one of them. For instance, Applied Go’s Master Course is a great way to learn a lot more about the language and would give you a big step up as you move on through this guide, or you might be more comfortable jumping to the books, courses, and exercises mentioned in the Improving as a Developer section of this guide.

Learning Go with Minimal Programming Experience

If you are looking to learn how to program in general, the biggest piece of advice I can give you is to simply program a lot. It doesn’t matter if you are writing silly programs that are useless or building trivial number guessing games. Your goal at the start shouldn’t be to write the most elegant code, or to build the biggest, baddest web application, but simply to become familiar with the language, the syntax, and the tools you are using. This also means that you shouldn’t be copy/pasting code you find in tutorials or courses, but instead should try to code everything yourself even if reading it from a video or book. Actually writing the code will help you learn it much faster than copy/pasting it.

It is also worth mentioning that oftentimes when learning new material, not everything you are learning will sink in right away. This is where repetition and persistence will truly pay off - you have to stick with it and keep practicing and slowly those concepts will start to “click.”

A great example of this is the way Mattan, a co-founder of One Month, learned web development by forcing himself to complete four large Rails tutorials in one month. Each course took him about a week to finish, and when he talks about it he admits that there were sometimes things he didn’t quite understand, but every time he went through a new course it improved. By the second course he understood enough about programming and the language to start to pick up on slightly more complex topics, and he continued to understand more each pass.

Learning to program is often done this way - you sometimes just have to do things you don’t quite understand so that you can eventually get to a point where you can come back and understand it all. It sounds weird, but it is true.

Now enough talk - let’s jump into resources that I feel are helpful for getting started with programming and Go.

You don’t need to read/watch all of these resources, but if you do I promise you will have a pretty solid grasp of all the basics in Go, which will prepare you to start working on projects and developing your skills as a programmer. While doing this, it is likely that you will run into issues and need help, which brings us to our next section.

Finding Bugs and Getting Help

Assuming you have a little programming experience and have started coding pretty much anything, you are going to run into issue. You will encounter a bug you can’t fix, find odd behavior you don’t understand, or something else along those lines.

When that happens you should definitely try to solve the problem on your own. Learning from your mistakes is a major part of learning to program, as is getting better at Googling for help. Once you have tried to help yourself you can move on to asking for help.

Finding Answers on Your Own

The first step to solving an issue is to slowly walk through the execution path of your code and to explain what is going on at each step. You don’t have to explain it to anyone, but it is important to stop and make yourself evalutate what it is actually doing, not what you think it is doing. Some people call this “rubber ducking,” which stems from a programmer explaining his code to a real rubber duck.

Once you have walked through the code path, if you still can’t see what is wrong then try to at least isolate where the issue is occurring. That is, figure out when your data stops being what you expect, or where in your code you are getting an error you don’t expect. From there see if you can find anything useful to Google. For instance, if you are seeing a specific error message, try searching for it with quotes around the generic parts and looking at any Stack Overflow or similar articles that you find. This is by far one of the simplest, yet highly effective techniques that experienced devs will use.

If after doing all of this you still can’t figure out the issue, then it is probably time to ask for help.

Asking for Help

If you are just getting started with Go, the first thing you will want to know is where to turn when you get stuck. We will get there in a moment, but first I think it is good to lay out some ground rules and discuss how to get the best help possible.

For starters, make sure you tried to solve the problem on your own. That is covered in the previous section, and it is super important.

After that, try to create the smallest version of your code possible that still replicates the issue. Ideally you want as few lines of code as possible while still being able to share runnable code that illustrates your issue. You will want to include all of this when you ask your question.

I also recommend including what you have tried and Googled already; not only will this let people know that you have tried to solve the problem on your own, but it will also prevent them from trying the same things and wasting their time. Remember, it is a human on the other end of those forums helping you, so anything we can do to make it easier for them to help us is always appreciated.

Finally, try to keep your questions as specific as possible. Nobody likes helping someone who posts, “How do I write a program that does X.” It just feels like the person asking the question didn’t try anything on their own and just wants us to do their work for them, whether it is homework or another type of work. Questions that are too vague, or require a massive amount of effort on other people’s part are way less likely to get answered, so asking a short and simple questions - even if you have to ask followup questions later - is a better path to success.

Okay, now that we have a proper question to ask, here are some places to ask it:

Improving as a Developer

Okay, so you know how to code some basic stuff and you know how to ask questions. Now the question is, how do you continue to improve as a developer? How do you get beyond those trivial apps and into the realm of building real projects?

Learning the syntax of a programming language is relatively easy - that’s why we have so many “Learn X in 30 days” books - but actually becoming an experienced developer who understands how to design and implement a complex solution takes time and practice. Go isn’t just new syntax that you can master in thirty days. Sometimes the best way to solve a problem is non-obvious, and it is important to continuously learn from others and to adapt as your requirements change. As a result, my general advice for improving as a developer is to spend at least 50% of your time coding things, while spending maybe 25-50% of your time learning from external resources in order to learn things you may not think of or encounter naturally.

What resources you reference depends on what you are interested in and the medium you prefer. Some developers prefer shorter tutorials, articles, and the standard docs and piece them all together on their own. Others prefer larger books and courses, and finally some developers prefer to look through the source code of larger projects to learn how those teams are tackling problems. Rather than trying to pin you into one of these, we will cover a little of each.

Exercises and Tutorials

We’ll start off with exercises and tutorials that you can code along with, and that ideally aren’t incredibly large. These are typically great when you don’t know what to build and just want to get a wide variety of different types of projects under your belt.

Courses and Books

While exercises and tutorials are a great way to learn a new language, they typically only focus on smaller scoped lessons and problems. For instance, it would be incredibly hard to teach someone everything there is about testing in a few short tutorials, but this would be a great subject for a book or course that spans many hours of content. In this section we are going to cover some courses and books that would be useful for any budding Gopher.

Official Resources

Many people will suggest that you check these out before almost anything else, but I have mixed feelings on that feedback. Several of the resources, like The Go Tour, are great for experienced developers to dive into, but if you are relatively new to programming most of these resources are likely to go over your head and just confuse you, or at the very least be less effective than other resources.

That said, you should eventually check out each of these resources. They will help you truly understand the Go language.

Blogs and Reference Material

When joining a new development community, it is often a good idea to find out which members of that community write a blog and figure out which of those you enjoy reading. While books and courses are incredibly powerful in teaching complex topics, they take a long time to create. As a result, blogs are much better suited for teaching about hot topics that arise, or to teach about something that is evolving relatively quickly. They are also a better place to find opinion pieces that will help shape you as a developer, as a blog is clearly composed of a specific author’s opinions while a book or course is often expected to be just the facts.

I can’t tell you exactly which of the writers in the Go community will be a good fit for you, but I have tried to compile a large list of options below. I also included some related material - like the Go by Example website - which aren’t strictly speaking blogs, but can serve a similar purpose.

Mailing Lists

There are also a few mailing lists that will deliver quality articles to your inbox every week, making it easier to discover great content and new authors on the Go community.

And here are a few mailing lists that aggregate posts from various authors.

Common Questions

Below are some of the common questions I get asked from people learning Go.

What Editor Should I Use?

If you are looking for an editor, here are the good ones I know of:

How Do I Debug in Go?

If you need to debug a Go program, the first thing I would suggest is using print statements. For simple bugs this is often plenty to figure out where your logic is going wrong. If you have a complicated enough situation you can also find extensions/plugins for nearly every editor or IDE that uses Delve.

How Do I Enable Dynamic Reloading?

I get asked this one a good bit, so I’m adding a small section for it.

If you want to dynamically reload your code every time it changes, I have found github.com/pilu/fresh to be the simplest way to get this working. It isn’t perfect, but works well enough to serve my needs.

I have a video where I introduce this on youtube. It is part of my course sample, but it works as a tutorial on its own as well.

Learning HTML, CSS, JavaScript, Git, Command Line, etc

If you are looking for resources to help get you started with these topics I recommend that you check out one of the following.

Learn Enough to Be Dangerous

Michael Hartl created the Rails Tutorial, which is generally considered one of the best resources for learning Ruby on Rails.

His latest creation, the Learn Enough to Be Dangerous series, covers the command line, text editors, Git, HTML, CSS & layout, and will eventually cover JavaScript.

Reddit

There are subreddits for almost anything you want to learn. I would suggest checking them out for ideas of other resources you can leverage.

JavaScript Patterns

I am told JavaScript Patterns: Build Better Applications with Coding and Design Patterns is a good book, but I haven’t read it.

The link goes to Amazon with no affiliate program, but it does use smile subdomain.

Learn to Code HTML & CSS

This is supposed to be a good tutorial for getting into HTML & CSS, but again I haven’t read it. I am just trusting it based on reviews from others.

Learn CSS Layout

This is a really cool interactive demo once you are familiar with basic CSS. Namely, once you understand what selectors are this is an interesting and useful read.

What the Flexbox?! and CSS Grid

I haven’t taken this course, but if you are interested in learning more about CSS Flexbox or CSS Grid all of Wes Bos’ material is always great.

Learn Web Development with Go!

Sign up for my mailing list and I'll send you a FREE sample from my course - Web Development with Go. The sample includes 19 screencasts and the first few chapters from the book.

You will also receive emails from me about Go coding techniques, upcoming courses (including FREE ones), and course discounts.

Avatar of Jon Calhoun
Written by
Jon Calhoun

Jon Calhoun is a full stack web developer who teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.

Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.

Spread the word

Did you find this page helpful? Let others know about it!

Sharing helps me continue to create both free and premium Go resources.

Want to discuss the article?

See something that is wrong, think this article could be improved, or just want to say thanks? I'd love to hear what you have to say!

You can reach me via email or via twitter.

Recent Articles All Articles Mini-Series Progress Updates Tags About Me Go Courses

Β©2018 Jonathan Calhoun. All rights reserved.