Sign in to keep reading
“Phase Two: The Feature” is free with an account. Your progress and bookmarks follow you across devices.
Sign in to continueNEW: ML Mock & Coaching with a 20+ year experience coach. Save $20 on sessions for Premium.ML Mock & Coaching now available
NEW: ML Mock & Coaching with a 20+ year experience coach. Save $20 on sessions for Premium.ML Mock & Coaching now available
Minutes 24 to 34. Splitting the work with the model out loud, keeping the decision that has a trade-off in it, and writing the test yourself before generating anything around it.
“Phase Two: The Feature” is free with an account. Your progress and bookmarks follow you across devices.
Sign in to continue"Good. Now I'd like limits to be per-user rather than global."
Ten minutes. The feature is genuinely small — a dictionary of buckets keyed by user, and allow taking an identifier. One prompt could produce all of it.
That is exactly why this phase discriminates so sharply. When the work is easy enough to hand over wholesale, what you choose not to hand over is the entire signal.
Before prompting anything, there is a question worth thirty seconds: where is the judgment in this feature?
Most of it is mechanical. Wrapping the existing bucket in a dictionary, routing the call, creating a bucket on first use — there is one obvious correct shape and no real alternatives. Nothing to decide.
One part is not mechanical. Every user who ever makes a request gets a bucket, and nothing ever removes it. That dictionary grows forever. What you do about it is a genuine choice:
| Eviction, and What Each Choice Costs | ||
|---|---|---|
| Approach | What you get | What it costs |
| Never evict | Nothing to build, perfectly accurate | Unbounded memory — a slow leak that becomes an incident |
| Drop buckets that are full and idle | Cheap, and safe: a full bucket is indistinguishable from a new one | Needs a sweep, and a threshold you have to justify |
| LRU with a hard cap | Predictable memory ceiling under any load | Can evict an active user's bucket, briefly resetting their limit |
That middle row contains the one real insight available in this phase, and it is worth stating out loud when you get there: a full bucket and a brand-new bucket behave identically, so throwing away a full idle bucket costs nothing at all. That is a fact about the data model, not a generic caching opinion, and it is the kind of thing that gets quoted back in a debrief.