This rubric will be a fanciful place for sharing really excellent content. This content is a list of high quality resources that have stood tall. However, it is not meant to be exhaustive. There is much to learn beyond here! Let's dig in.
LEGEND:
- π₯ - video
- πΎ - source code
- π - book
- π - blog
Testing is ever so important. I can't stress this enough, think beyond your mocks. Think about the anatomy of your tests. Think about the lifecycle of your test code. Think about how tests become documentation. Here's some testing gems:
- TDD, Where Did it All Go Wrong - Ian Cooper π₯
- Absolute Unit (test) - Dave Cheney π₯
- Testing Without Mocks - Learn Go With Tests π
- github.com/jsteenb2/mess πΎ
- A look at a simple db test suite that is used to test across multiple implementations
- Said another way,
Write Once, Use Many
testing π
- Advance Testing with Go - Mitchell Hashimoto π₯
- Go Testing by Example - Russ Cox π₯
- Vice test suite - Mat Ryer πΎ
- f-tests as a Replacement for Table-Driven Tests - Aliaksandr Valialkin π
- How to Inherit a Mess GopherCon 2024 Workshop - Johnny Steenbergen (me) πΎ
- Idiomatic Go Tells a Story π₯
- Preemptive Interface Anti-Pattern in Go - Jack Lindawood π
- Ways To Do (systems) Things - Peter Bourgon π₯
- Code Forest vs Code Dessert - Kent Beck & Beth Andres-Beck π₯
Go's concurrency is amazing to work with. Quite the paradigm shift from most other languages.
- Concurrency in Go - Katherine Cox-Buday π
- Concurrency is not Parellelism - Rob Pike π₯
- Lexical Scanning in Go - Rob Pike π₯
- Rethinking Classical Concurrency Patterns - Bryan C. Mills π₯
- Go Concurrency Design Patterns - Rob Pike π₯
Ohhhhh get this right, and your future selves will love you for it! Returning fmt.Errorf("allthe things: %w", err)
is not the only error handling in town. You can tie into go's structural type system to create a rich domain of error handling. One that can both eliminate ambiguity in diagnosing problems as well as remove endless debug logs required for conventional debugging. There's better ways, and in go
, that is to put effort into error handling :-).
- github.com/jsteenb2/errors πΎ
- Go Lift - John Cinnamond (strucuting code to maximize dev ex and encapsulate correctness) π₯
- Error Handling in Upspin - Rob Pike (amazing look at modeling errors in a real program) π
Generics are newish, and provide a ton of utility in Go. They are somewhat limited compared to some other languages, but in my experience, those same limitations stop folks from off the deep end :-).
- Generics Unconstrained - Roger Peppe π₯
- Constraining Go
type
Parameter Pointers - Axel Wagner π - Closures are the Generics of Go - Jon Bodner π₯
- Gophercon 2018 Performance Tuning Workshop - Dave Cheney πΎ
- Common Go Patterns for Performance π
- Profiling Go - Russ Cox π
- An Introduction to go tool trace - Rhys Hiltner π
- GopherCon 2021: Go Profiling and Observability from Scratch - Felix GeisendΓΆrfer π₯
- GopherCon 2017: An Introduction to
go tool trace
- Rhys Hiltner π₯ - More Powerful Go Execution Traces - Michael Knyszek π
Systems thinking teaches how to understand the importance of the relationship of components within a system. The easiest way I can think of to go from 0 -> Hero Engineer!
- github.com/matryer/vice πΎ
- Excellent testing and strong emphasis on API design
- Not a great fit for production use case if you aren't queue agnostic or need control of message ACKs
- github.com/benbjohnson/bolt πΎ
- Emphasis on simple, beautiful stuff. Excellent testing, attention to details in the public API
- Its not everyday you find a database implementation that is grokkable :-D
- github.com/influxdata/[email protected]
- Builds on the excellence of bolt's design here. Check out the
kv
,bolt
,inmem
and their testing :-D
- Builds on the excellence of bolt's design here. Check out the
- github.com/WasabiAiR/stow πΎ
- Again, excellent testing and strong emphasis on API design
- Clarity, ease of contribution
- Not a great fit for produciton if you are not object storage agnostic, come with limitations
- github.com/CrowdStrike/foundry-fn-go πΎ
- A look at API design across numerous functional boundaries, both internal and external facing
- Comparing it with an older version is helpful, shows the point A -> point B transition and motivation
- Disclaimer: I was the primary contributor π
Go is not without its warts. The following walks through a number of different go gotchas.
- Gotchas πΎ
- Stump the Gopher Go Quiz - Chris Pahl π
At the end of the day, we work as engineers or programmers. It's probably for the best that we understand how to function in a professional environment :-D.