Welcome to nickb.dev, a blog by Nick Babcock! Below are my most recent articles. You can find the history of all my writings in the archive or just find out more about me.


There and back again with zstd zips

A couple years ago, I transitioned zips to brotli compressed tarballs to take advantage of the Content-Encoding header. Now, after running benchmarks showing that zstd in user space has neglibigle costs, I’m transitioning back to zip, but this time files are compressed with zstd.

Read more...


New browser APIs unlock new possibilities

When new browser APIs get announced or are implemented, there is an inevitable push back where people lament privacy, security, or how browsers are too bloated. From someone who uses new browser APIs, they are a welcomed sight as they make the impossible, possible.

Read more...


CycleList: a cyclical activity tracker

I, unironically, wrote a todo app, CycleList, where completing a task has it fall to the bottom of the list with an updated completed time. Tasks completed least recently then bubble up to the top, creating a sort of cycle.

Read more...


Designing Responsive React Components for 2023

Designing responsive web sites is a tale as old as CSS media queries, but with the proliferation of JS component libraries, like React, there is a trap that is starting to become a thorn in the side of rising popularity of server-side rendered (SSR) React.

Read more...


Wasm compression benchmarks and the cost of missing compression APIs

What is the best way to compress data in the browser? Is Wasm faster than JS? I have put together a small site that will let you run benchmarks within the browser.

Read more...


Rethinking web workers and edge compute with Wasm

It dawned on me that I could be treating web workers almost as if I am communicating with a server, and that the same tools for managing application logic for remote communications, can be used for local message passing with web workers. I can also deploy the same client side Wasm on the edge for low latency validation and data extraction.

Read more...


Cloudflare Tunnel saved my home server when my apartment got a new ISP

My apartment building recently switched ISPs. After they finished installing, all the sites I host on my home server were no longer accessible. Cue the panic. My server relied on a publicly addressable IPv4 address, so how I can fix this?

Read more...


Avoiding allocations in Rust to shrink Wasm modules

“Rust lacks a runtime, enabling small .wasm sizes because there is no extra bloat included like a garbage collector. You only pay (in code size) for the functions you actually use.” Easier said than done, as one has to watch out for allocations as they may significantly impact the Wasm module side.

Read more...


Favoring SQL over Redis for an evergreen leaderboard

Redis is a natural choice for a database when showcasing a leaderboard, but sometimes introducing a database for this purpose can be excessive and unnecessarily complicate an application. Don’t overlook that SQL database you’re already employing.

Read more...


DEFLATE yourself for faster Rust ZIPs

The Rust crate for handling ZIP files, zip-rs is quite flexible. The zip crate is compiled with builtin features to support deflated data (among other compression algorithms). This makes it incredibly easy to hit the ground running for reading and writing zips.

We can disable these builtin features. This may sound undesirable, but in fact, it is my new favorite way to integrate zip functionality into apps I write.d

Read more...