Section 11: Doors Left Unlocked - Follow-up Feature Evolution
Executive Summary: The interviewer stops attacking and starts asking for features. Each one gets the same three questions: is it a firework or a flag, which earlier decision does it flip (if any), and which door did we leave unlocked for it? Custom reactions and engagement reports slot into paths we already built. Auto-lower on speaking and Q&A upvotes add a new writer and new state behind the same owner. Reactions in the recording is the one feature that truly flips a decision, and chat-message reactions is the one you must refuse to put on this pipe at all.
"Nice. It ships, and product has a backlog. Walk me through how your design absorbs these." One weak candidate finds every feature needs a rewrite (the design was brittle). Another says "I already built for that" (the scope was padded). The strong answer: each feature arrives through a door deliberately left unlocked, and you can name the door. Section 1's sorting question does most of the work: can we lose this, or must we keep it?
Feature One: Custom Reactions and a Bigger Emoji Set
"Marketing wants tenant-branded reactions and skin tones." Pure firework, so it stays on the event path. One data shape changes: the owner's accumulator from Section 5 holds counts[5], a fixed array. It becomes a small map keyed by reaction code, and the frame carries counts: {code: n}.
The risk is the frame, not the pipe. Today a reaction.burst frame is ≤ 300 B: 5 counts plus up to 10 sender IDs. A naive map grows with the emoji catalog, so we cap distinct types per frame at the top 8 by count and fold the long tail into the client's counter bubble. The rejected alternative, sending every code that appeared, is harmless in a 5-person meeting and wasteful at 4 frames/s × 1,000 recipients. Flip trigger: if one specific emoji must never be dropped (a formal "acknowledged," say), it has stopped being a firework and belongs on the state path.
Door left unlocked: The coalescing stage never cared how many types exist, and the token bucket counts reactions, not kinds.
Quick check before moving on:
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson