- MySQL – Storing Hierarchies with a Closure Table
Trees in a relational database. The adjacency list everyone starts with and the query that makes it painful, MySQL 8's recursive CTE which fixes most of that, and the closure table — one row per ancestor-descendant pair — which trades write cost and storage for subtree reads that are a single indexed lookup. When each one is the right answer, with the numbers.
- LeetCode 71 – Simplify Path
A stack problem disguised as string manipulation, and the stack is not an optimisation — it is the only structure that models what .. means. Splitting on / handles doubled and trailing slashes for free, popping an empty stack must be a no-op, and "..." is an ordinary filename.
- AWS – S3: Buckets, Policies and Static Sites
S3 as the service everything else leans on. Storage classes and the lifecycle rule that moves objects between them, versioning as an undo button with a bill attached, and Block Public Access — which should stay on, because a static site is served through CloudFront with OAC, not a public bucket. Ends with the bucket that serves this site: private, one policy, one distribution allowed to read it.
- LeetCode 70 – Climbing Stairs
Fibonacci wearing a hard hat, and the smallest problem where the recursion-to-DP conversation happens naturally. Recognising the sequence is nice; being able to say why it is Fibonacci is the answer, because the recurrence is what survives when the step sizes become arbitrary and it turns into Coin Change.
- MySQL – EXPLAIN and Reading a Query Plan
Finding out what the optimizer decided instead of guessing. Reading EXPLAIN column by column, what the `type` values mean from `ALL` to `const` and which ones should worry you, `key` and `rows` and how rough the estimate is, EXPLAIN ANALYZE for actual timings rather than predictions, EXPLAIN FORMAT=JSON, and a worked example taking one slow query from a full scan to an index lookup.