Computer science notes
An open notebook of 125 pages across 8 topics. Unmarked notes are working notes: public, not yet reviewed. Reviewed and Archived notes are tagged. Known errors are corrected on the Errata page.
8 topics. Type to search every note and essay.
Topics
Open a topic to see every note in it with its status, or go straight to its overview.
Algorithms 40 notes Algorithms explained with intuition, formal models, proof sketches, and implementation tradeoffs.
Open the Algorithms overview 40 working notes
- Job Sequencing with DeadlinesExplainer
- Primality TestsExplainer
- Greedy SuccessesExplainer
- Advanced Dynamic Programming 👹Explainer
- Convex Hull TrickExplainer
- Savitch's algorithmExplainer
- Matrix Based SolutionsExplainer
- FibonacciExplainer
- Minmax Path ProblemExplainer
- The Traveling Salesperson Problem (TSP)Explainer
- The Knapsack ProblemExplainer
- Counting SortExplainer
- Network FlowExplainer
- A* SearchStub
- Interpolation SearchStub
- Exponential SearchExplainer
- Parallel Algorithms for Linked List and BeyondReading bookmark
- Linear-time selectionExplainer
- Rabin-KarpExplainer
- Merge SortExplainer
- Insertion SortExplainer
- Meta-AlgorithmExplainer
- JohnsonsStub
- Floyd-WarshallExplainer
- Bellman-FordExplainer
- Optimal Binary Search TreeExplainer
- Minimum Spanning TreesExplainer
- Huffman CodesExplainer
- When Greedy Scheduling WorksExplainer
- Dynamic ProgrammingExplainer
- GreedyExplainer
- Heap SortExplainer
- DijkstraExplainer
- Quick SortExplainer
- Binary SearchExplainer
- Depth-first search (DFS)Explainer
- Breadth-first search (BFS)Explainer
- Graph TraversalExplainer
- SortingExplainer
- RecursionExplainer
Agentic Coding 15 notes Engineering habits for working with coding agents: design concepts, feedback loops, tests, and review.
Open the Agentic Coding overview 15 working notes
- HarnessesExplainer
- Code ReviewExplainer
- Security IssuesExplainer
- Prompting BasicsExplainer
- SkillsExplainer
- Putting it togetherWorked guide
- Leverage and LocalityStub
- Domain Driven DesignExplainer
- CouplingExplainer
- Test Driven DevelopmentExplainer
- ModularityExplainer
- EntropyExplainer
- Feedback LoopsExplainer
- Shared LanguageExplainer
- The Design ConceptExplainer
Operating Systems 23 notes Operating-system design from the kernel boundary up: processes, threads, scheduling, synchronisation, memory, and I/O. Some pages are study plans for topics not yet written.
Open the Operating Systems overview 23 working notes
- Faster ConcurrencyExplainer
- SynchronisationExplainer
- InterruptsExplainer
- Preemptive MultitaskingExplainer
- More about ThreadsExplainer
- Context SwitchingExplainer
- Process SchedulingExplainer
- Thread PoolsExplainer
- Network CommunicationExplainer
- Interprocess CommunicationExplainer
- SemaphoresExplainer
- File and I/O AbstractionsExplainer
- Dual ModeExplainer
- ProcessesExplainer
- Address SpaceExplainer
- ThreadsExplainer
- Reliability and SecurityStudy plan
- Distributed SystemsStudy plan
- File SystemsStudy plan
- Address Space Study PlanStudy plan
- ConcurrencyStudy plan
- OS BasicsStudy plan
- What is an Operating System?Explainer
AI Engineering 8 notes How ML workloads run on hardware: GPUs, matrix multiplication, memory systems, compilers, and distributed training. Assumes basic linear algebra and some systems background.
Open the AI Engineering overview 8 working notes
- Systolic ArraysExplainer
- Matrix MultiplicationExplainer
- Distributed AI SystemsExplainer
- Compiler OptimizationsExplainer
- Kernel and OS OptimisationsExplainer
- Memory SystemsExplainer
- GPUsExplainer
- Hardware AccelerationExplainer
Software Systems 12 notes How production software is built and operated: services, logs and event streams, testing, reliability, security, and team practice.
Open the Software Systems overview 12 working notes
- Event StreamingReading bookmark
- Under the Hood: The logExplainer
- Service MeshExplainer
- MicroservicesExplainer
- TestingExplainer
- SecurityExplainer
- CollaborationExplainer
- StandardsExplainer
- ReliabilityExplainer
- ScalabilityExplainer
- Distributed SystemsExplainer
- SWE Study PlanStudy plan
Building Agents 7 notes Software-engineering principles for building agent applications (as opposed to using coding agents): when to use an agent, workflows, and memory.
Open the Building Agents overview 7 working notes
- What can agents do?Explainer
- What is an Agent?Explainer
- When to use an Agent?Explainer
- WorkflowsExplainer
- AgentsExplainer
- Advanced Agentic EngineeringExplainer
- Second BrainWorked guide
C Deep Dive 9 notes The C language up close, built and tested with GCC on Linux: syntax, types, operators, pointers, memory, and files.
Open the C Deep Dive overview 9 working notes
- Syntax in CExplainer
- Operators in CExplainer
- Statements in CExplainer
- Pointers in CExplainer
- Dynamic Memory Allocation in CExplainer
- Types in CExplainer
- Data Structures in CExplainer
- Functions in CExplainer
- File handling in CExplainer
C++ Deep Dive 3 notes C++ from a C programmer's point of view: the build model, memory layout, and ownership with RAII and smart pointers. Examples assume C++14 or later (they use std::make_unique).
Open the C++ Deep Dive overview 3 working notes
- C++ BasicsExplainer
- C++ Memory ModelExplainer
- C++ Memory OwnershipExplainer
Guided paths
Learning algorithms
For readers who want a guided route through the Algorithms notes.
From recursion and invariants to graph search and dynamic programming.
- RecursionExplainer
Recurrences and how to reason about recursive cost.
- Binary SearchExplainer
Interval invariants on the simplest divide-and-conquer.
- SortingExplainer
Comparison models, stability, and lower bounds.
- Graph TraversalExplainer
Representations and BFS/DFS basics.
- DijkstraExplainer
Shortest paths with non-negative weights.
- Dynamic ProgrammingExplainer
States, transitions, and reconstruction.
Learning C and C++
For readers who want to understand memory from the language up.
C syntax and pointers, then how C++ builds, lays out memory, and manages ownership.
- Syntax in CExplainer
What a C program is made of.
- Pointers in CExplainer
Pointers as variables that hold addresses.
- Dynamic Memory Allocation in CExplainer
malloc, realloc, and free.
- C++ BasicsExplainer
How C++ is compiled and linked.
- C++ Memory ModelExplainer
Stack, heap, and static storage.
- C++ Memory OwnershipExplainer
RAII, smart pointers, and move semantics.
Reviews and corrections
No note has been marked reviewed yet, so every note is labelled a Working note.
Recent corrections:
- Second Brain · Clarification on
- Agentic Coding · Correction on
- Agentic Coding · Removal on