I'd like to share an unpopular opinion about testing: integration tests are the most important kind of tests: you should strive for excellent integration test coverage and invest relatively little time in unit tests. I've believed this since I worked on cmd/go , Go's build tool. We had a really excellent set of integration tests that were easy to write, quick to run, and reliable and finding…
This article is also posted on the EngFlow blog . It's been almost six years since the previous entry in this series was originally published, and there are many new topics to discuss! The biggest change in the last few years was the introduction of Bazel modules (also known as Bzlmod) and the deprecation of WORKSPACE mode. I've updated all the previous articles to be compatible with Bazel…
When I started working as a software engineer, I really wanted to work full time in open source. I've been lucky enough to spend a decent chunk of my career doing exactly that, and my thinking on open source work has shifted over the years. Much of that work has been incredibly rewarding, but for readers interested in taking a similar path, I want to share an insight and a warning. First,…
I've been tinkering with a new toy language this week, and I wanted to replicate a feature I like from some tools in the Bazel ecosystem. Gazelle , buildozer , and buildifier have the ability to preserve comments when formatting a BUILD file, even after significant programmatic modifications. Gazelle can also easily read comments when walking the syntax tree, which is important for processing #…
I often hear criticisms of Go that seem superficial: the variable names are too short, the functions are not overloadable, the exporting-symbols-by-capitalizing thing is weird, and until recently, generics are non-existent. Go is an idiosyncratic language, and of course I have my own opinions and my own set of gripes too, but today I want to highlight one of the features I like most about the…