Redis Semantics Without Redis: An Embedded State Engine for Counters, Leases and TTLs
A command-line tool should run only one copy of its nightly export at a time. A small web app wants to cap each user at 60 requests a minute. A desktop app needs to remember when it last synced. All three are state: an integer, a timestamp, an owner. All three usually get solved by adding Redis, because Redis has the verbs for them: INCR, SET NX PX, EXPIRE. The app needed the verbs and got a server along with them, a port and a persistence config included.
Spreadsheet Recalculation Inside a Database: Derived Values That Track Their Own Dependencies
A line item’s quantity goes from 4 to 5. The order subtotal should change, and so should the tax, the order total, the customer’s lifetime value and the regional revenue figure on a dashboard. Which of those actually update depends on which code path made the edit, because each one gets recomputed somewhere different: the checkout handler, the invoice renderer, a nightly job, a SQL view somebody wrote for finance. Every copy of the formula is another chance for two screens to disagree.
SQL and Key-Value Over the Same Bytes: An Old Database Idea Worth Making Small
A sensor node writes a reading every few seconds. The firmware wants one thing from storage: put a record by key, get it back by key, as fast as the flash allows. The dashboard on the gateway wants something else, like average temperature by sensor by hour, joined to a table of sites. The usual answer is two databases with a translation job between them, a key-value store on the device and SQLite or Postgres upstream. Then comes a year of debugging the translation: a unit that changed, a row that arrived twice, a field the device encodes one way and the gateway reads another.
Store Changes Instead of Current Rows: An Embedded Database Built Around History
A support ticket asks two plain questions: which plan was customer 4411 on when the August invoice went out, and who moved them off it? The customers table can’t answer either. It holds today’s row. The audit table someone added two years ago holds most of the story, apart from the week a data fix ran a bulk UPDATE in raw SQL and skipped the ORM callbacks that write the audit rows.
Verified Absence Is Evidence: A Database for Recording That You Checked and Nothing Was There
An auditor asks you to show that customer 1187 was screened against a sanctions list on March 3. The screening job writes a row when it finds a match, and customer 1187 has no rows. That fits two histories: the job ran and found nothing, or the job never ran. The database can’t tell them apart, so you hold no evidence either way.
This is the closed-world assumption doing what SQL has always done: a row that doesn’t exist is false. RDF and OWL went the other way with an open-world assumption, where a missing statement means unknown. Neither has a place for the sentence you actually want to store: I looked here, in this way, at this time, and found nothing.
Screening App Ideas Before You Write Code: Four Questions, Starting With Who Pays
App ideas cost nothing. Every one of them looks shippable in a weekend, and then the weekend turns into three months of auth flows, sync bugs, review notes and a paywall that took longer than the app.
So before Xcode or Android Studio opens, put the idea through four questions and write the answers down. Who pays? What problem does it solve? Can you say what it does in one sentence? Why would anyone switch, and what stops Apple from copying it? Ask them in that order. Money goes first because it kills weak ideas fastest, while a kill still costs an evening.
AltSql: Gives IoT Devices a 15 KB Database That Keeps Working When the Link Drops
Anyone who has built the software side of a connected product knows the integration job. The device keeps its readings and settings in one format and the gateway or cloud service wants those same values as rows in a SQL database. Somebody writes a converter. Then somebody has to keep that converter alive for as long as the device stays in the field, which for industrial equipment or embedded systems can easily be ten years. The converter has to handle offline periods, retries, out-of-order updates, and the device’s own data format changing over time.
BareProxy: A Small Go Web Server and Reverse Proxy That Explains Every Routing Decision
Most sites run a thin slice of nginx in front of their application: TLS termination, serving static files from a folder, a couple of routes to a backend service, health checks, and the occasional reload. The configuration grows anyway, one regular expression at a time, until nobody is quite sure which block handles a given URL, and a change that looks safe to one person breaks something in production that another person didn’t know existed.
Precomputing: Keeps Dashboard Answers Ready in a SQLite File as the Data Arrives
Most dashboards ask the same few questions all day long: requests per endpoint, month-to-date usage for one customer, error rates by status code. The usual setup recounts raw rows from scratch on every refresh, or ships every row to a hosted analytics service that bills by the gigabyte. A dashboard that needs to answer quickly on demand either waits for a database query to finish, or pays for a service that stores everything.
Preconfiguration: Writes Coding Agent Setup Files From One Spec and Tests Them on a Clean Machine
Cloud coding agents start each task on a fresh machine. Before the agent can run a single test, something has to install the right runtime, start a database, configure environment variables, and download dependencies. Every platform that runs agents wants those instructions in its own file: Copilot expects a setup workflow, Cursor builds a Dockerfile, other platforms want shell scripts or configuration in other formats. A team that uses two or three agents writes the same setup two or three times, and mistakes usually show up later as an agent session that stalls because a database port wasn’t open or a runtime was the wrong version.