The industry has a maddening relationship with solved problems. A thing gets figured out, packaged, documented, and shipped, and a decade later half the field is building it again from scratch. The old solution was rarely wrong. Somewhere along the way the proven thing got traded for something that looked cheaper, and it turned out more expensive the moment anyone counted the hours. I watch this…
Recently, I wrote about using Go's net/http/httptrace to get the per-phase timing breakdown for HTTP requests - DNS, TCP, TLS, and server processing. After writing about that package, I wanted to know what the same breakdown costs in Rust: whether the ecosystem has an equivalent, and what building one reveals about how the two languages approach instrumentation. The short answer is…
I was writing a controller that watches Kubernetes HPAs and Istio VirtualServices for changes and coordinates between the two. Both watchers feed updates into the same reconciliation loop, and the loop needs to act on whatever the current state is, not replay a backlog of intermediate states it missed while it was busy reconciling. I had the watchers sending over Go channels and the reconciler was…
RFC 10008 was published on June 15, 2026 and defines a new HTTP method: QUERY . It fills a gap that has existed for as long as I have been building APIs. You have data to send to the server in order to describe what you want back, but GET does not have a body and POST is neither safe nor idempotent. QUERY gives you a method that accepts a request body while remaining safe, idempotent, and…
net/http/httptrace has been in the standard library since Go 1.7 and most Go developers I talk to have never used it. It exposes hooks for the points in an outgoing HTTP request that you usually cannot see from outside the transport: DNS resolution, connection acquisition, TLS handshake, the moment bytes go on the wire, the moment the first response byte comes back. The interesting part…
Walk into any old stone church and look up. The arches, buttresses, and ribbed vaults that hold the roof against gravity for a thousand years were not chosen for their beauty. They were chosen because stone is heavy and weak in tension, and the people who built those walls had to obey what stone could do. The beauty came later, almost as a side effect. The masons did not have the option to ignore…
I have been writing more and more Hare over the past year and finding places where the ecosystem still has gaps worth filling. One of those gaps is messaging. NATS is my go-to for lightweight pub/sub and I have used it in production across a handful of projects, so building a native Hare client felt like a natural next step. hare-nats is the result of that effort. It implements the core NATS…
Hey, dipshit. You know what compiles in two seconds, deploys as a single binary, and doesn't shit itself when a transitive dependency gets yanked from npm at 3am? Go. The same way HTML has been sitting there since the dawn of the goddamn internet waiting for you to stop overcomplicating the frontend, Go has been sitting there for over a decade waiting for you to stop overcomplicating the…
Bluesky went down for half its users for about 8 hours on Monday. Jim Calabro wrote up an excellent post-mortem that is worth reading in full, but the root cause is something I keep seeing across languages and runtimes, and it's worth talking about on its own. One endpoint in their data plane, GetPostRecord , fanned out concurrent work based on the size of the incoming request. Every other…
I asked my son if he could learn to build anything, what would he want to build. He is twelve years old and autistic and he does not elaborate unless you ask him to. He said, "I want to measure the temperature outside." That was the whole answer. No explanation, no context, no story about why. Just the thing itself. So I asked the follow-up questions, because that is how we talk. "Do you want to…
I've been building an API recently with a stack that I think hits a sweet spot of just enough structure to keep a team productive, not so much that you're fighting the tools. The stack is Huma for the HTTP layer, sqlc for database queries, and Goose for migrations. Each tool does one thing well and stays out of your way for everything else. The ideas is simple. Write SQL for your schema…
Hare doesn't have a package manager. This is by design and I'm glad for it. No dependency hell, no lock files, no node_modules black hole. However, you still need a way to pull in third-party code. There are two approaches: system-wide installation via make install , and vendoring directly into your project with git subtree . I'll use hare-json as the running example throughout. Our…
I came across an article recently that references something called Crocker's Rules . I had never heard of them by name, but when I read the definition I realized I've been operating this way for most of my career without knowing there was a term for it. The short version is this: if you declare Crocker's Rules you are telling people around you that they can optimize their…
There is something quietly remarkable about the people who built the foundations of modern computing. Not their technical achievements, though those are extraordinary. What is remarkable is where they came from before they ever touched a machine. Tony Hoare, who inspired the writing of this essay, studied Classics and Philosophy at Oxford: Latin, Greek, and modern philosophy under the "Greats"…
In World War Z, Israel survives the zombie apocalypse because of a simple rule: if nine intelligence officials agree on something, the tenth must assume they're all wrong and explore alternatives. Not to be difficult. Not to play devil's advocate. But because consensus is dangerous and groupthink kills. I've spent my career being that tenth person. The one questioning why we need…
In 1995, I built my first website. It was a Metallica fan page. Black background, red text, animated GIFs of pixelated flames, a MIDI file that autoplayed "Enter Sandman" whether you wanted it to or not. I thought it was the coolest thing I had ever made and I was only 14. I had no idea what I was doing. I just knew that if I typed the right words into Notepad and saved the file with .html at the…
There's a particular kind of engineer I've been noticing more and more lately. They show up in Slack channels with half-formed questions. They post screenshots of error messages on Twitter asking "anyone know what this means?" They copy-paste compiler errors into ChatGPT and treat whatever hallucination comes back as gospel. They interrupt their teammates with questions that could be…
I am surprised I haven't written this sooner, especially since I have written about How I Write HTTP Clients . It was inevitable this post was going to be written. With that said, I want this post to follow the same format so a lot of this will read very similar since I copied a lot of the language from it and just adapted it for HTTP servers. I have written a lot of HTTP server that serve…
There's been a recurring thought I've been having as I've gotten older and I'm coming up on being in tech for 30 years. Granted, that would make me 14 when I started, but yes, I was that young when I realized I wanted to make this my career. As I've seen a lot change in those three decades, I've come to care less and less about most of the things mainstream tech blows…
Does this happen to you? Someone shows you something they built. You look at it carefully, think through the implications, and give specific, considered feedback. They walk away deflated. Later, someone tells you that you "seemed dismissive" or "came across as negative." You were not dismissive. You were engaged and thinking. But because your face did not change, your voice stayed level, and you…
It had occurred to me that I haven't really solidified my position on coding with "AI" so I thought I would jot down some thoughts on the subject. Come to think of it... It's the exact opposite of... Hmmm... Wait, I already have written about it !
I don't sit down to design systems with complexity as the point. But I've met some that engineers do. They'll never say it outright, but you can see it in their work. They write layers on top of layers, abstractions stacked on abstractions, and clever tricks that only they can explain. Complexity makes them feel smart. It's designed to impress peers in the code review, not to…
As a software engineer who's been through the cycle of tooling bloat and complexity creep, I've come full circle to embrace radical simplicity. After years of wrestling with heavyweight IDEs, managing dozens of extensions, and debugging my development environment more than my actual code, I've distilled my entire setup to just four tools: a compiler, git, Helix editor, and tmux. The…
There's something quietly dignified about a clean commit history, well written patch/pull requests, and documentation. It tells you someone gave a damn. That they weren't just slinging code to pass tests, but writing with others, including you, in mind. They knew they were stepping into a shared space, and they acted accordingly. That's what engineering discipline looks like.…
I’ve been writing code for about thirty years now. I say that with no small amount of gratitude and a touch of disbelief. Thirty years of debugging, designing, deleting, rewriting. Of shipping things that broke and patching things that probably should not have seen the light of day. Of staying up way too late for launches that no one remembers but me. Of being woken up at 2AM because of a service…
Whenever someone asks me about learning Go and what online resources I would recommend they check out I always point them to Go by Example . This quick reference style site lets someone who is already good at programming in another language get up to speed on the basic semantics and idioms without having to read the offical language specification or verbose tutorials. How do I loop over items?…
Recently, Adële wrote about how to block non-human crawlers by setting a cookie to prove a human is visiting a website. I won't go into details here about how the mechanics work, but I wanted to see if I could adapt this to Go middleware to provide the same result. Middleware This is the configurable middleware http.Handler you can use to wrap other http.Handler s when building a Go web app…
This past January 13th I turned 43, and as I approached that day, I spent a lot of time over winter break reflecting on the past decades I worked in the tech industry. About a year ago I had a similar reflection when I rage-quit , but I eventually came around to doing some contract work to make some money and then took a job to get health benefits. This was before my wife and I got married and…
I have been involved in writing software professionally for almost 3 decades. A lot has changed since the days of <font> tags and cgi-bin scripts. A lot of the changes have redefined how software is written, organized, collaborated on, and delivered to its users. As more people came online with the commoditization of internet access and the increasing thread count of CPUs the software tools have…
Well, I think I finally hit a breaking point and I am officially done with the bullshit spreading through the "big" tech industry lately and I don't want to be a part of it anymore. I've been doing some sort of tech work for almost 30 years (27 to be exact) at this point and I am only 42 years old. I had my birthday on January 13th . As I come to terms with moving through my 40s as a…
Today I get to release the first working version of static-httpd . I have always found value in using an HTTP static file server to serve up some quick sites out of the current working directory. I've even written an article way in the beforetimes about some options to spin up a quick server. Since then there has been a flood of them to hit theopen source scene and so I wanted to build one…
TL;DR Read the source code for https://git.sr.ht/~blainsmith/hare-bitcask . I have been writing modules for Hare for a while now. It has been a lot of fun to write and helping expand the open source ecosystem of modules for this language has made me feel very fulfilled. Up until this point I've been mostly focused on small modules, but I really wanted to tackle something…
When building new services, gRPC can be very handy to not only define those services, but also generate a lot of the boilerplate code for server implementations and client libraries. We get the added benefit of a more efficient wire protocol, Protocol Buffers , because it's in binary and a lot smaller than JSON. However, sometime we still need to support HTTP and some REST-ful behavior of our…
I've been reading Drew Devault's blog for quite some time. Recently, he and a small team released a new programming language called Hare that is laser focused on systems programming and meant to compete with C, Rust, Zig, but have some of the simple design choices of Go. The biggest differences from Go I can see is Hare's lack of a garbage collector so memory management like C,…
I guess society celebrates turning 40 as a big milestone birthday. I might have some wisdom, anecdotes, and pithy quotes to share that might serve others well since I've been alive on this big ball of rock for 4 decades. Here are 40 things I've learned during my time here in no particular order: Mental and physical health form a symbiotic relationship. Make both a priority and take care…
I read David Crawshaw 's recent post about the same topic and I thought it would be nice to do the same. Go I've always tried to be a polyglot programmer to allow myself to learn and be a well rounded software engineer, but as time went on I realized that specializing in a small set areas is also important. I made a choice to really focus on Go back in 2015 when I was primarily doing…
I have written a lot of HTTP clients that talk to 3rd party APIs over the years and there have been some patterns that have emerged and so I thought I would share them in hopes they help others. The major concepts I want to highlight are: Composing Client Options JSON Encoding/Decoding to Go Types HTTP Request Signing Convenience Methods Binary Readers To illustrate these concepts I am going…
I get this question a decent amount from people who don't lift and my answers usually consist of: "I spend all day staring at a computer screen and it offers a nice balance to work life behind a desk." "It facinates me what the human body is capable of doing if it is trained and taken care of so I want to see how far I can push it with measureable results." "Because being strong as fuck makes…
Over the years I've been programming and people ask me what I do for a living, I try to explain to them as best I can. Inevitably, they respond with something along the lines of "that sounds very hard and complicated". To someone without programming skills, this sure sounds hard. To me, performing open heart surgery sounds hard, but to a seasoned surgeon, I am sure it is like riding a bike.…
I managed to switch my site over to using Zola . It was very tempting since the template engine looked a lot simpler than Hugo . It took me about 3 hours to figure out how to map each of the Hugo features to the Zola equivalent. I've included the diff from the both versions for comparison. You can see that zola requires a lot less boilerplate and template files to achieve the same result…
Update: This idea got popular enough that I decided to turn it into a tool. You can grab it from http://pprof.sh . There are a lot of great articles on the interwebs about profiling entire Go applications for CPU and memory usage, however I can never remember the syntax for doing the same thing for specific Benchmark-prefixed tests. Editors have great support for running these tests, but…
If you haven't noticed already I really love plain text so I thought I would find some plain text protocols that are used in different software systems. The Redis Protocol specification states it best by describing its own protocol, but this applies to all of the plain text protocols I will cover. Simple to implement. Fast to parse. Human readable. The next time you are building a software…
Every since the world started shutting down when COVID-19 hit I've been finding myself reverting back to simpler things. With the constant firehose of information from the news channels, social feeds, and just general information overload I've been burning out on almost a weekly basis. It sucks and I am tired. I recognize that my personal issues with all of this pales in comparison with…
Well, my undergraduate career is finally over. Rensselaer Polytechnic Institute I was fortunate enough to get accepted to my first choice back in 2000 when I graduated high school. Unfortunately, however, it wasn't without its speed bumps. I had received the Rensselaer Medal prior to receiving my acceptance letter so when I got notified I was awarded the scholarship I assumed my acceptance…
The crypto/ed25519 package was added to the standard library in Go 1.13 . This package implements the Ed25519 Edwards-curve Digital Signature Algorithm. It offers significant speed and security improvements over RSA and it makes for a perfect signing method for JWTs. Unfortunately, the most popular JWT library for Go does not natively support it yet. It only supports ECDSA, HMAC, RSA, and…
This tutorial assumes you have the following software installed. https://collectd.org https://www.docker.com collectd is a general purpose system metrics collection tool that supports various plugins for reading metrics from sources and writing results to destinations . Multiple sources can be read and then written to multiple destinations which makes collectd very flexible.…
A long time ago I gave a TEDx talk about how I ended up where I am and the choices I made. Most notably, the choices I made to transfer to many different colleges and eventually drop out. As I got more comfortable in my developer career at Harvard and then MadGlory I convinced myself that I never needed a formal education in Computer Science to do well. Convincing myself of that helped minimize…
This word is used throughout the startup and tech worlds and it annoys the shit out of me. Not only does it seem to stroke the egos using it, but it is also being used in completely the wrong context. Both of these definitions indicate no decisions being made on the person being hustled. How does this have anything to do with successfully launching a startup, product, or completing any task that…
On a few different occasions I've needed to keep a registry of interface implementations to iterate over later on. The first time I did it was to have define an EventWriter interface. // writers/writers.go package writers type Event stuct { Action string ` json:"action" ` Details string ` json:"details" ` CreatedAt string ` json:"createdAt" ` } type EventWriter interface {…
This may have been the first job that when I look back over the years I am absolutely shocked with how much I have been exposed to and learned. I couldn't be more grateful towards everyone I work with. After all, MadGlory would be nothing if it wasn't for the people that work there and I am glad to call them my family. MadGlory opened its doors only 3 years ago , but over those years we…