Skip to content

Exercises for the introductory level of the Friends of Go workshops.

Notifications You must be signed in to change notification settings

friendsofgo/workshop-introduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workshop Introduction

This repository contains some exercises for the introductory level of the Friends of Go workshops.

Feel free to open a new PR with your solutions.

Instructions

The exercises' level is incremental, so to avoid confusion, just do the exercises in a sorted way:

exercise-1
exercise-2
exercise-3
exercise-4

Each exercise has a its own README.md file with the specific instructions and some notes.

Feel free to open a new PR to contribute with us (typos, missing info, etc).

Requirements

This repository is tested under Go 1.12+ and using Go Modules.

The dependencies needed are:

  • benchcmp

    $ go get -u golang.org/x/tools/cmd/benchcmp
  • graphviz

    See the installation details for each platform on the link.

Exercises

1. Swapping Numbers

The first exercise basically consists on implementing a function to swap numbers:

func Nums(nums []int) []int {
	// TODO: Swap numbers
	return nums
}

2. Stupid Cache

The second exercise let you do your own implementation of an stupid cache to satisfy the given cache interface:

type StupidCache interface {
	Get(key string) []byte
	Set(key string, data []byte)
}

3. Benchmarking & Profiling

The third exercise is focused on benchmarking and profiling the Marshal and Unmarshal functions of the encoding/json package.

4. Concurrent Quiz

This fourth (and the last) exercise consists on adding concurrency on a quiz simple application in order to extend it and make it more funny.

It has has some "bonus tracks" to make it even funnier.

About

Exercises for the introductory level of the Friends of Go workshops.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages