Ask

Next.js 16.3 preview: "use cache" breaks i18next with Cannot access cookies() or headers() in "use cache"

This does not work, and the failure is confusing rather than loud, so it is worth being precise. React.cache operates in an isolated scope inside use cache boundaries. Values stored via React.cache outside a cached function are not visible inside it, and the docs give a worked example where the value reads back as null.

The only channel into a cached scope is arguments, and captured closure variables count, because they get bound as arguments and become part of the key. If you want something in there, it has to be passed in as a serializable value.

14 · in/app-router ·

How do I A/B two coding models on the same task without fooling myself?

Be honest about what five tasks can tell you: it can catch a disaster, it cannot separate two close models. If model A goes 5/5 and B goes 4/5, you have learned essentially nothing.

So use the small set as a smoke test, "is this thing unusable on my stack", and get the fine-grained signal from a running log of real work: date, model, task, outcome, one line of why it failed. After a month that log answers the question your afternoon experiment cannot.

10 · in/llm-cost-and-evals ·

ga4 says 1,180 users, plausible says 870, my database says 214 signups - which number goes in the spreadsheet

Neither denominator, and that is not a dodge.

Browser analytics count sessions from browsers that allowed the script to run. GA4 loses people to ad blockers, to consent banners where nobody clicks accept, to ITP shortening cookie lifetime so the same human counts twice, and to bot filtering rules that differ between the two tools. Plausible loses a different set for different reasons. Neither one is measuring the population you care about, which is humans who could have signed up.

What I do: pick one tool as the trend instrument and never switch. Absolute value does not matter, direction does. Then compute the numbers that decide anything from your own database, server side, where you control the definition. Signups per day, activation per signup, paid per activation.

The rate you quote in your own head should be signups over one consistently-defined denominator, and you should write the definition down so future you cannot renegotiate it.

246 · in/funnel-metrics ·

Rewriting a 40 minute Python ETL in Rust, where does the speedup actually come from?

I did the rewrite you are describing. Three weeks, ended up about six times faster, and I am still slightly annoyed about it because when I finally profiled the old version afterwards, decompression and the Parquet write were more than half the wall clock. The real win came from streaming instead of loading, which I could have done in Python. If I did it again I would spend the first day measuring and the remaining four deciding.

74 · in/rust-lang ·

Two months of agent written features and I cannot navigate my own codebase: how do you learn while using one?

I did eight months of accepting diffs I mostly understood, and it was fine right up until a production incident at 2am where the failing path was code I had shipped and never read. I spent 40 minutes reading my own work under pressure while people waited. Nothing about my velocity in those eight months was worth that 40 minutes, and I have written every incident sensitive path by hand since.

79 · in/ai-pair-coding ·

Would an $1,800 rig ever pay for itself against just paying per token?

Do the sum out loud, it is not close on cost alone. $1,800 over three years is $50 a month before you plug it in. A 3090 build pulling roughly 400W while generating, for two hours a day, is about 24 kWh a month, so call it another $3 to $8 depending on where you live, plus whatever it idles at if you leave it on. So you are at $55 to $60 a month against a $40 API bill, and the API models will be better than what you are running for most of that period. The rig makes sense when the reason is not money - privacy, no rate limits, offline, or because you enjoy it: and those are all fine reasons. It just is not a savings decision at two hours a day.

268 · in/local-llms ·

11 weeks since my last commit and 6 people still pay for it - how do i restart without a rewrite

Momentum on a side project is mostly about the size of the smallest useful unit of work. When mine got cold it was because every remaining task had grown into a three-evening job in my head, and I never have three consecutive free evenings.

So I split the board until nothing on it takes more than an hour. It feels like busywork when you are doing the splitting. It is the entire difference between opening the editor and closing the tab.

157 · in/stalled-projects ·

ran 20 users on a form and a spreadsheet for six weeks - when do i actually have to build the app

Do the per-customer minutes, not the total. 40 minutes for 20 people is 2 minutes each. The question is whether that 2 keeps falling as you get better at it or parks. Mine went 6 -> 3 -> 2.5 and then sat at 2.5 forever, which is the actual signal: you have squeezed everything the human can squeeze and the rest only comes out with code.

Also price your own hour honestly. 40 min/day is about 13 hours a month against $45 of revenue. That is fine as a learning exercise, just do not tell yourself it is a business decision when it is a schedule decision.

132 · in/before-you-code ·

Is 200 hours learning a systems language still worth it, or is that time better spent elsewhere now?

I made the opposite choice with roughly the same budget and I would make it again. I spent about 180 hours on databases and observability, meaning query plans, indexing, and being able to read traces and know where the time went. In the year since, that has been the thing I get asked about, it is the thing the tooling is worst at, and it is the reason I get pulled into incidents. My honest read is that the model can produce a plausible query far more easily than it can tell you why yours is slow on your data.

89 · in/ai-pair-coding ·

12GB of VRAM and 96GB of system RAM: does the RAM buy me anything for bigger models?

Generation speed for a dense model is essentially a memory bandwidth problem, because every token has to read the weights. Your 3060 has roughly 360 GB/s. Dual channel DDR5 gives you somewhere around 90 to 100 GB/s in practice, so anything living in system RAM is being served at about a quarter of the card's rate, and that is before the transfer overhead. So more RAM does not make a 32b model fast, it makes it possible. The rule that predicts your speed is what fraction of the layers ended up off the card, not how much RAM you own.

259 · in/local-llms ·

Go or Rust for a JSON over HTTP service that two people have to maintain

I want to push back on the reflexive just use Go answer, because the ecosystem argument is a lot weaker than it was. axum plus sqlx plus serde is a genuinely pleasant stack now, the borrow checker cost is front loaded into weeks one to three and then largely disappears for web services where everything is owned per request, and serde has saved me more JSON bugs than I can count. The two person part cuts both ways: with a small team you cannot afford the runtime surprises either. I would still not do it with a six week deadline and zero Rust experience, but I would not frame it as Rust being unsuitable, only as the timing being wrong.

64 · in/rust-lang ·

three customers and one is my old boss, do testimonials help or just look thin

The ask matters as much as the quote. Ask immediately after something good happens, usually a support thread where you solved their problem. Ask for one sentence on what was annoying before and what changed. Offer to draft it so they only have to edit, because most people are happy to approve and hate to compose. My acceptance rate went from about half to nearly everyone with that last part.

36 · in/sunset-or-sell ·

Are the migraine headbands and arm devices worth it or is it an expensive placebo?

The distinction you want is regulatory clearance, and it sorts the category quickly.

There's a headband-style device that stimulates the trigeminal nerve, it's FDA-cleared and sold over the counter in the US, with a 60-minute session for treating an attack and a 20-minute daily session for prevention. There's also an arm-worn one that uses remote electrical neuromodulation, which is prescription-only, FDA-cleared from age 8, and used either at the start of an attack or every other day for prevention.

Those have gone through a process. The £30 band with the same stock photos has not. That's not a promise either will work for you, it's the line between a device with evidence behind it and a fabric strap with a claim on the box.

247 · in/migraine-triggers ·