Drizzle SQLite Setup: One Schema, No Drift A five-folder Drizzle layout that kills schema drift and mystery rows — and why the config reads a directory instead of a file. The Problem You add a user_events table, generate a migration, restart, and get no such table: user_events. Local worked last week because you ran raw SQL by hand. Here is the bug hiding in plain sight: // drizzle.config.ts export default defineConfig({ schema: "./src/db/schemas/index.ts", // hand-maintained barrel out: "migrations", dialect: "sqlite", dbCredentials: { url: "./local.db" }, }); src/db/schemas/table/user/userEv
A kitchen plan typically draws one person at a time. When two people rinse vegetables and prepare dinner at once, the drawing no longer answers its own question: where does each person stand, and where do their work paths stop? This is a small data-modelling problem, not a construction problem. The goal is to take a plan with fixed positions and describe two simultaneous occupied zones, then check whether those zones overlap. Nothing here produces installation or safety guidance. Synthetic input, clearly illustrative We describe a simple kitchen with a washing zone and a preparation zone. All
Say you're building an MCP client that needs to talk to an MCP server protected by Auth0. There's no existing relationship between your client and that server's tenant, so how does the authorization server know who you are before it hands out a consent screen? For a while, the answer was Dynamic Client Registration (DCR): the client calls the authorization server's /register endpoint, the authorization server stores a new client record, and everyone moves on. It works, but it means every authorization server has to run an open registration endpoint and manage a database of client records it ca
Few areas of modern computing attract as much sweeping storytelling—and as much confusion—as quantum computing. One week, headlines claim quantum machines will transform artificial intelligence, energy research, and medicine overnight; the next, they warn that digital security is about to unravel. For anyone exploring quantum computing for beginners, separating solid computer science from sensational claims takes deliberate effort. Much of that confusion starts when people treat quantum hardware as a faster version of the laptops, phones, and cloud servers powering today's workloads. Some obse
Whenever I catch a cold that lasts a little too long, it somehow finds its way to my ears. The pain is unbearable, and it has been this… Continue reading on Medium »
Why the first token is slow and the rest are fast, measured on a laptop, and the cache that cut the wait from 9.4 seconds to 0.4. Continue reading on Medium »
Will anyone believe me if I say there are people in this world who feel they are not anyone’s priority even when they are good at… Continue reading on Medium »
You test a feature on your home Wi-Fi and it's perfect. You ship it, and then the reviews arrive: "Won't load on 4G", "Spinner forever"… Continue reading on Medium »
Of course, bosses have always been in favor of this. It’s one of the attractions of being the boss. A consistent set of rules is easier to understand and enforce. One set of rules for behavior, reward and consequence is easier to justify from a moral perspective as well. And yet, as Sahlins and Graeber […]
Hey there, fellow tech enthusiasts and curious minds! Ever just, like, stop for a second and wonder what’s really making all our software… Continue reading on Medium »
Your code can compile, pass every unit test, and still bring down a production system. Here are 15 C# mistakes that experienced developers… Continue reading on Medium »
OpenAI, Claude and Gemini all publish their API pricing per million tokens, but that number alone does not tell you what an AI feature will cost each month, or whether your subscription price still leaves a profit. I built a free AI API Cost Calculator to turn token prices into a monthly number before choosing a model. In this guide I compare current OpenAI vs Claude vs Gemini API pricing, show how to turn those rates into cost per user with a worked example, explain what changes the bill more than the model, and how to check your margin before you launch. OpenAI vs Claude vs Gemini API pricin
Telegram stickers come in three formats: static WebP, animated .tgs, and video .webm. Almost nothing outside Telegram opens a .tgs, so anyone saving a pack usually wants PNG for the still ones and GIF for the moving ones. I look after a small web page that downloads sticker packs, and I recently rewrote its conversion so it runs entirely on decoders the browser already has. These are my notes on how that works, and on why the first version, built on FFmpeg.wasm, is gone. Why FFmpeg.wasm went away The first version converted everything with FFmpeg.wasm. It worked, but it had two costs I only me
Elon Musk'ın sahibi olduğu sosyal medya platformu X, kullanıcıların uzun süredir yaşadığı sorunlardan birini çözmeye hazırlanıyor. Platform, zaman akışının yanlışlıkla yenilenmesi durumunda kullanıcıl...
Write one fixed visual description per character, generate a reference portrait and seed shots with it, lock a single visual style for the whole series, and carry each scene’s final frame into the next. An AISP episode playing, with subtitles, share and script buttons and the next episode queued. Why characters drift An image or video model has no memory. Each shot is drawn from its prompt, so “Ada, a detective” becomes a different woman every time. Vague descriptions make it worse, and so does changing the style partway through: a character drawn as anime in one scene and photoreal in the nex
Your AI agent just wrote you a useful script. It ran, it worked, and now it's in the chat history. How do you use it again? Next week you scroll back through old chats to find it. Or you ask again and get a slightly different script, with different flags, and check it all over again. Or you copy it into a .sh file, and then you're back to finding the file and editing it, like every other part of this series. The agent already knows how to run commands. So let it save the script too, somewhere you can run it without the agent. With cmdbook, the agent saves the script as a command, runs it, and
Some hosting customers would rather pay in Bitcoin or USDT than by card. The usual route is a crypto payment processor: it collects the coins, takes a cut, and pays you out later. That means a third party holds your money for a while, on its fees and payout schedule. The alternative is to have customers pay straight into a wallet you control, with WHMCS doing the bookkeeping. This post covers the decisions involved, whatever tool you use. Why "here's our address" isn't enough Printing a wallet address on the invoice and marking invoices paid by hand falls apart quickly: the customer has to wor
Running a small online store gave me a question I wanted to answer with data. When an order comes in, can I tell which link, campaign, or piece of content brought the customer to the shop? At Daniel Mason®, I use tagged links to bring readers from the brand’s journal to the Shopify store. To check what happens after that click, I built a small service with Cloudflare Workers that reads orders from Shopify. The first useful result was a better understanding of what the order data could actually tell me. Reading orders through a Cloudflare Worker I set up a Shopify app with the read_orders scope
Character length validation Last episode we stopped short of validating maxlength and minlength, because for some historical reason, browsers are stuck in history, and cannot validate the length, without real user input. Today we will create our fig leaf to cover this defect. We add a textarea and set its value programmatically to be more than the maxlength. Then submit form, to reproduce the issue. The current state of this component can be found on Stackblitz <script> const formState = $state({ history: 'here is the life span of a little junior grown too fast named Steve' }); const submit =
We spent years trying to eliminate the boring parts of programming. Somehow, we ended up automating some of the most rewarding ones. Continue reading on Javarevisited »
On H200, one new decode kernel reaches 67-75% of peak memory bandwidth at batch sizes 32 to 128 while reading a 4-bit cache, about half the bytes of an 8-bit one. What they did Serving a large language model is mostly about memory. Each new token has to read a store of past attention values called the KV cache. The bigger that store, the slower each step, and the fewer requests fit on one GPU. Three recent papers attack this from different sides. One makes a 4-bit KV cache fast on Hopper GPUs by writing a new decode kernel. Another adds the grammar as a second drafter in speculative decoding,