简介
This is the book that I wish had existed when I first started exploring the Go language, built around code examples I could have played with at my own pace.
It's also like the book I wish had existed when I first started programming - an amalgam of the magazine articles which taught me to code and the wisdom (or not) conferred by thirty-plus years of doing just that. I hope it's as readable to the interested teenager taking their first steps into hacking as it is the university graduate armed with a wealth of theory but looking for practical insight.
It's also more generally a book about reading and writing code, and about many areas of computing which fascinate me. Perhaps they'll fascinate you too!
One thing this isn't is a professional book, by which I mean that it's not concerned with helping a professional developer quickly transition from another programming language to Go. There are plenty of those already in print, written by much better teachers than me. Instead my aim in this text is to provide a much deeper exploration of subjects I'm interested in through the lens of Go, teaching the language almost as an after-thought.
The didactic style is brutally simple and old-school: write code, explain code, modify code, explain changes, repeat as necessary. Along the way I'll do my best to explain what each example is trying to achieve, and the thinking which evolves it towards its final form.
Each chapter is built around a particular programming task which I use to demonstrate how various features of the Go language can be used as well as to share many of the things I've learned during several decades of coding. Some of these programming tasks may appear deceptively simple, others totally irrelevant to the life of a commercial developer. I intend to disabuse you of both notions, whilst at the same time keeping this a Hacker's Notebook: depending on your outlook this is either a logbook of experiments undertaken and rabbit-holes delved in pursuit of knowledge, or a grimoire of the esoteric and unutterab