Post
Learn the Fundamentals Behind Your System Design Answers with Basis Lab
Drawing a cache is easy. Explaining why it helps is where interviews are won. Why we built Basis Lab, an AI tutor for the fundamentals under system design, with a worked caching example and the free courses that map to interview topics.
By Codemia • October 9, 2026
6 min read
Most system design answers fail one level below the diagram. You draw a cache in front of the database, the interviewer nods, and then asks: "Why does that help? How big does it need to be? What happens when it is wrong?" The box was easy. The reasoning under the box is the interview.
That reasoning is fundamentals: why traffic is lopsided, where a query's time goes, what a network partition forces you to choose, why adding workers stops helping. Most of us half-learned these from blog posts and never had to defend them.
We built Basis Lab to close that gap. To be upfront: Basis Lab is made by the same team that builds Codemia. Codemia is where you practise designing systems. Basis Lab is where you learn the ideas those designs rest on.
What Basis Lab is
Basis Lab is an AI tutor built for learning, not for running tasks. You tell it what you want to learn and it writes an interactive course at your level, around 12 lessons long, with figures drawn for each lesson.
Three things make it different from asking a chat assistant:
- Ask about any sentence. Highlight a line you do not follow and ask your own question. The answer is written right there, for that exact point, and you can open each answer again and go deeper without losing your place.
- Practice made for what you just read. Quick questions between paragraphs, written explanations marked against the points you missed, math checked line by line, and code run against tests.
- It keeps track of you. Every answer tells it what you have down and where you are shaky, and later lessons and practice lean toward the gaps.
A worked example: why a cache works at all
Here is what that looks like on a topic every system design candidate meets. This comes from the first lesson of Keeping the Answer Nearby, a course in the free library.
The lesson opens with one sentence that reframes the whole topic: a cache is a bet that you will be asked the same thing again. Then it shows why the bet usually pays.
Traffic is lopsided. Take a million items and a million requests. If requests were spread evenly, every item would be asked for once and a cache would be useless. Real traffic is nothing like that. In the lesson's example day, the hundred most popular items take 31% of requests and the next nine hundred take 29%. So a thousand items out of a million absorb 600,000 of the million requests.
So the first megabyte is worth the most. You do not need a cache sized to your data. You need one sized to what is in demand this hour, which may be a thousandth of the whole. Doubling a cache that already holds the popular items adds little, because the newly kept items are ones nobody is asking for.
Popularity alone does not decide what to keep. What a kept answer saves is how often it is asked for, times the difference between producing it and fetching the copy:
saving per hour = requests per hour × (cost to produce − cost to fetch the copy)
An answer that takes one second to build and is wanted 10 times an hour saves 10 seconds an hour. One that takes a tenth of a millisecond and is wanted 10,000 times an hour saves one second. The slow, less popular answer is the better thing to keep.
And the uncomfortable case. If fetching the copy costs almost as much as producing the answer, the difference collapses. The cache then saves nothing while still costing memory, complexity and a new way to be wrong. Caches placed across a network from the thing they cache sometimes land exactly there.
Each of those four points is a ready answer to a follow-up question in an interview. The remaining seven lessons cover what a hit is actually worth, eviction, staleness, where a cache should sit, how caches fail (including the stampede when a popular entry expires), sharding keys across machines, and how to tell whether a cache is earning its place.
The free courses that map to interview topics
The library has 26 finished courses, written before you arrive. You can read the first lesson of each one in full without an account, plus the opening of every other lesson. These are the ones closest to system design interviews:
| Interview topic | Basis Lab course |
| Caching, CDNs, hot keys | Keeping the Answer Nearby |
| Replication, partitions, consensus | When One Machine Is Not Enough |
| Indexes, query plans, slow reads | Why a Query Is Slow |
| Locks, transactions, concurrency limits | Doing Two Things at Once |
| SLOs, error budgets, alerting | Running a Service That Stays Up |
| Search and retrieval systems | Finding Things by Meaning |
| Latency, queues, throughput | Serving a Model to Many People |
If you are preparing for ML system design, the rest of the library goes underneath the models themselves: backpropagation, cross entropy, attention, what it costs to run a model, and how to read a benchmark honestly.
How to use it alongside Codemia
The two fit together in a loop:
- Practise a design on Codemia. Write your answer to a problem and get feedback on what you covered and what you missed.
- Take the gap to Basis Lab. If the feedback says your caching section never addressed invalidation, or your database choice never explained the read path, read that lesson and work its problems.
- Go back and redo the design. Now the box on your diagram comes with the reasoning an interviewer will probe.
What it costs
Your first course is free from start to finish: not a sample and not a trial clock, and no card to begin. You pay only when you want a second course written for you. The plan is $19 a month or $99 a year, and the courses you have already started stay yours if you cancel.
Try it
Pick the topic that has cost you the most in mock interviews and start your first course on Basis Lab, or begin by reading the free library.
Then put it to work on one of the free system design problems on Codemia, where you write your own design and get AI feedback on it.