The Prerequisite Trap

3 min read

How Not to Learn System Design

The coffee was hot, the terminal was clear, and the goal was set: today was the day I finally conquered System Design and Backend Systems. It was time to level up from standard full-stack applications and understand how to architect highly scalable, distributed systems.

It starts here...

5:00 PM: I open up a highly recommended youtube video on distributed architectures. The first chapter dives into database sharding, concurrency, and thread pools.

5:30 PM: I pause. The video keeps referencing CPU context switching and memory allocation. A nagging thought creeps in. How can I truly design a massive, scalable backend system if I don't deeply understand how the underlying operating system handles processes and memory? It feels like trying to build a skyscraper without understanding concrete.

6:00 PM: The pivot. I close the System Design tab. New plan: I am going to learn Operating Systems first. Just a quick detour to master process scheduling, virtual memory, and file systems.

7:30 PM: I am three chapters deep into an OS textbook PDF. It is incredibly dry. Reading about mutex locks and semaphores is putting me to sleep. I'm a developer; I learn by doing, not by reading dense academic texts.

8:15 PM: The "Genius" Idea strikes. I shouldn't just read about an OS—I should build one! Or at least, a simple simulation of one. And since I spend most of my day writing TypeScript anyway, I'll build the OS simulator in TypeScript. A beautiful, strongly-typed, virtual machine running in Node.js.

9:00 PM: I fire up VS Code. npm init -y. tsc --init. I'm happily writing interfaces for ProcessControlBlock and setting up a basic Round Robin scheduler class.

11:30 PM: I am trying to simulate hardware interrupts and CPU clock cycles using JavaScript's event loop and setInterval. It feels incredibly hacky. I'm currently stuck debugging why my virtual memory allocator is throwing a type error when mapping logical addresses to physical frames.

1:00 AM: I stare at my terminal, which is slowly spitting out fake console logs:
[OS] Process 4 swapped to disk.

The realization hits me like a brick. This isn't exciting. This isn't fun. Worse, it has absolutely nothing to do with building better backend architectures. I am writing a fake, single-threaded operating system simulator instead of learning how a load balancer works.

2:30 AM: Actually, the night is deep outside. I hit Ctrl+C to kill the simulator and close VS Code. The entire day has evaporated into a cloud of virtual page faults, and I haven't learned a single thing about System Design.

I lean back in my chair and sigh.

Tomorrow. Tomorrow, I will completely ignore how a CPU allocates memory, and I will actually start learning System Design.