Low-level design and machine coding
Module 17 of the System Design Masterclass. Every lesson here is free to read, with no account.
- 9 lessons
- 3 h 15 min of reading
- 105How a machine-coding round worksWhat happens in a machine-coding round, how the time is spent, what the interviewer scores, and what to build first.12 minCore
- 106SOLID with small examplesThe five SOLID design principles, each shown on a small piece of Python code that you can run: one reason to change, adding without editing, safe substitution, small interfaces, and passing in what a class needs.20 minCore
- 107Strategy, Observer and StateThree patterns that machine-coding rounds reward, each on small Python code: swap a rule (Strategy), tell everyone who asked (Observer), and change behaviour with the status (State).20 minCore
- 108Factory, Builder and the Singleton trapThree creation patterns on small Python code, and the cases where each one is the wrong choice, especially the Singleton, which hides shared state and makes tests fail.12 minDepth
- 109From requirements to classes, with just enough UMLHow to turn a problem statement into classes: find the nouns and verbs, give each rule an owner, draw a class diagram and a sequence diagram in five minutes, and handle a changed requirement with a small edit.23 minCore
- 110Thread safety in codeHow to keep shared data correct when many requests run at the same moment: why a counter loses updates, locks, a check followed by a change, atomic steps, deadlock and lock order, a safe cache, and why a lock in code does not protect many servers.24 minDepth
- 111Case study: LLD parking lotA parking lot from the problem statement to working Python code: find the classes, put the rules that can change in their own small classes, then add monthly passes with a small change.28 minCore · Case study
- 112Case study: LLD elevator and vending machineTwo state machines written as working Python code: a lift (one class for each mode, then a fire alarm as a new class) and a vending machine (a table of legal moves, then a stopped state as three new rows).28 minDepth · Case study
- 113Case study: LLD SplitwiseA bill-sharing app from the problem statement to working Python code: debts as a graph, whole-rupee splits with a leftover rule, one place that joins opposite debts, settling up, and fewer payments worked out from each person's total.28 minDepth · Case study
The AI tutor is the part you sign up for
Reading is free for everyone. A free account adds the tutor, quizzes, notes and your progress.