Skip to content

Instantly share code, notes, and snippets.

@migue
Created August 28, 2020 10:34
Show Gist options
  • Save migue/c8c70ca9449ac0a988624a5247405499 to your computer and use it in GitHub Desktop.
Save migue/c8c70ca9449ac0a988624a5247405499 to your computer and use it in GitHub Desktop.
Syllabus for an introductory course to programming in Go I will be teaching next winter

Programming in Go: an introduction

A short course to introduce my students to the Go programming language.

I try to provide my students with a comprehensive, and idiomatic view of the Go programming language, focusing on different topics ranging from language syntax, design, and good practices to concurrency, testing or profiling.

Chapter one: Syntax and data structures

This chapter will try to cover the basic concepts and syntax of the language:

Variables

Structs

Pointers

Arrays and slices

Error handling

Chapter Two: abstracting our programs

We will talk about different concepts that will help us to properly design our programs:

Interfaces and methods

Embedding and exporting

Decoupling

Design guidelines

Chapter Three: Goroutines

We will go through the main concepts of goroutines, what they are, their benefits, and how to use them. Additionally, we will talk about the mechanics of the OS scheduler and the Go Runtime scheduler

Chapter Four: Channels

This chapter will help us to understand what channels are and how to properly use them. We will also analyze some commonly used patterns:

Basic waiting patterns

Cancellation pattern

Fan out pattern

Chapter Five: Testing and benchmarking

This chapter will provide the foundations to get started with basic unit testing, table unit testing, code coverage, and benchmarking practices

Chapter Six: Profiling and tracing?

I am not sure if I should include this chapter. My original idea is to provide the students with the basic concepts of how profiling and tracing works, the available tools and use all of it in a couple of examples trying to perform some optimization on a existing application.

@migue
Copy link
Author

migue commented Sep 4, 2020

Thanks a lot for your comments and the ideas, I will take them into account.

The book is nice, I have read it and I have already borrowed some of the ideas from their table of contents :D

Regarding the tracing, I wasn't thinking about distributed tracing but the trace tool which can be used to trace the runtime (scheduler, garbage collector, ...)

Again, thanks a lot for your comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment