Don't use mocks

Writing good unit tests is made much easier by dependency injection. This lets you separate your code’s behavior from that of your dependencies: type MyType struct { dep1 DependencyOne dep2 DependencyTwo } func GoodConstructor(dep1 DependencyOne, dep2 DependencyTwo) *MyType … | Continue reading


@joeblu.com | 1 year ago

Supreme Court DoS attack

In the latest edition of Casey Newton’s newsletter, Platformer, he makes the case for why the plaintiffs in Gonzalez vs Google botched their oral arguments. The mechanism is fascinating: [H]ow many … lawyers were conflicted out of representing Gonzalez. Platforms pay so many high … | Continue reading


@joeblu.com | 1 year ago

Looking in Go's Mirror: How and When to use `reflect`

This article was originally published on gopheradvent.com Looking in Go’s mirror: How and when to use reflect Go’s static typing is a headline feature of the language. It prevents whole classes of bugs, makes code easier to navigate and refactor, and makes it easier for linters t … | Continue reading


@joeblu.com | 1 year ago

What is software for?

In the last blog, I wrote a few things that software is for: putting people on the moon safely deploying airbags making my bank account add up making sure Mom gets my texts video editing and animation drawing in 10 million colors ebikes But it’s also used for: surveilling protest … | Continue reading


@joeblu.com | 1 year ago

Code is not Prose

Once a month or so, this idea comes rambling out of the programming community1: Software is prose. It is written to communicate ideas to others, it has the interesting side effect that it can be transformed into something a computer can execute. - Chet Hendrickson This sounds nic … | Continue reading


@joeblu.com | 1 year ago

Nasty refactorings with go.mod replace

At work I’ve been building a new program on top of an SDK that’s under very active development. After about 6 weeks without updating the version, the SDK had deleted some code I was using and had a ton of breaking changes. If I’d simply updated the library, my entire program woul … | Continue reading


@joeblu.com | 1 year ago

Caroline Ellison is not a sympathetic figure

I recently read this Washington Post Article (archive.org) titled Caroline Ellison wanted to make a difference. Now she’s facing prison. After the first read-through I was incredulous at the sympathetic presentation in the biography. It reads like a resume, like a “it all spun ou … | Continue reading


@joeblu.com | 1 year ago

Unmarshaling JSON in Go: The weird parts

Quick, what does this program print? package main import ( "encoding/json" "fmt" ) func main() { content := []byte(`{ "fieldone":"zero", "field_one":"one", "fiELD_one":"two", "field_One":"three", "field2":123 }`) type d0 struct { Fieldone string Field1 string … | Continue reading


@joeblu.com | 1 year ago

Evaluating New Tools

I was reading about Phoenix today, looking at guides and documentation. It’s great to see in a guide when it’s easy to quickly set up a project, that makes it fun to get started and explore. The most exciting thing about Phoenix is that “reactivity”, or live updates, are a core p … | Continue reading


@joeblu.com | 2 years ago

Podcasts at the End of the Indie Web

There’s been a lot of restrospecting lately, lamenting the loss of the “indie web” and its subsumption by content platforms like Facebook, Instagram, Reddit and Twitter. (I’ve always wondered where Tumblr fit in - more indie than any of these, but still - owned by Yahoo!). A few … | Continue reading


@joeblu.com | 2 years ago

GitHub Squash Merges are a Menace

I love squash merging. I think it’s the simplest way to maintain a legible commit history on main, a shared dev branch, etc. It’s easy for most people to follow, and it doesn’t require you to be too Big Brained about git. GitHub even provides a convenient interface for doing this … | Continue reading


@joeblu.com | 2 years ago

How We Do Our Best Work

Dan Luu tweeted about some great work interns that he has mentored accomplished at Twitter: One intern did https://t.co/nsFW20j9Hm and another did interesting data analysis then built a working prototype for across the fleet profiling that others were able to use to find real ine … | Continue reading


@joeblu.com | 2 years ago

You Should Squash Merge to main

Every so often I’ll see a meme on Twitter like: and it makes me so mad. For good reason! OSS project repositories that support merge commits to main are usually littered with useless comments like: “Merge change from $USER, $PR”. It makes the commit history on main utterly useles … | Continue reading


@joeblu.com | 2 years ago

Why I (Still) Use Vim

Every so often I wonder if I’m making trouble for myself by doing all of my typing in vim. Writing for this blog, writing engineering plans and design documents, and writing code. There are tools that are made especially for doing these jobs, and vim certainly doesn’t have any fa … | Continue reading


@joeblu.com | 2 years ago

My Country, Tis of Thee

I’ve spent a lot of time the last 3 years watching Umberto Eco’s sign’s of Ur-Facism manifest, and manifest, and manifest. I’ve seen a lot of things that I was raised to believe ~wouldn’t~ couldn’t happen here happen in sequence, with frightening speed. Out-of-control (willfully … | Continue reading


@joeblu.com | 4 years ago

Font Measurements

TLDR; I learned a bunch about rendering fonts and I thought it would be interesting to read about them from a programmer’s perspective. I gained a ton of empathy for type design and type-setting developers, as they work with a dizzying variety of screen resolutions, font styles, … | Continue reading


@joeblu.com | 4 years ago

Influence

I got an email from an old co-worker the other day: I was thinking about you and how you are a person I see as not being particularly embroiled in office politics, but also as having a lot of influence and knowing how and where to leverage it. I was curious if you had any words o … | Continue reading


@joeblu.com | 4 years ago

Lucky

We went through layoffs at work recently. Like a lot of companies, the belt is tightening, and the bathtub drain is getting blugged. I’m lucky to have not been laid off. Lucky again - this is the third “surprise” layoff where I’ve kept my job. I’m batting 1.000 but I know my numb … | Continue reading


@joeblu.com | 4 years ago

Fast is a Feature

We all use dozens of pieces of software a day - email clients, web browser, email clients inside web browsers. Cameras and chat, digital art tools and spreadsheets. We switch between them dozens of times, and when we really get into a task, when can sometimes achieve a state of f … | Continue reading


@joeblu.com | 4 years ago

Beef Barley Mushroom Soup

This is adapted from Tom Lacalamita’s Pressure Cookers for Dummies, but you should use the Serious Eats method of browning stew beef in one large piece, then cubing it before cooking, for better results. Ingredients 1/2 lb stew meat 3 carrots, thinly sliced 3 stalks of celery, sl … | Continue reading


@joeblu.com | 6 years ago

Ricotta Chicken

The secret here is that you can replace the Butter in Butter Chicken with just about any high-fat dairy product. Ricotta, sour cream, greek yogurt will all work. They change the flavor of the dish, but they’re all good variations. This is adapted from a recipe in Tom Lacalamita’s … | Continue reading


@joeblu.com | 6 years ago

Pressure Cooker Red Beans and Rice

Red beans and rice is simple, fast and good. Use a good hot sauce, use more seasoning than you think you’ll need. This recipe scales well - 2 or 3 cups of beans will fill most normal pressure cookers. Ingredients 2 cups of red beans 1 large onion 1 head garlic 1 cup chopped celer … | Continue reading


@joeblu.com | 6 years ago

Michelada

Originally from Ever in Transit, this is the best tasting version of the drink to me. I like to use the tomato juice from a can of peeled plum tomatoes. I use the whole tomatoes to make sauce, and keep the juice to make two micheladas with. Ingredients Lager beer Tomato Juice 3-4 … | Continue reading


@joeblu.com | 6 years ago

Roberta's Pizza Dough

Originally from the NYT, makes enough for two pizzas. Ingredients 306 grams of flour (50/50 00 and bread, or 100% AP) 2 grams of active dry yeast 4 grams olive oil 8 grams of fine sea salt 200 g of tap water Steps Combine flour and salt in mixing bowl Combine water, oil, and yeas … | Continue reading


@joeblu.com | 6 years ago

Persimmon Roses

My wife found this recipe on tastemade.com. These are fatty, sweet, and delicious. Great brunch food. Makes 4 roses. Ingredients 2 persimmons 1 sheet of puff pastry 1/4 of a wedge of brie 4 slices of prosciutto Equipment Muffin tin Steps Cut the persimmons in half from the top, t … | Continue reading


@joeblu.com | 6 years ago

Garage Shelves

I started taking paternity leave on my first daughter’s due date. (Un?)fortunately, she was born late, and I found myself with both a lot of free time, and a lot of pent-up anticipatory energy. My workshop was a bit of a mess, since I’d acquired more tools - including a heavy mit … | Continue reading


@joeblu.com | 7 years ago

Guitar Shelf

I have a lot of guitars and ukuleles, and I was also feeling like I hadn’t played them enough. When we moved at one point, I sold all my guitars but one, but that honeslty didn’t last too long. Now that I own a home, it was high time to build myself a real place to keep them. Kee … | Continue reading


@joeblu.com | 7 years ago

Workbench

Every workshop needs a good work bench. A good bench is stable and flat, letting you estimate the flatness of your workpiece, and with plenty of space to hold the work and clamp it down. You can buy nice workbenches for many hundreds of dollars, and then you can buy nice clamps f … | Continue reading


@joeblu.com | 9 years ago

Cardsharp

I’m a big fan of Zach Gage’s games. He recently released a game called “Sage Solitaire” in which solitaire is played with poker hands. You can make a Full House, Straight, Straight Flush, etc, to clear cards from the board. To choose what hands to make, it’s pretty important to k … | Continue reading


@joeblu.com | 9 years ago