Computer Science Deep Dive
Welcome
You write code for a living, and nobody ever explained why a dictionary lookup is instant and a list search is not, why the second read of a file is faster than the first, why two threads can lose an update that both of them made, or why some programs can never be written at all. This is the core of a computer science degree, taught to working engineers: every idea explained in plain words, drawn as a figure, illustrated with short Python, and ended on what it costs in the systems you already run.
About This Course
Every choice a computer makes has a price, and the price comes from the layer underneath. A dictionary lookup is fast because of a hash table, which is fast because reading one slot of an array is one address calculation and one memory read, which is fast only if that memory is already in the processor's cache. The second read of a file is fast because the operating system kept its pages in memory. Two threads lose an update because adding one to a counter is three separate steps. This book teaches one question, what does it cost and why, and then answers it for one layer per chapter.
It moves in five parts. Cost comes first: how to reason about what an operation costs and how that cost grows, which is the free first chapter. Then the machine: how information is represented, how the processor runs it, and how memory really behaves. Then structures and algorithms: the containers, trees, sorts, graphs and design techniques that real systems are built from. Then systems: the operating system, concurrency and reliable delivery over a channel that loses messages. Last come languages and limits: how a language turns text into running code, and what no computer can ever do.
Where one real system makes an idea clearer, the book uses Lantern, the search service of a public library with 2 million catalogue records and one engineer, Noor. Its index is a hash table, its autocomplete is a trie, its typo tolerance is dynamic programming, and its query language is the example the compiler chapter takes apart. Lantern appears only where it is the clearest example. There is no plot to follow.
Who This Is For
Engineers without a computer science degree: developers, DevOps and QA engineers who write code, run services and read stack traces, but never took the courses. The bar is concrete. You can read a short Python function with a loop, a list and a dictionary in it, and you have seen a program be slow without knowing why. No mathematics beyond arithmetic is assumed, and no proof appears anywhere in the book.
It is not a first course on computers. If a byte, a process or a packet is a term you would have to look up, read Computing Foundations from Zero in this catalogue first; this book starts where that one stops. It is also not a book of tools or of interview drills. It never teaches a command, and where a tool is the natural way to watch an idea at work, it names the course that teaches that tool.
What You Should Already Know
- What a computer's parts are: processor, memory, storage and the operating system that runs programs
- Reading a short Python function: variables, loops, lists, dictionaries and a function call
- Having run a program that was slower than you expected, on data larger than you tested with
- Nothing about computer science itself: complexity, structures, algorithms, the machine and the theory are all built from zero
New to this? Start with Computing Foundations from Zero - the first chapter of every course is free, and the rest is one membership.
How the Course Is Built
Every topic has the same shape: an opening that says what the idea is and why it exists, the mechanism explained in plain words and drawn as a figure, the misconceptions working engineers actually hold about it, what the idea means for the systems you run, and a short knowledge check. Short Python examples illustrate; they are never the lesson, and the prose around every example says in words what the code shows.
Every cost gets a number. About 21 looks to find one name among 2 million sorted entries. About a hundred nanoseconds for a trip to main memory. About 40 megabytes for a million integers in a Python list. Specific figures are what let you predict behaviour you have not measured, and predicting behaviour is the point of the whole book.
Chapter Map
Disclaimer
This course is an independent educational project created and maintained by Sergey Okinchuk. It is provided for learning and reference purposes only.
No affiliation. This course is not affiliated with, sponsored by, endorsed by, or officially connected to any company, product, or project mentioned, including the Python Software Foundation, Intel, AMD, Arm, Apple, NVIDIA, Microsoft, Google, the Linux Foundation, or the PostgreSQL Global Development Group. All opinions, interpretations, and recommendations expressed are the author's own.
Trademarks. Product and project names referenced, including "Python", "CPython", "Linux", "x86", "Arm", "PostgreSQL", and "SQLite", are the property of their respective owners. Use of these names is for identification and educational purposes only and does not imply any endorsement. Lantern and the Millbrook Public Library are fictional; any resemblance to a real service or library is coincidental.
Not operational advice. This material teaches how computing systems work and what their design choices cost, not turnkey instructions for any specific environment. Code snippets and figures are simplified for learning, and performance numbers are orders of magnitude, not measurements of your hardware. Always measure on the system you actually run before acting on a number.
Accuracy and currency. The ideas in this course change slowly, but implementations do not. Facts about specific software reflect the author's understanding at the time of writing against Python 3.15; hardware figures are typical of current machines and vary between them. Always verify version-specific behaviour against the official documentation for the versions you run.
No warranty. This material is provided "as is" without warranty of any kind. The author accepts no liability for any loss or damage arising from reliance on the content.