Workshop Day

Wednesday, 1st August 2018

GopherCon UK 2018 is proud to work with Gopher Guides and Red Hat OpenShift to bring to you three options for a full day of training on Wednesday, 1st August 2018, a day before the conference.

All three course options are a full day (9am-5pm) of hands on immersive training with top professional trainers. Tickets include breakfast, lunch and coffee breaks. Please bring your laptop; power and wifi will be available.

Gopher guides logo    OpenShift logo

Daily Go: Fundamentals

Instructor: Mark Bates

Founder/Instructor at Gopher Guides

Mark Bates is a full stack web developer with over 17 years of experience building high quality scalable applications for companies such as Apple, USA Today, Klarna, and Palm. He has written three books, 'Distributed Programming with Ruby', 'Programming in CoffeeScript', and 'Conquering the Command Line'. Mark has spoken at conferences around the world, has led user groups such as Boston Ruby and Boston Golang, and has helped to organize conferences such as GothamGo and GopherCon.

Prerequisites

The material has been designed to be taught in a classroom environment. The code is well commented but missing some of the contextual concepts and ideas that will be covered in class. Students with the following minimal background will get the most out of the class.

  • A working knowledge of a modern programming language (Java, Ruby, Python, C, C++, C#, Perl, etc.)
  • A basic understanding of operating system concepts and environment variables
  • Experience working with a command shell and navigating a filesystem

Course overview

Go is a modern programming language with a heavy focus on developer productivity, scalability, and speed. Whether you're a recent grad or an industry veteran, there's no better time to learn the core concepts of the Go programming language. This course introduces language fundamentals, such as primitives, language structure, design, and concurrency. If you have little or no experience with Go and want to jumpstart your knowledge, this course is for you.

This course is for you because:

  • You want to review the Go language to see if it's something that will work for you and your team’s next project.
  • You currently develop in another language and are interested in learning how Go handles similar constructs and how it's different.

Course outline

  • Welcome

    Welcome to class. Let's do some introductions and get started!

  • Getting Started With Go

    This course will walk you through installing Go, setting up your GOPATH, and adding GOBIN to your path. It will also test to ensure the installation and environment is properly set up. Finally, it will discuss several options for code editors.

  • Syntax And Types

    In this course we will cover the basic keywords and syntax of the Go language. You'll learn the keywords, operators, and delimiters that make up the language. You'll them move into Syntax and Types. Learn how strings are handled as well as UTF-8 text. You'll also learn about variables, constants, and iota. Then, using those concepts, how to create structs and initialize them.

  • Arrays And Iteration

    Arrays in Go are useful when planning for detailed layout of memory. Using arrays can sometimes help avoid allocation. However, their primary use is for the building blocks of slices. This module will cover the basics of creating, initializing, and indexing an array. It will also cover basic loop constructs and loop control basics.

  • Slices

    Slices wrap arrays in Go, and provide a more general, powerful, and convenient interface to data sequences. In this module, you will cover slice basics such as creating, initializing, and iteration. You will also learn how to grow a slice, work with subsets of slices, and slice tricks.

  • Maps

    Maps are a powerful built-in data structure that associates keys and values. In this module you will cover basic map creation, initialization, and iteration. You will discover how to determine if values exist in maps and how to update and delete map values.

  • Pointers

    A pointer is a type that holds the address that points to a variables value. In many languages, pointers are the source of pain and confusion. Go has made it easy to use and understand pointers. In this module you will learn about the difference between pass by value and pass by reference. You will learn hot to declare pointers, and how to reference values as pointers. The module will discuss performance and security and when to use pointers as well.

  • Interfaces

    Interfaces in Go provide a way to specify the behavior of an object: if something can do this, then it can be used here. This module will take a look at how to use interfaces to abstract that behavior. Concepts such as the Empty Interface, satisfying multiple interfaces, and asserting for behavior will be covered. Additionally this module will cover the difference between value and pointer receivers and how they affect the ability to satisfy an interface.

  • Errors

    Error handling in Go can feel a bit tedious at first. However, this module will cover the benefits of how Go's error model results in more reliable code. This module will cover how to handle basic errors, return errors as an interface that satisfies the error type. Concepts such as custom error types, panics, recovering from panics, and sentinel errors are also covered.

  • Concurrency

    Concurrent programming in many environments is made difficult by the subtleties required to implement correct access to shared variables. Go encourages a different approach in which shared values are passed around on channels and, in fact, never actively shared by separate threads of execution. This module covers Go routines and how to synchronize communication between them. Mechanics for synchronization such as WaitGroups, Mutexs, and Channels are explored along with the corresponding patterns for each. Find out the difference between a buffered and unbuffered channel, and when to use them. Also discover how to use channels for signaling for concepts such as graceful application shutdown.

  • Finalize

    This module covers where to get more support on Go, recommends books and videos, and list contact information for your instructor.

Gophercon UK: Advanced

Instructor: Cory LaNou

Founder/Instructor at Gopher Guides

Cory LaNou a full stack technologist who has specialized in start-ups for the last 20 years. Cory worked on the Core engineering team that contributes to InfluxDB, a highly scalable, distributed time series database written in Go. Cory has worked on several Go projects with a focus on profiling and optimizing applications, using advanced profiling concepts such as flame graphs and tracing profiles. Cory has created and led numerous Go workshops and training courses. He has several published online articles related to Go. Cory also helps lead and organizer several community technology meetups and mentors new developers.

Prerequisites

  • A working knowledge of a modern programming language (Java, Ruby, Python, C, C++, C#, Perl, etc.)
  • A basic understanding of operating system concepts and environment variables.
  • Experience working with a command shell and navigating a filesystem.
  • At least 6 months of Go programming experience.

Course Overview

Go is a modern programming language with a heavy focus on developer productivity, scalability, and speed. Concepts such as concurrent programming, testing, and performance testing were designed into the language from the beginning. If you want to learn about concurrent programing, or how to performance test and profile your code, this course is for you.

This course is for you because

  • You want to learn how to write concurrent software.
  • You want to learn best practices for writing tests and benchmarks.
  • You want to use the built in tools to profile and measure performance of your software.

Course Outline

  • Concurrency

    Concurrent programming in many environments is made difficult by the subtleties required to implement correct access to shared variables. Go encourages a different approach in which shared values are passed around on channels and, in fact, never actively shared by separate threads of execution.This module covers Go routines and how to synchronize communication between them. Mechanics for synchronization such as WaitGroups, Mutexs, and Channels are explored along with the corresponding patterns for each. Find out the difference between a buffered and unbuffered channel, and when to use them. Also discover how to use channels for signaling for concepts such as graceful application shutdown.

  • Testing

    Go ships with a powerful testing framework. Tests in Go are written in the Go language, so there is no need to learn another syntax. This module will explore basic tests, table driven tests, and sub-tests. Concepts such as race conditions, code coverage, test automation. Understanding test options such as parallel, short testing, timing out tests, and verbose are also covered.

  • Benchmarking

    Go comes with a powerful set of tools for profiling and improving the performance of your code. Benchmarking is one of those tools, and the first one most developers start with. In this module we will cover basic benchmarking, some common benchmarking mistakes, and how to compare benchmarks to see if performance has improved.

  • Profiling

    Go ships with a number of profiling tools. This chapter will walk you through how to:

    • Use interactive pprof with a cpu profile
    • Use interactive pprof with different types of memory profiles
    • Generate profiles from benchmarks
    • Generate profiles from live/running applications
    • Generate torch graphs from benchmarks or live/running applications
  • Delve

    Delve is a source level debugger for Go. In this module, we will learn how to launch Delve and interactively debug a program.

  • Building And Compiling Go Applications

    Go has the ability to build and cross compile with ease. This chapter will cover the different ways to build your binary and additionally covers concepts for embedding build information such as version and GitHub SHA-1 hash. See how build tags are used to conditionally include specific branches of code by targeting specific platforms or simply using the tags provided.

  • Finalize

    This module covers where to get more support on Go, recommends books and videos, and list contact information for your instructor.

  • If time permits, we will also cover

  • Testing Asynchronous Tasks

    Many times you may be testing parts of your code that have service dependency that run for an unknown amount of time. Examples of these may be task queues, distributed system calls, etc. Because you don't know how long they may take to execute, testing them can present some challenges. In this module we will learn how to set up tests both effectively and efficiently for testing async processes.

  • Mocking Tests

    It's easy to decouple packages in Go using interfaces. Because of this, testing can also be much easier. However, you typically want to mock out your interfaces in tests so that unit testing is much easier. This chapter will cover how to write a mock for a service to enable easy and precise testing.

Using and extending the Kubernetes API programmatically

Instructors: Stefan Schimanski & Michael Hausenblas

Kubernetes is the de-fact industry standard for container orchestration. In this workshop you’ll learn how to program Kubernetes using Go. We will start with the basic concepts (pods, namespace, labels, workloads, nodes, events, etc.) and provide step by step guidance how to implement a variety of tasks against the Kubernetes API with the Go programming languages. The two main Go libraries used in this workshop will be https://github.com/kubernetes/client-go as well as https://github.com/openshift/client-go in addition to the Go standard library. For each participant access to a Kubernetes cluster will be provided, and it is beneficial if you have the latest Go version installed on your laptop in order to follow along. We will provide a GitHub repo with all code samples used in the workshop.


Buy Your Ticket

Stay up-to-date with GopherCon UK

Enter your email address to join the GopherCon UK mailing list and be the first to hear our latest news and announcements.