Programmers love the Go (golang) programming language because of its efficiency and simple tooling. But that doesn't mean programming in Go is without challenges, like hidden dependencies that trip up the compiler and interesting string type conversions that differ from languages like Python. Work your way through 25 short brain teasers, and learn the nuances of Go in one of the most fun and creative ways around.
Challenge yourself and challenge your assumptions to gain a more in-depth understanding of integers, strings, Unicode, compiler behavior, and a variety of subtle programming gotchas that might otherwise trip you up. Just read a short program written in Go, try to guess the output, run the code yourself, and then go to the next page for an explanation of the solution. By working through these brain teasers, you'll tighten up your Go programming skills and have lots of fun at the same time.
Taken from real-world, programming problems, conference talks, and meetup quizzes, these brain teasers provide an effective learning tool that's as enjoyable as it is educational.
What You Need:
This book assumes you know Go at some level and have experience programming with it.
*NOTE:* We use Go version 1.14.1 to run the code; the output might change in future versions.
You will need a working Go environment, you can download it from https://golang.org/dl. You will probably want a good IDE for Go, two of the most popular ones are Visual Studio Code and GoLand.
Programmers love the Go (golang) programming language because of its efficiency and simple tooling. But that doesn't mean programming in Go is without challenges, like hidden dependencies that trip up the compiler and interesting string type conversions that differ from languages like Python. Work your way through 25 short brain teasers, and learn the nuances of Go in one of the most fun and creative ways around.
Challenge yourself and challenge your assumptions to gain a more in-depth understanding of integers, strings, Unicode, compiler behavior, and a variety of subtle programming gotchas that might otherwise trip you up. Just read a short program written in Go, try to guess the output, run the code yourself, and then go to the next page for an explanation of the solution. By working through these brain teasers, you'll tighten up your Go programming skills and have lots of fun at the same time.
Taken from real-world, programming problems, conference talks, and meetup quizzes, these brain teasers provide an effective learning tool that's as enjoyable as it is educational.
What You Need:
This book assumes you know Go at some level and have experience programming with it.
*NOTE:* We use Go version 1.14.1 to run the code; the output might change in future versions.
You will need a working Go environment, you can download it from https://golang.org/dl. You will probably want a good IDE for Go, two of the most popular ones are Visual Studio Code and GoLand.

Go Brain Teasers: Exercise Your Mind
112
Go Brain Teasers: Exercise Your Mind
112Product Details
ISBN-13: | 9781680508994 |
---|---|
Publisher: | Pragmatic Bookshelf |
Publication date: | 10/05/2021 |
Pages: | 112 |
Product dimensions: | 7.50(w) x 9.25(h) x 0.23(d) |