YouTube Video Script: My Closet Is an LRU Cache

Suggested title: My Closet Is an LRU Cache Suggested length: 4–6 minutes Tone: Casual, first-person, conversational — you at your closet, talking to the camera like you'd explain it to a colleague over coffee.


Video Concept

The video has three acts: show the system, reveal the computer-science connection, then tie it back to your C# cache work. You film at your actual closet for acts one and two, then cut to a screen recording or whiteboard for the brief code/diagram bit in act three.


SCRIPT

COLD OPEN (at the closet, camera on you)

[You're standing in front of your open closet. The bar is visible behind you.]

I have a system for hanging clothes in my closet. It's nothing fancy. Shirts on the left, trousers on the right, empty hangers in the middle.

[Turn and gesture at the bar, pointing out each section.]

When clean laundry comes back, it goes onto a hanger from the middle and gets placed right here — at the inside edge of its group. And when I get dressed in the morning, I always grab from the ends. Not the middle. The ends.

[Pull a shirt from the far-left end of the bar to demonstrate.]

Over time, the clothes I actually wear keep cycling through the middle, and the stuff I don't wear slowly drifts out to the edges. Once a year, I just pull out whatever's been stuck at the ends and donate it. No agonizing, no “but I might wear this someday.” Gone.

It's a good system. But here's the thing — I'm a software developer. And one day, I was explaining this to someone, and I heard myself describing something very familiar.


ACT 1 — THE REVEAL (~1:30)

[Cut: still at the closet, but now you're in “explaining” mode.]

What I built, without meaning to, is a physical LRU cache.

LRU stands for Least Recently Used. It's one of the most common cache-eviction policies in computer science. Operating systems use it, databases use it, CDNs use it. The idea is dead simple: when the cache is full and you need to make room, you kick out whatever hasn't been touched for the longest time.

[Gesture at the closet bar.]

The closet bar is my cache. Each hanger is a cache entry. Putting away clean laundry is a write operation. Getting dressed is a read. And the annual donation? That's the eviction policy firing.

[Pick up a shirt from the end.]

This shirt hasn't been accessed in a long time. It's the least recently used item in the cache. Time to evict.

[Toss it toward a donation bag or box, visible nearby. Maybe smile.]


ACT 2 — THE DATA STRUCTURE (~1:30)

[Cut to a whiteboard, a tablet, or a simple on-screen diagram. You can be on camera beside it or do this as voiceover.]

The closet bar is actually a deque — a double-ended queue — with insertion in the middle. Items enter at the center and get consumed from the ends.

[Draw or show a simple horizontal diagram: oldest shirts ← newest shirts ← EMPTY HANGERS → newest trousers → oldest trousers]

In software, you'd typically implement LRU with a doubly-linked list and a hash map, so you get O(1) for both lookups and reordering. My closet version isn't O(1) — it takes me a few seconds to find what I'm looking for — but it has something better: zero cognitive overhead. I don't have to think about it.

The partitioning is interesting too. Shirts on one side, trousers on the other — that's two separate caches sharing the same physical bar, each with its own eviction stream. If you've read my articles on implementing a set-associative cache in C#, that should sound familiar. Same concept, different medium.


ACT 3 — WHY IT WORKS (~1:00)

[Cut: back at the closet, or seated casually.]

The reason this system actually works isn't the rotation, although that's nice. It's that it removes the decision.

Cleaning out a closet is hard because of the decision-making. You pick up a shirt and think, “I might wear this next month,” or, “I paid good money for this.” And then you put it back, and nothing ever leaves.

The LRU system eliminates that. If a shirt has been at the end of the bar for a year, the data is clear: I don't wear it. I don't need to know why. The algorithm already sorted it. I just execute the eviction.

And honestly, that's the same reason LRU is so popular in software. It's simple, it requires minimal bookkeeping, and it works well in practice without needing to understand why something is or isn't being used. The cache doesn't care about your reasons. It just watches the access pattern.


OUTRO (~0:30)

[Casual, direct to camera.]

If you're a developer, you already think this way about software. You write systems that make decisions so humans don't have to. This is the same idea, just built out of a closet rod and some wire hangers instead of C# and .NET.

I wrote a longer article about this on my site, and if you want to go deeper on the computer-science side, I have a whole series on implementing a set-associative cache in C# with LRU, MRU, and LFU policies. Links are in the description.

Thanks for watching.


PRODUCTION NOTES

B-roll / cutaway suggestions:

  • Close-up of your hands placing a shirt onto a hanger in the middle section
  • Close-up of grabbing a shirt from the far end
  • The donation bag or box
  • Screen recording or whiteboard diagram of the cache layout
  • Optionally, a brief screen capture scrolling through your C# cache code on GitHub, just a few seconds as a visual reference during the set-associative cache mention

Thumbnail idea: You standing at your open closet, holding up a shirt with one hand, with a text overlay like “LRU CACHE” and maybe a small diagram arrow pointing at the closet bar. Keep it simple — the juxtaposition of “closet” and “cache” is the hook.

Description template:

My closet organization system turned out to be a well-known computer-science algorithm. Here's how a simple habit of hanging clothes mirrors the Least Recently Used (LRU) cache eviction policy.

Article: [link to parkscomputing.com article] Set-Associative Cache in C# series: [link to Part 1] GitHub repo: https://github.com/paulmooreparks/SetAssociativeCache/