BLACK LABELAcademy
← Our Failures

Hardcode-and-cache is a 'very bad fix.' Honor the real parameter and wire the general path; fix the cause, not the symptom.

intermediate5 min read · updated 2026-06-20

Market & numbers — every figure sourced

prod_fix_cost_multiplier100 x vs design-phaseBlack Duck — Cost to Fix Bugs During Each SDLC Phase (citing IBM Systems Sciences Institute)
tech_debt_share_of_estate30 percent of technology estate value (midpoint of 20-40%)McKinsey — Tech debt: Reclaiming tech equity (survey of 50 CIOs, 2020)
new_product_budget_diverted15 percent of new-product tech budget (midpoint of 10-20%)McKinsey — Tech debt: Reclaiming tech equity

Hardcode-and-cache is a "very bad fix"

A user asked the assistant for the weather. It answered correctly. Ship it, right? Except the next user asked for a different city and got the same answer. And the next. Every query, regardless of the city in the request, returned the weather for one hardcoded location.

The "fix" that caused this was the kind that feels productive in the moment: the weather lookup was flaky, so someone pinned a known-good result and cached it. The symptom (a failing lookup) disappeared. The cause (a general path that didn't honor the input parameter) was never touched. The system now lied confidently to everyone who wasn't asking about that one city.

This is the archetype of a band-aid: it makes the red light turn green without making the underlying thing true.

What we tried

The flaky path was a weather query that sometimes failed or returned slow. The instinct was to make the failure stop:

The test in front of us passed. The demo worked. The general behavior was broken for every case we didn't personally type in.

What broke

A band-aid doesn't remove the failure — it relocates it to a place you're not looking and a time when it costs more to find.

The fix

Honor the real parameter. Wire the general path. Fix the cause, not the symptom.

For the weather case that meant: take the city the user actually asked for, pass it through to the real general lookup, and fix that path's flakiness (retry, timeout, fallback to an honest "couldn't fetch") instead of pinning one answer. The repair is to make the general case true, not to make one specific case look true.

The diagnostic that gets you there is the Five Whys — keep asking "why" until you hit a systemic, fixable cause instead of a symptom you can paper over:

Stop at "make the error stop" and you ship a lie. Push to the fifth why and you fix the system: honor the input, harden the real call, and add a test that varies the parameter so a future band-aid can't pass.

Apply it

Sources

© 2026 Black Label · Education, not financial or legal advice. Every number is sourced or labeled an estimate. Subscribe for $30/month