Twitch goes to GopherCon 2016
When I first went to GopherCon with Twitch two years ago, the Go language had already changed the way I write software. Twitch’s chat server and numerous internal systems were running with Go in production, and the convention was a great way to meet other people who were working both with and on Go. This was Twitch’s and my third year at the conference, and it’s exciting to see how quickly the community is growing and developing. I didn’t get to see every single talk, but I’d like to share what I learned from a few of them. Thanks to everyone who came by our booth to talk about Twitch, Go, and garbage collection!
I really enjoyed Alan Donovan’s talk on the first day. He presented the Go Guru, a program for quick static analysis of Go code intended for integration with editors. I often use go tool list and the callgraph and digraph commands to inspect unfamiliar code at a high level—the guru will make that much faster. It also helps with following channel operations through a program, which aren’t understood by most other tools. I’m glad that the language and ecosystem enable tools like this, and that guru is available for public use.
Dave Cheney presented a methodology for handling errors, and a package that implements his proposed strategy. He suggests wrapping errors with additional context about their source (a stack trace), while allowing higher-level callers the ability to remove the wrapper to access the original error value. I wasn’t immediately sold on this, but I’m coming around. My initial reluctance was that it makes errors more like exceptions, and that it would add a lot of overhead to errors that occur in the normal course of operations (and thus are not exceptional in any way). But Dave’s approach will make debugging much easier, and getting to correctness quickly is well worth paying the extra CPU cycles.
Another helpful talk was by Jack Lindamood, who shared a wealth of advice for Go library authors on how to write packages and APIs that will work well for many consumers. A repeating theme is to write packages with predictable behavior that keep control in the hands of their users. He lays out the implications of this design principle as it affects package configuration, zero values, global state, and use of the context package. Jack recently joined Twitch, and I’m looking forward to enlisting his design help for some internal packages I maintain.
Expectations were high for Peggy Li’s punny stand-up comedy lightning talk, and she didn’t fallthrough. Her slides only begin to describe the routine — I was on the edge of my seat the whole time. If you weren’t there in person or watching live on Twitch, you missed out on a good thing.
Finally, Michael Matloob walked through the Go contribution process—it’s simpler and friendlier than you might think. The project needs help from you: not only to contribute code, but to file bugs for problems you encounter and even to improve the docs. No documentation detail, he emphasizes, is too small to report or improve. I’ve personally learned a lot about how to write better Go code from reading through the Go core packages—you might learn something too, and might find something you can fix while you’re at it!
Go is an important part of how Twitch scales, so we’re very excited to be part of its growing community. If you’d like to join, check us out—no Go experience required. See you again next year!