Practical Go for Developers: Five Class 4-Hour Deep Dives on Go

Join Practical Go for Developers, an online series of 5 Mix & Match classes (4 hours each) for developers to learn and choose from. Open class & flexible learning.

When: Starts every Tuesday, from July 25th ends August 22nd

Time: 11 am EST to 3 pm EST

Note: When purchasing your ticket, you are only eligible to select the number of classes pertaining to the number of sessions you are looking to purchase. You may select which classes you’re looking to attend, they do not have to be consecutive.

  • ex: 2 sessions purchased - Class 01 & Class 04
  • ex: 3 sessions purchased - Class 02, Class 04, Class 05

Sessions

Class 01: Go Foundations: July 25th, 2023

Class 02: Structs, Methods & Interfaces: August 1st, 2023

Class 03: Concurrency: August 8th, 2023

Class 04: HTTP: Monday, August 14th,2023

Class 05: Project Engineering: August 22nd,2023

Important: Upon completion of each session, there will be a video recording available for download within 48 hours. An email with instructions to access them will be sent.

Classes Curriculum

Class 01: Go Foundations

When: July 25th, 2023

Difficulty: Beginner

In this session, we’ll cover the foundations of writing Go code. • You’ll learn about program structure, running & building code. • You’ll also learn about the basic data structures in Go - numbers, strings, slices, and maps. And of course, you’ll learn to write functions and handle errors.

Exercises

1. Hello World

  • You’ll write the traditional “Hello World”.
  • You’ll see how a Go program is structured, and understand its various parts (such as package clauses, and imports …)
  • You’ll understand how the Go runtime executes your code.
  • You’ll see how to directly run your code and how to build an executable, both native and cross-platform.

2. Write a Banner

  • You’ll write a function that emits a banner with a specific width.
  • You’ll learn about Go’s strings, and understand how to work with Unicode in Go.
  • You’ll also learn about the “strings” package and how to use it.

3. Median

  • You’ll write a function that calculates the median of a slice of numbers.
  • You’ll learn about slices and how they are built, and also about the built-in function for working with slices.
  • You’ll see how Go treats different types of numbers and also see how to return error values.

4. Most Common Words

  • You’ll write a function that finds the most common words in a text file.
  • You’ll learn about maps and how they behave.
  • You’ll also learn about working with files and using defer to manage resources.

5. Kill server from PID file

  • You’ll write a program that parses a process ID in a file and terminates a process.
  • You’ll learn about error handling and the “errors” packages.

6. Div

  • You’ll wrap an unsafe division function.
  • You’ll learn about handling panics by using the built-in recover function and also about named return values.

Class 02: Structs, Methods & Interfaces

When: August 1st, 2023

Difficulty: Beginner

In this session we’ll go over writing your own types, adding methods and using interfaces.

You’ll learn how to define and create structs. Then you’ll learn to add methods to your types, and then you’ll see you can use interfaces. Finally, you’ll learn how generics can reduce code duplication.

Exercises:

1. Game

  • You’ll write code for a 2D game. You’ll see how to define and create structs.
  • You’ll see how you can embed structs and see the difference from traditional inheritance.
  • Then you’ll add methods to your structs.
  • Finally, we’ll use interfaces for code flexibility and see some useful ones from the standard library.

2. Stats

You’ll write a statistics package. You’ll see how to reduce code duplication with generics.

Class 03 - Concurrency

When: August 8th, 2023

Difficulty: Intermediate

In this session, we’ll look at Go’s concurrency primitives.

We’ll start with goroutines and channels and then move to lower-level concurrency primitives in the sync & sync/atomic packages.Finally, we’ll discuss timeouts and cancellations with the context package.

Exercises

1. User Validation

In this exercise, you’ll write code to concurrently validate a slice of users.

  • You’ll learn to start goroutines and how to work with channels.
  • You’ll understand channel semantics and see when they block.

2. Taxi Check

In this exercise, you’ll speed up a sequential algorithm with concurrency.

  • You’ll learn to use channels to return values back from goroutines.

3. RTB

In this exercise, you’ll implement a real-time-bidding system that returns a result in fixed time.

  • You’ll learn about the select statement and working with multiple channels.
  • You’ll also learn how to use the context package for timeouts and cancellations.
  • You’ll also see where context is supported in the standard library.

4. Counter

In this exercise, you’ll increment a shared counter from several goroutines.

  • You’ll learn to use the -race flag to check for race conditions.
  • You also learn to use sync. Mutex and the atomic package.

Class 04 - HTTP

When: Monday, August 14th,2023

Difficulty: Intermediate

In this session, we’ll cover Go’s support for the HTTP protocol, both client and server.

On the client side, you’ll learn to make HTTP calls, send data and parse a JSON reply. On the server side, you’ll learn to write handlers, parse JSON, and validate data. You’ll also learn how to write middleware for common tasks such as logging and authentication.

Exercises

1. GitHub

  • In this exercise, you’ll query the GitHub API for user details.
  • You’ll learn to use the net/HTTP client and serialize JSON.

2. Rides

  • In this exercise, you’ll implement the back end for a ride-hailing application.
  • You’ll learn to write HTTP handlers, how to parse and validate JSON, and how to route paths to handlers.
  • You’ll also learn to write middleware for authentication.
  • Finally, you’ll write a command line client that issues POST requests to the server.

Class 05 - Project Engineering

When: August 22nd, 2023

Difficulty: Beginner

In this session, we’ll cover the engineering of Go projects.

  • You’ll learn how to structure your code and split it into sub-packages.
  • You’ll learn to use modules to manage dependencies.
  • You’ll learn how to test your code, how to expose metrics, and write logs.

Exercise

  • You’ll write a simple project that extracts tokens from the text. The code itself is not the focus, but the process around it.
  • You’ll start simple and move to sub-packages, add testing, and learn about dependency management.
  • Then you’ll write an HTTP server front end to the code, and you’ll add logging and metrics to it.
  • You’ll also see how you can test your HTTP server.

About our expert:

Miki is a software developer with more than 20 years of experience. He has taught many workshops on various technical subjects all over the world at companies such as AT&T, Oracle, Dropbox, J.P. Morgan, and others. Miki is involved in open source, both in the Go and Python worlds. He has several open-source projects of his own and contributed to many others including Go & Python.

He’s also helping organize GopherCon Israel, Go Israel meetup, and the upcoming PyData Israel, and was a member of the PyCon Israel team.

Miki wrote “Forging Python”, “Go Brain Teasers” and “Python Brain Teasers”, he’s a LinkedIn Learning author, speaks at conferences, and infrequent blogger. Miki helps customers with R&D projects, building data pipelines, optimizing performance, and other challenging technical issues. He loves writing code and solving problems.