Go from Zero to Hero: Learning Go when you don’t know how to code

Miriah Peterson
4 min readFeb 4, 2021

I believe the simplicity and cleanliness of the Go programming language makes it a suitable language for first-time programmers. However, things like a GoPath, Dependencies, binaries, CLIs, IDEs, and Git make it hard for someone who has never coded before to just pick up Go in their free time, so I started writing this tutorial for people who have less that one year of programming experience or even no experience whatsoever. It is to help them learn Go and master other tools as well.

I do not have experience in education theory, but from personal experience this course is curated in order to help them learn Go as well as other skills that are useful for landing the first job, deploying the first project, or even just building a portfolio. Here we will go over the sections and tools used to help first-time developers master Go.

Open Source Learning

As experienced developers, we can learn most things online and for free. Blog posts, tutorials, demos, meetups, etc.: these all contribute to our learning via Open Source. But what about first-time developers? Why do we require them to take university courses or bootcamps? They have to pay thousands of dollars just to start off using tools and tech that are not top of the line.

The idea behind this tutorial is to replicate the Open Source blog posts and tutorials, but to make it for beginners. To make it truly Open Source, anyone can contribute to it (I am just waiting for someone to make a Pull Request on Github and finish it for me *cough cough*….that is only half a joke). Hopefully it becomes something that can get people off the ground and ready to tackle projects either on their own or in a workplace setting.

live stream of tutorial prep

The project is far from finished. I have plans and best intentions, but typing words in English is harder that is seems. So here are my thoughts and plans, and with time and some focused effort this can really be something great.

Tutorial Layout

Part-1: Intro to Programming
These are the basics we learn in our first programming class. Developers learn them in boot camps. We have to explain the why to first-time developers. Explain how these concepts are tools in your tool belt that will allow you to start solving harder problems.

package main

import (
"fmt"
)

func main() {
fmt.Println("The bigger the interface, the weaker the abstraction.")
}

There are three parts to this code: the package declaration package main, the imported packages import ( "fmt" ), and the function func main(){ fmt.Println("Hello, playground")}. We will cover in much more detail how each of these three parts is important to your go code, but for now we just want you to run your very first go program. Click on the line with "Hello, playground" and change the text to say "Hello World!" (don't forget the quotation marks). Now press the Run button found at the top of your screen.

Part-2: Using the Command Line
The hardest thing for me was figuring out was my preferred developer environment. I didn’t know what bash was. I didn’t know the difference between a text editor and an IDE. I didn’t know what version control was. In this section we walk through setting up an environment step by step. By the end we should be ready to build a Go program.

Part-3: Write a Go server
We deal with servers and APIs every day. It is part of web development and seems like a good place to start. This is the first full Go program we tackle in the tutorial.

Lots of types of communication happen over APIs. Developers have to create and manipulate APIs all the time. By the end of this section you should be able to spin up a server, connect with a client, and understand the different protocols you can communicate over.

Part-4: Dependencies
This may be commonplace for Java developers, but for new developers, using other libraries and tools is a new concept. We need to tackle questions like: why do we need them? When do we need them? How do we use them? What the heck is a module? What is a license?

Part-5: Checking your Code
Now we need to prepare them for industry best practices. Everyone has their favorite linters, and Go developers are the worst. The hardcore Go users use linters to nit pick all the things. We need to prepare new developers for this.

We want to cover unit testing, test coverage, and how to use that in a project

Part-6: Deploying a Service
I haven’t worked anywhere that doesn’t use docker so this seems like an invaluable skill. We need to cover how to use this to enable developers to deploy projects in a way that seems to be more and more standard in the Go world.

Conclusion

Utah Go User Group Logo

I want to emphasize that a lot of these parts are conceptual. Ultimately, from this tutorial I do have hopes. I hope that this tutorial becomes a place where new developers feel comfortable enough to dip their toes in Go programming. I hope that people who use this tutorial feel like they can contribute to it and grow into part of the Open Source community. I hope that experienced developers give back to helping new people learn. Lastly, I hope that more people who don’t usually have access to traditional methods of learning (university or bootcamps) find free resources like this to learn and grow.

--

--

Miriah Peterson

Data Reliability Engineer, Golang Instructor, Twitch streamer, Community organizer