I've been working with software for a few years now, and I've noticed something uncomfortable.
I can build things.
I can work with React, Node.js, databases, APIs, cloud services, and all the usual stuff that comes with being a software engineer.
But if I stop and ask:
"What is the computer actually doing underneath all of this?"
My mental model gets surprisingly fuzzy.
I know the concepts. I've used them. I've probably explained some of them before.
But knowing how to use something and understanding what is actually happening underneath it are two very different things.
And I want to fix that.
Why I'm writing this
This isn't a course, and I'm not writing this as an expert teaching computer science.
These are essentially my notes while rebuilding my computer fundamentals from the ground up.
I'm trying to connect the things I use every day as a software engineer with what is actually happening inside the machine.
Instead of learning concepts because they're on a traditional CS syllabus, I'm starting with a question:
What do I actually need to understand to reason about a production system?
For me, that means being able to look at a system and understand what's happening underneath my code.
- Why is something slow?
- Where is the bottleneck?
- What happens when something fails?
- Why does adding more memory help in one situation but not another?
- What actually happens when two things execute concurrently?
- Why does a database query become slow?
- What happens to a simple HTTP request between two machines?
I don't want to just know the answer.
I want the mental model that lets me reason about the answer.
The path I'm taking
I'm roughly following the layers that a typical request passes through:
CPU → Memory → OS → Network → Storage → Concurrency → Distributed Systems
So the series will go through:
1. What Actually Happens When Code Runs
Starting from the bottom: CPU mental model, memory hierarchy, and number representation.
2. Operating Systems
Then moving up into processes, threads, virtual memory, and system calls.
3. Networking: From fetch() to Packets
Following a simple network request through network fundamentals, IP, TCP, DNS, and HTTP.
4. Databases + Storage
Understanding what happens below a database query: memory vs disk, database pages, B-Tree/B+Tree, query execution, transactions, and eventually how these ideas show up in MongoDB and PostgreSQL.
5. Concurrency + Node.js Internals
Connecting the fundamentals to the runtime I actually use: concurrency vs parallelism, Node.js architecture, the event loop, async/await, and race conditions.
6. Distributed Systems Fundamentals
Finally adding multiple machines and all the problems that come with them: load balancing, caching, queues, failures, and CAP theorem.
7. Put Everything Together
And then trying to connect all of these pieces into one mental model.
Something as simple as:
const response = await fetch("/users");
turns out to involve an absurd number of layers underneath it.
That's the part I want to understand.
I'm not sure I'll get everything right on the first attempt.
That's kind of the point.
I'll be writing these as I learn, simplifying things where possible, digging deeper where necessary, and correcting my understanding along the way.
If you're also a software engineer who feels like there's a gap between "I know how to use this" and "I understand what's actually happening", maybe these notes will be useful to you too.
Computer Fundamentals: No BS.
Let's start from the machine.
Top comments (0)