Coding
From bits to systems: algorithms, languages, engineering.
- notes
- 527notes
- chapters
- 25chapters
- tests
- 130tests
- words
- 1.1Mwords
Phase 1 — Absolute Foundation
2–3 months @ 1.5 hrs/day3 chapters1.1
How Computers Work
13 topics- 1.1.1Binary number system — conversions from - to decimal, counting in binary
- 1.1.2Hexadecimal and octal — conversions, why they're used
- 1.1.3Boolean algebra — AND, OR, NOT, XOR, NAND, NOR operations
- 1.1.4Truth tables — all 16 binary operations
- 1.1.5Logic gates — physical gate symbols, transistor implementation idea
- 1.1.6Combinational logic — half adder, full adder, multiplexer, decoder
- 1.1.7Flip-flops — SR, D, JK — storing one bit
- 1.1.8Registers — N flip-flops storing N bits
- 1.1.9Memory hierarchy — registers, cache (L1 - L2 - L3), RAM, SSD, HDD — speed - size trade-offs
- 1.1.10The CPU — ALU, control unit, registers
- 1.1.11Fetch-decode-execute cycle — step by step
- 1.1.12Machine code and assembly — what actually runs
- 1.1.13Operating system role — resource manager, abstraction layer
1.2
Introduction to Programming (Python)
39 topics- 1.2.1Installing Python + VS Code — environment setup
- 1.2.2`print()`, comments, code structure
- 1.2.3Variables — naming rules, assignment, reassignment
- 1.2.4Data types — int, float, str, bool, NoneType
- 1.2.5Type checking with `type()`, type conversion `int()`, `float()`, `str()`
- 1.2.6Arithmetic operators — +, −, - , - , - , %, - (floor div, modulo, power)
- 1.2.7Comparison operators — ==, !=, - , - , - =, - =
- 1.2.8Logical operators — and, or, not, short-circuit evaluation
- 1.2.9Bitwise operators — &, - , ^, ~, - , -
- 1.2.10String operations — concatenation, repetition
- 1.2.11String indexing and slicing — `s[0]`, `s[-1]`, `s[2 - 5]`, `s[ - 2]`
- 1.2.12String methods — upper, lower, strip, split, join, replace, find, format
- 1.2.13f-strings — embedding expressions
- 1.2.14Input with `input()` — always returns string, conversion needed
- 1.2.15if - elif - else — syntax, indentation rules
- 1.2.16Nested conditionals
- 1.2.17while loop — condition-based, infinite loop dangers
- 1.2.18for loop — iterating over sequences
- 1.2.19`range()` — start, stop, step
- 1.2.20break, continue, pass — when and why
- 1.2.21Lists — creation, indexing, slicing, mutability
- 1.2.22List methods — append, insert, remove, pop, sort, reverse, count, index
- 1.2.23Tuples — immutability, use cases
- 1.2.24Dictionaries — key-value pairs, access, methods (keys, values, items, get, update)
- 1.2.25Sets — unique elements, set operations (union, intersection, difference)
- 1.2.26Nested data structures — list of dicts, dict of lists
- 1.2.27Functions — def, parameters, return, docstrings
- 1.2.28Default parameters, keyword arguments
- 1.2.29` - args` and ` - kwargs` — flexible argument passing
- 1.2.30Variable scope — LEGB rule (Local, Enclosing, Global, Built-in)
- 1.2.31global and nonlocal keywords
- 1.2.32Lambda functions — anonymous, used with map - filter
- 1.2.33Built-in functions — map, filter, zip, enumerate, sorted, reversed, min, max, sum, any, all
- 1.2.34List comprehensions — `[expr for x in iterable if condition]`
- 1.2.35Dictionary and set comprehensions
- 1.2.36Generator expressions — memory efficiency
- 1.2.37Recursion — call stack visualization, base case, recursive case
- 1.2.38Classic recursion — factorial, Fibonacci, binary search
- 1.2.39Recursion depth limit — stack overflow
1.3
Python Intermediate
12 topics- 1.3.1Modules — import, from…import, as aliasing
- 1.3.2Standard library — math, random, os, sys, datetime, time, collections, itertools, functools
- 1.3.3File I - O — open modes (r, w, a, rb), read, readline, readlines, write
- 1.3.4Context managers — with statement, `__enter__` - `__exit__`
- 1.3.5Exception handling — try, except (specific), else, finally
- 1.3.6Raising exceptions — raise, custom exception classes
- 1.3.7Exception hierarchy
- 1.3.8Decorators — function decorators, @, wraps
- 1.3.9Generators — yield, generator functions, send(), next()
- 1.3.10Iterators — `__iter__`, `__next__`, StopIteration
- 1.3.11Regular expressions — re module, patterns, groups, findall, sub
- 1.3.12Virtual environments — venv, pip, requirements.txt
Phase 2 — Object-Oriented Programming
1–2 months @ 1.5 hrs/day2 chapters2.1
OOP Fundamentals
16 topics- 2.1.1Class vs object — blueprint vs instance
- 2.1.2`__init__` constructor — initializing attributes
- 2.1.3Instance attributes vs class attributes
- 2.1.4Instance methods, class methods (`@classmethod`), static methods (`@staticmethod`)
- 2.1.5`self` — what it is and how Python passes it
- 2.1.6Encapsulation — hiding internal state, name mangling (`__name`)
- 2.1.7Properties — `@property`, `@setter`, `@deleter` for controlled access
- 2.1.8Inheritance — single inheritance, method resolution order (MRO)
- 2.1.9`super()` — calling parent methods
- 2.1.10Multiple inheritance — Python's C3 linearization algorithm
- 2.1.11Method overriding — when and why
- 2.1.12Polymorphism — duck typing, same interface different behavior
- 2.1.13Abstract base classes — ABC module, `@abstractmethod`
- 2.1.14Operator overloading — dunder methods (`__add__`, `__eq__`, `__lt__`, `__len__`, `__str__`, `__repr__`, `__hash__`)
- 2.1.15Composition — has-a relationship vs is-a
- 2.1.16Dataclasses — `@dataclass` decorator, `__post_init__`
2.2
Design Principles
12 topics- 2.2.1DRY — Don't Repeat Yourself
- 2.2.2KISS — Keep It Simple
- 2.2.3YAGNI — You Aren't Gonna Need It
- 2.2.4SOLID — Single Responsibility Principle
- 2.2.5SOLID — Open - Closed Principle
- 2.2.6SOLID — Liskov Substitution Principle
- 2.2.7SOLID — Interface Segregation Principle
- 2.2.8SOLID — Dependency Inversion Principle
- 2.2.9Separation of concerns
- 2.2.10Design Patterns — Creational - Singleton, Factory Method, Abstract Factory, Builder, Prototype
- 2.2.11Design Patterns — Structural - Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
- 2.2.12Design Patterns — Behavioral - Observer, Strategy, Command, Iterator, State, Template Method, Chain of Responsibility,
Phase 3 — Data Structures & Algorithms
4–6 months @ 2 hrs/day · **THE most important phase for elite coding**8 chapters3.1
Complexity Analysis
9 topics- 3.1.1Big-O notation — formal definition, mathematical
- 3.1.2Common complexities — O(1), O(log n), O(n), O(n log n), O(n²), O(n³), O(2ⁿ), O(n!)
- 3.1.3Best, worst, average case — with examples
- 3.1.4Space complexity — auxiliary vs total
- 3.1.5Amortized analysis — aggregate, accounting, potential methods
- 3.1.6Tight bounds — Θ notation; lower bounds — Ω notation
- 3.1.7Master theorem — solving recurrences T(n) = aT(n - b) + f(n)
- 3.1.8Substitution method for recurrences
- 3.1.9Recursion tree method
3.2
Linear Data Structures
9 topics- 3.2.1Array — static, dynamic; cache locality; amortized O(1) append
- 3.2.2Linked list — singly - node structure, traversal, insert head - tail - middle, delete
- 3.2.3Doubly linked list — bidirectional traversal
- 3.2.4Circular linked list — applications
- 3.2.5Stack — LIFO semantics, push - pop - peek, array and linked list implementations
- 3.2.6Stack applications — balanced parentheses, infix-to-postfix, function call stack
- 3.2.7Queue — FIFO semantics, enqueue - dequeue, circular array implementation
- 3.2.8Deque (double-ended queue) — operations, use cases
- 3.2.9Priority Queue — concept (heap-based implementation covered later)
3.3
Hashing
10 topics- 3.3.1Hash function — properties - deterministic, uniform, fast
- 3.3.2Hash table — structure, open addressing vs chaining
- 3.3.3Chaining — linked lists in buckets, load factor, resizing
- 3.3.4Open addressing — linear probing, quadratic probing, double hashing
- 3.3.5Deletion in open addressing — tombstone markers
- 3.3.6Load factor — when to resize, rehashing cost
- 3.3.7Amortized O(1) operations
- 3.3.8Universal hashing — probabilistic guarantee
- 3.3.9Python dict and set internals
- 3.3.10Applications — frequency counting, two-sum problem, caching (LRU)
3.4
Trees
16 topics- 3.4.1Tree terminology — root, leaf, height, depth, degree, subtree
- 3.4.2Binary tree — structure, traversals - preorder, inorder, postorder (recursive and iterative)
- 3.4.3Level-order traversal — BFS with queue
- 3.4.4Binary Search Tree (BST) — BST property, insert, search, delete (3 cases)
- 3.4.5BST — inorder gives sorted order
- 3.4.6BST — worst case O(n) — motivation for balancing
- 3.4.7AVL tree — balance factor, rotations (LL, RR, LR, RL), insert, delete
- 3.4.8Red-Black tree — properties, rotations + recoloring (conceptual understanding)
- 3.4.9B-tree and B+ tree — motivation (disk storage), properties
- 3.4.10Heap — max-heap and min-heap properties
- 3.4.11Heapify — bottom-up O(n) build
- 3.4.12Heap operations — insert O(log n), extract-max - min O(log n), decrease-key
- 3.4.13Heap sort — in-place, O(n log n)
- 3.4.14Trie (prefix tree) — insert, search, startsWith, applications (autocomplete, spell check)
- 3.4.15Segment tree — build, range query, point update
- 3.4.16Fenwick tree (Binary Indexed Tree) — prefix sums, O(log n) update and query
3.5
Graphs
17 topics- 3.5.1Graph definitions — directed, undirected, weighted, unweighted, simple, multigraph
- 3.5.2Representations — adjacency matrix (space O(V²)), adjacency list (space O(V+E))
- 3.5.3Incidence matrix
- 3.5.4BFS — algorithm, queue-based, O(V+E), shortest path in unweighted graphs
- 3.5.5DFS — algorithm, stack - recursion, O(V+E), visited array
- 3.5.6DFS applications — cycle detection (directed and undirected)
- 3.5.7Topological sort — DFS-based, Kahn's algorithm (BFS-based)
- 3.5.8Strongly Connected Components (SCC) — Kosaraju's algorithm, Tarjan's algorithm
- 3.5.9Articulation points and bridges — Tarjan's low-link values
- 3.5.10Dijkstra's algorithm — greedy, priority queue, O((V+E) log V) — no negative edges
- 3.5.11Bellman-Ford algorithm — DP approach, negative cycles detection, O(VE)
- 3.5.12Floyd-Warshall — all-pairs shortest paths, O(V³)
- 3.5.13A - algorithm — heuristic, admissibility, consistency — important for GNC
- 3.5.14Minimum Spanning Tree — Kruskal's (Union-Find), Prim's (priority queue)
- 3.5.15Disjoint Set Union (Union-Find) — path compression + union by rank → α(n)
- 3.5.16Network flow — max-flow min-cut theorem, Ford-Fulkerson, Edmonds-Karp
- 3.5.17Bipartite graphs — 2-coloring test, bipartite matching — Hopcroft-Karp
3.6
Sorting & Searching
11 topics- 3.6.1Bubble sort, selection sort, insertion sort — O(n²), when insertion sort wins
- 3.6.2Merge sort — divide and conquer, O(n log n), stable, proof of correctness
- 3.6.3Quick sort — Lomuto - Hoare partition, pivot strategies, expected O(n log n), worst case
- 3.6.4Quick sort randomization — expected O(n log n)
- 3.6.5Heap sort — O(n log n), in-place, not stable
- 3.6.6Counting sort — O(n + k), integer keys only
- 3.6.7Radix sort — LSD, MSD; O(d(n+k))
- 3.6.8Bucket sort — uniform distributions
- 3.6.9Lower bound for comparison sorts — Ω(n log n) proof via decision trees
- 3.6.10Linear time selection — median of medians algorithm
- 3.6.11Binary search — iterative, recursive; O(log n); searching in sorted - rotated arrays
3.7
Algorithm Paradigms
20 topics- 3.7.1Brute force — exhaustive search, when acceptable
- 3.7.2Divide and conquer — template, correctness, recurrence
- 3.7.3Greedy — exchange argument proof technique
- 3.7.4Greedy problems — activity selection, fractional knapsack, Huffman coding (full algorithm)
- 3.7.5When greedy fails — 0 - 1 knapsack counter-example
- 3.7.6Dynamic programming — overlapping subproblems, optimal substructure
- 3.7.7Memoization (top-down DP) — recursive + memo dict
- 3.7.8Tabulation (bottom-up DP) — iterative
- 3.7.9DP problems — Fibonacci, coin change (count + min), 0 - 1 knapsack
- 3.7.10DP problems — Longest Common Subsequence (LCS)
- 3.7.11DP problems — Longest Increasing Subsequence (LIS) — O(n²) and O(n log n)
- 3.7.12DP problems — edit distance (Levenshtein)
- 3.7.13DP problems — matrix chain multiplication
- 3.7.14DP problems — rod cutting, egg drop, DP on trees
- 3.7.15Bitmask DP — TSP intro
- 3.7.16Backtracking — state-space tree, pruning
- 3.7.17Backtracking problems — N-Queens, Sudoku solver, all permutations - subsets
- 3.7.18Branch and bound
- 3.7.19Randomized algorithms — Las Vegas, Monte Carlo
- 3.7.20Bit manipulation — XOR tricks, LSB, counting set bits
3.8
String Algorithms
9 topics- 3.8.1Naive pattern matching — O(nm)
- 3.8.2KMP algorithm — failure function, O(n+m) — full derivation
- 3.8.3Rabin-Karp — rolling hash, O(n+m) expected
- 3.8.4Z-algorithm — Z-array construction, O(n+m)
- 3.8.5Boyer-Moore — bad character, good suffix heuristics
- 3.8.6Aho-Corasick — multiple pattern search, automaton
- 3.8.7Suffix array — construction O(n log n), LCP array
- 3.8.8Suffix tree (conceptual)
- 3.8.9Palindrome algorithms — Manacher's algorithm
Phase 4 — Computer Science Core
6–8 months @ 2 hrs/day · university-level systems6 chapters4.1
Computer Architecture (Deep)
27 topics- 4.1.1Von Neumann architecture — components, bottleneck
- 4.1.2Harvard architecture — separate instruction - data memory
- 4.1.3ISA (Instruction Set Architecture) — RISC vs CISC
- 4.1.4ARM architecture intro — used in embedded - aerospace
- 4.1.5Registers — general purpose, special (PC, SP, LR, CPSR)
- 4.1.6ALU — operations, flags (zero, carry, overflow, negative)
- 4.1.7Instruction formats — R-type, I-type, J-type (MIPS - RISC-V)
- 4.1.8Memory addressing modes — immediate, register, direct, indirect, indexed
- 4.1.9Cache organization — direct-mapped, n-way set associative, fully associative
- 4.1.10Cache lines, tags, index, offset
- 4.1.11Replacement policies — LRU, LFU, FIFO, Random
- 4.1.12Write policies — write-through, write-back, write-allocate
- 4.1.13Cache coherence — MESI protocol in multicore
- 4.1.14Virtual memory — concept, page table, virtual-to-physical translation
- 4.1.15TLB — structure, TLB miss handling
- 4.1.16Page replacement — FIFO, LRU, Clock, Optimal
- 4.1.17Working set model, thrashing
- 4.1.18Pipelining — 5-stage pipeline, each stage
- 4.1.19Pipeline hazards — structural, data (RAW - WAR - WAW), control
- 4.1.20Hazard mitigation — stalling, forwarding - bypassing, branch prediction
- 4.1.21Branch prediction — static, dynamic (2-bit predictor, BTB)
- 4.1.22Out-of-order execution — Tomasulo algorithm (conceptual)
- 4.1.23Superscalar — multiple execution units
- 4.1.24SIMD — vector instructions, SSE - AVX
- 4.1.25GPU architecture — SIMT, warps, CUDA model
- 4.1.26Memory models — sequential consistency, TSO, relaxed
- 4.1.27Multicore coherence protocols
4.2
Operating Systems
41 topics- 4.2.1OS roles — resource management, hardware abstraction, protection
- 4.2.2OS structure — monolithic, microkernel, hybrid
- 4.2.3System calls — user mode vs kernel mode, trap mechanism
- 4.2.4Processes — PCB, states (new - ready - running - blocked - terminated)
- 4.2.5Process creation — fork(), exec(), wait(), exit()
- 4.2.6Context switch — what gets saved, overhead
- 4.2.7Threads — user-level vs kernel-level, one-to-one, many-to-many
- 4.2.8Thread synchronization needs — shared memory issues
- 4.2.9Scheduling goals — CPU utilization, throughput, turnaround, waiting, response
- 4.2.10Scheduling algorithms — FCFS, SJF (preemptive = SRTF), Round Robin, Priority
- 4.2.11Multi-level feedback queue (MLFQ) — promotion, demotion rules
- 4.2.12Scheduling on multiprocessors — load balancing, affinity
- 4.2.13Race condition — example, why it's a problem
- 4.2.14Critical section — mutual exclusion, progress, bounded waiting
- 4.2.15Mutex — implementation using hardware atomics (test-and-set, CAS)
- 4.2.16Semaphores — binary and counting, P() and V() operations
- 4.2.17Monitors — condition variables, wait, signal, broadcast
- 4.2.18Classic problems — Producer-Consumer, Readers-Writers (three variants), Dining Philosophers
- 4.2.19Deadlock — four necessary conditions (Coffman)
- 4.2.20Deadlock prevention — break each condition
- 4.2.21Deadlock avoidance — Banker's algorithm
- 4.2.22Deadlock detection and recovery
- 4.2.23Memory allocation — contiguous (first-fit, best-fit, worst-fit)
- 4.2.24Fragmentation — internal vs external, compaction
- 4.2.25Paging — page - frame size, page table structure
- 4.2.26Multi-level page tables — why, overhead
- 4.2.27Segmentation — segment table, protection
- 4.2.28Demand paging — page fault handling steps
- 4.2.29Copy-on-write
- 4.2.30Memory-mapped files
- 4.2.31File system concepts — file, directory, path, inode
- 4.2.32File operations — open, read, write, seek, close
- 4.2.33Directory structure — tree, DAG (hard links, symbolic links)
- 4.2.34File allocation — contiguous, linked, indexed (inode)
- 4.2.35ext4 structure — superblock, block groups, inodes
- 4.2.36Journaling — why, how it works
- 4.2.37I - O management — polling, interrupt-driven, DMA
- 4.2.38Disk scheduling — FCFS, SCAN, C-SCAN, LOOK
- 4.2.39RAID — levels 0, 1, 5, 6, 10 — trade-offs
- 4.2.40Virtualization — type 1 and type 2 hypervisors
- 4.2.41Containers — namespaces, cgroups, difference from VMs
4.3
Computer Networks
31 topics- 4.3.1OSI model — 7 layers, responsibilities, PDU names
- 4.3.2TCP - IP model — 4 layers, mapping to OSI
- 4.3.3Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
- 4.3.4Data link layer — framing, error detection (CRC computation), MAC
- 4.3.5Ethernet (IEEE 802.3) — CSMA - CD, frame format
- 4.3.6Wi-Fi (IEEE 802.11) — CSMA - CA, bands
- 4.3.7Switching — circuit, packet, virtual circuit
- 4.3.8IPv4 — address format, classes, subnetting, CIDR notation
- 4.3.9Subnetting — subnet mask, network - host bits, VLSM
- 4.3.10NAT — why, how, types (SNAT, DNAT, PAT)
- 4.3.11IPv6 — address format, why needed, key differences
- 4.3.12ARP — address resolution, ARP cache, gratuitous ARP
- 4.3.13Routing — forwarding table, routing table
- 4.3.14Static routing vs dynamic routing
- 4.3.15Distance vector routing — RIP, Bellman-Ford, count-to-infinity
- 4.3.16Link state routing — OSPF, Dijkstra
- 4.3.17BGP — path vector, AS, policy routing
- 4.3.18UDP — header, use cases, checksum
- 4.3.19TCP — header, connection (3-way handshake, 4-way termination)
- 4.3.20TCP reliability — seq - ack numbers, retransmission, cumulative ACK
- 4.3.21TCP flow control — sliding window, receive buffer
- 4.3.22TCP congestion control — slow start, congestion avoidance, fast retransmit, CUBIC
- 4.3.23DNS — recursive vs iterative query, hierarchy, record types (A, AAAA, CNAME, MX, NS)
- 4.3.24HTTP - 1.1 — methods, status codes, headers, persistent connections
- 4.3.25HTTP - 2 — multiplexing, header compression (HPACK), server push
- 4.3.26HTTP - 3 — QUIC, UDP-based, why
- 4.3.27HTTPS — TLS handshake, certificates, CA
- 4.3.28Socket programming — TCP server - client, UDP server - client in Python
- 4.3.29Firewalls — stateless vs stateful packet filtering
- 4.3.30NAT traversal, VPN, tunneling
- 4.3.31Network security — DDoS, man-in-the-middle, replay attacks, countermeasures
4.4
Databases
28 topics- 4.4.1Relational model — tables, rows, columns, NULL
- 4.4.2Keys — primary, candidate, super, foreign, natural vs surrogate
- 4.4.3SQL DDL — CREATE, ALTER, DROP, TRUNCATE
- 4.4.4SQL DML — SELECT, INSERT, UPDATE, DELETE
- 4.4.5SQL clauses — WHERE, GROUP BY, HAVING, ORDER BY, LIMIT
- 4.4.6Joins — INNER, LEFT, RIGHT, FULL OUTER, CROSS, SELF
- 4.4.7Subqueries — correlated vs uncorrelated
- 4.4.8Aggregate functions — COUNT, SUM, AVG, MIN, MAX
- 4.4.9Window functions — ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD
- 4.4.10CTEs (WITH clause) — recursive CTEs
- 4.4.11Views — creating, updatable views
- 4.4.12Stored procedures, triggers, functions
- 4.4.13Indexing — B-tree index, hash index, full-text
- 4.4.14Composite indexes, covering indexes
- 4.4.15EXPLAIN — reading query plans, cost estimation
- 4.4.16Transactions — ACID properties (each one in detail)
- 4.4.17Transaction isolation levels — READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE
- 4.4.18Concurrency anomalies — dirty read, non-repeatable read, phantom read
- 4.4.19Locking — shared, exclusive, intent locks
- 4.4.20Optimistic vs pessimistic concurrency control
- 4.4.21Normalization — 1NF, 2NF, 3NF, BCNF — anomalies each resolves
- 4.4.22Denormalization — when and why
- 4.4.23ER diagrams — entities, attributes, relationships, cardinality
- 4.4.24NoSQL — document (MongoDB), key-value (Redis), column (Cassandra), graph (Neo4j)
- 4.4.25CAP theorem — consistency, availability, partition tolerance
- 4.4.26BASE vs ACID
- 4.4.27Distributed databases — sharding strategies, replication
- 4.4.28MVCC — multi-version concurrency control
4.5
Software Engineering
24 topics- 4.5.1SDLC — waterfall, V-model, iterative, agile
- 4.5.2Agile — Scrum (sprints, roles, ceremonies), Kanban
- 4.5.3Requirements — functional vs non-functional, user stories, acceptance criteria
- 4.5.4UML — use case, class, sequence, activity, state machine, component diagrams
- 4.5.5Software architecture — layered, MVC, event-driven, microservices, serverless
- 4.5.6REST API design — resources, HTTP methods, status codes, versioning, pagination
- 4.5.7Git internals — objects (blob, tree, commit, tag), DAG structure
- 4.5.8Git operations — branch, merge, rebase, cherry-pick, stash, bisect
- 4.5.9Git workflows — Gitflow, trunk-based development
- 4.5.10CI - CD — pipeline stages, GitHub Actions - GitLab CI concepts
- 4.5.11Docker — images, containers, Dockerfile, docker-compose
- 4.5.12Kubernetes — pods, deployments, services, ingress (concepts)
- 4.5.13Testing — unit, integration, system, acceptance, smoke, regression
- 4.5.14TDD — Red-Green-Refactor cycle
- 4.5.15Code coverage — line, branch, path coverage
- 4.5.16Mutation testing
- 4.5.17Property-based testing
- 4.5.18Code review — what to look for
- 4.5.19Refactoring — code smells, common refactorings (extract method, rename, etc.)
- 4.5.20Technical debt — types, managing
- 4.5.21Documentation — inline comments, docstrings, README, ADRs
- 4.5.22Logging and monitoring — structured logging, metrics, alerting
- 4.5.23Security — OWASP Top 10, input validation, authentication vs authorization
- 4.5.24Performance profiling — CPU, memory, I - O profiling
4.6
Theory of Computation
29 topics- 4.6.1Alphabet, string, language — formal definitions
- 4.6.2Finite automata — DFA - formal definition (5-tuple), state diagrams
- 4.6.3NFA — formal definition, epsilon transitions
- 4.6.4NFA to DFA conversion — subset construction
- 4.6.5Regular expressions — equivalence with finite automata
- 4.6.6Regular languages — closed under union, intersection, complement, concatenation, Kleene star
- 4.6.7Pumping lemma for regular languages — proof and using to show non-regularity
- 4.6.8Context-free grammars (CFG) — productions, derivations, parse trees
- 4.6.9Chomsky Normal Form (CNF) — conversion
- 4.6.10Pushdown automata (PDA) — configuration, acceptance by empty stack - final state
- 4.6.11Equivalence of CFGs and PDAs
- 4.6.12Pumping lemma for CFLs
- 4.6.13Turing machines — formal definition, computation, configurations
- 4.6.14Variants — multi-tape TM, non-deterministic TM, all equivalent
- 4.6.15Church-Turing thesis
- 4.6.16Universal Turing machine
- 4.6.17Decidability — decidable (recursive) and recognizable (recursively enumerable) languages
- 4.6.18Halting problem — undecidability proof by diagonalization
- 4.6.19Reducibility — many-one reductions
- 4.6.20Rice's theorem
- 4.6.21Complexity — DTIME, DSPACE, complexity classes
- 4.6.22P — polynomial time
- 4.6.23NP — non-deterministic polynomial, verifier definition
- 4.6.24P vs NP — statement, why it matters
- 4.6.25NP-completeness — Cook's theorem (SAT is NP-complete), reduction
- 4.6.26NP-complete problems — 3-SAT, Vertex Cover, Clique, Hamiltonian Path, TSP, Subset Sum
- 4.6.27NP-hard — harder than NP, may not be in NP
- 4.6.28PSPACE — Quantified Boolean Formula
- 4.6.29Approximation algorithms — approximation ratio, examples
Phase 5 — Systems Programming & Scientific Computing
6–8 months @ 2 hrs/day · critical for aerospace software6 chapters5.1
C Programming
33 topics- 5.1.1C compilation — preprocessor, compiler, assembler, linker
- 5.1.2Data types — char, short, int, long, float, double, size_t
- 5.1.3Type sizes — sizeof, platform dependency, stdint.h (int32_t etc.)
- 5.1.4Operators — arithmetic, relational, logical, bitwise, assignment, comma
- 5.1.5Operator precedence — full table
- 5.1.6Control flow — if - else, switch, while, do-while, for, break, continue, goto
- 5.1.7Functions — declaration vs definition, prototypes, call by value
- 5.1.8Pointers — declaration, dereferencing ( - ), address-of (&)
- 5.1.9Pointer arithmetic — adding integers to pointers
- 5.1.10Arrays and pointers — array name decays to pointer
- 5.1.11Multi-dimensional arrays
- 5.1.12Pointer to pointer
- 5.1.13Function pointers — declaration, calling, use in callbacks
- 5.1.14Dynamic memory — malloc, calloc, realloc, free
- 5.1.15Memory layout — text, data, BSS, heap, stack segments
- 5.1.16Stack frames — how function calls work at the memory level
- 5.1.17Heap fragmentation
- 5.1.18Common memory errors — null dereference, buffer overflow, use-after-free, double free, memory leak
- 5.1.19Valgrind — detecting memory errors
- 5.1.20String handling — char arrays, null terminator, strcpy, strcat, strlen, sprintf (dangers)
- 5.1.21Safe alternatives — strncpy, snprintf, strlcpy
- 5.1.22Structures — declaration, accessing members (. and - - )
- 5.1.23Bit fields in structs
- 5.1.24Unions — overlapping memory
- 5.1.25Enumerations
- 5.1.26Typedef
- 5.1.27Preprocessor directives — #define, #ifdef, #ifndef, #include guards
- 5.1.28Macros vs inline functions
- 5.1.29Variadic functions — va_list, va_start, va_arg, va_end
- 5.1.30Undefined behavior — comprehensive list, why to avoid
- 5.1.31Compile-time assertions — static_assert
- 5.1.32restrict keyword — aliasing hint
- 5.1.33volatile keyword — preventing optimization of hardware registers
5.2
C++ Programming
32 topics- 5.2.1C++ as superset of C — key additions
- 5.2.2References — lvalue references, difference from pointers
- 5.2.3const correctness — const variables, const pointers, const member functions
- 5.2.4Namespaces — avoiding name collisions
- 5.2.5Classes — member functions, access specifiers (public, private, protected)
- 5.2.6Constructors — default, parameterized, copy, delegating
- 5.2.7Destructor — RAII principle
- 5.2.8Copy constructor and copy assignment — Rule of Three
- 5.2.9Move semantics — rvalue references (&&), std - move, std - forward
- 5.2.10Move constructor and move assignment — Rule of Five
- 5.2.11Rule of Zero — prefer compiler-generated specials
- 5.2.12Smart pointers — unique_ptr (sole ownership), shared_ptr (shared ownership, ref count), weak_ptr (break cycles)
- 5.2.13RAII — resource acquisition is initialization — why it's the key idiom
- 5.2.14Templates — function templates, class templates
- 5.2.15Template specialization — full and partial
- 5.2.16Variadic templates — parameter packs, fold expressions
- 5.2.17SFINAE — substitution failure is not an error
- 5.2.18Concepts (C++20) — constraining templates
- 5.2.19STL containers — vector, list, deque, array, set, multiset, map, multimap, unordered_map, unordered_set
- 5.2.20STL algorithms — sort, find, transform, accumulate, copy, all_of, any_of
- 5.2.21Iterators — input, output, forward, bidirectional, random access, contiguous
- 5.2.22Lambda expressions — capture list (by value, by reference)
- 5.2.23std - function and std - bind
- 5.2.24Concurrency — std - thread, std - mutex, std - lock_guard, std - unique_lock
- 5.2.25std - condition_variable
- 5.2.26std - atomic — lock-free operations
- 5.2.27Memory model — happens-before, acquire-release semantics
- 5.2.28std - promise and std - future
- 5.2.29Exception safety — basic, strong, no-throw guarantees
- 5.2.30noexcept specifier
- 5.2.31Inline namespaces, anonymous namespaces
- 5.2.32Modules (C++20) — concept and syntax
5.3
Build Systems & Toolchain
17 topics- 5.3.1Compilation stages — preprocessing, compilation, assembly, linking
- 5.3.2Object files — .o - .obj, symbol table, relocation entries
- 5.3.3Static libraries — .a - .lib, creation and linking
- 5.3.4Dynamic - shared libraries — .so - .dll, dynamic linking, PIC
- 5.3.5Symbol resolution — order matters
- 5.3.6Makefiles — targets, prerequisites, recipes, variables, automatic variables
- 5.3.7Phony targets, pattern rules, implicit rules
- 5.3.8CMake — CMakeLists.txt, add_executable, add_library, target_link_libraries
- 5.3.9CMake build types — Debug, Release, RelWithDebInfo
- 5.3.10Cross-compilation — toolchains, sysroot
- 5.3.11GCC - Clang flags — optimization (-O0 to -O3, -Os), warnings (-Wall, -Wextra), sanitizers
- 5.3.12Address Sanitizer (ASan) — detecting buffer overflows at runtime
- 5.3.13Undefined Behavior Sanitizer (UBSan)
- 5.3.14Thread Sanitizer (TSan)
- 5.3.15GDB debugging — breakpoints, watchpoints, step, next, backtrace
- 5.3.16Profiling — gprof, perf, Valgrind - Callgrind
- 5.3.17Disassembly — objdump, reading assembly
5.4
Scientific Computing (Python)
25 topics- 5.4.1NumPy — ndarray structure, dtype, shape, strides
- 5.4.2Array creation — np.zeros, np.ones, np.linspace, np.arange, np.random
- 5.4.3Indexing and slicing — basic, boolean masking, fancy indexing
- 5.4.4Broadcasting — rules, why it works, gotchas
- 5.4.5Vectorization — avoiding Python loops, speed comparison
- 5.4.6NumPy linear algebra — np.linalg.solve, eig, svd, norm, det
- 5.4.7NumPy FFT — np.fft module
- 5.4.8SciPy — overview of submodules
- 5.4.9scipy.integrate — odeint, solve_ivp (RK45, DOP853), quad
- 5.4.10scipy.optimize — minimize, fsolve, curve_fit, linprog
- 5.4.11scipy.linalg — more stable than numpy.linalg, lu, qr, schur
- 5.4.12scipy.signal — filtering, convolution, FFT-based analysis
- 5.4.13scipy.sparse — sparse matrix formats (CSR, CSC), sparse solvers
- 5.4.14scipy.stats — distributions, hypothesis tests
- 5.4.15Matplotlib — figure - axes architecture
- 5.4.162D plots — line, scatter, bar, histogram, contour, imshow
- 5.4.173D plots — surface, wireframe
- 5.4.18Animation — FuncAnimation
- 5.4.19Publication-quality figures — LaTeX labels, colormaps, DPI
- 5.4.20SymPy — symbolic algebra, calculus, ODE solving
- 5.4.21Pandas — Series, DataFrame, indexing, groupby, merge, pivot
- 5.4.22Floating point gotchas — catastrophic cancellation, associativity failure
- 5.4.23Implementing ODE solvers from scratch — Euler, RK4
- 5.4.24Implementing numerical integration from scratch — trapezoidal, Simpson's
- 5.4.25Implementing root-finding from scratch — Newton-Raphson, bisection
5.5
Embedded Systems & Real-Time Software
28 topics- 5.5.1Microcontroller architecture — ARM Cortex-M series (M0, M3, M4, M7)
- 5.5.2GPIO — input - output, pull-up - pull-down, interrupt on pin change
- 5.5.3Timers — PWM generation, input capture, output compare
- 5.5.4ADC - DAC — resolution, sampling rate, Nyquist
- 5.5.5Communication interfaces — UART, SPI, I2C (master - slave), CAN bus
- 5.5.6CAN bus — frame format, arbitration, error handling — critical in aerospace
- 5.5.7Interrupts — ISR design, NVIC priority, interrupt latency
- 5.5.8DMA — memory-to-memory, peripheral-to-memory without CPU
- 5.5.9RTOS concepts — task, scheduler, preemption, context switch
- 5.5.10FreeRTOS — task creation, priorities, xTaskCreate
- 5.5.11FreeRTOS IPC — queues, semaphores, mutexes, event groups
- 5.5.12Real-time constraints — hard and soft deadlines
- 5.5.13WCET (Worst Case Execution Time) analysis
- 5.5.14Priority inversion — problem and solutions (priority inheritance, priority ceiling)
- 5.5.15Bare-metal vs RTOS — when to use each
- 5.5.16Startup code — vector table, reset handler, stack initialization
- 5.5.17Linker scripts — memory regions, sections (.text, .data, .bss)
- 5.5.18Safety-critical standards — DO-178C (airborne software), IEC 61508, ISO 26262
- 5.5.19MISRA C — rules for safety-critical C code
- 5.5.20Software testing in embedded — unit tests on host, HIL testing
- 5.5.21Hardware-in-the-Loop (HIL) simulation — real hardware, simulated plant
- 5.5.22Software-in-the-Loop (SIL) simulation — all software, simulated hardware
- 5.5.23Watchdog timers — purpose, feeding, types
- 5.5.24Memory protection units (MPU) — preventing stack overflow, access faults
- 5.5.25Redundancy — TMR (triple modular redundancy), voting logic
- 5.5.26Fault tolerance — fail-safe vs fail-operational
- 5.5.27SpaceWire — high-speed serial link standard for spacecraft
- 5.5.28MIL-STD-1553 — military avionics bus
5.6
Machine Learning (Aerospace Applications)
19 topics- 5.6.1Linear regression — normal equation, gradient descent derivation
- 5.6.2Logistic regression — sigmoid, cross-entropy loss
- 5.6.3Regularization — L1 (lasso), L2 (ridge), dropout
- 5.6.4Bias-variance trade-off
- 5.6.5Cross-validation — k-fold
- 5.6.6Neural network fundamentals — neuron, activation functions (ReLU, sigmoid, tanh)
- 5.6.7Feedforward network — forward pass
- 5.6.8Backpropagation — chain rule, gradient computation
- 5.6.9Optimization — SGD, momentum, Adam — derivations
- 5.6.10Batch, mini-batch, stochastic gradient descent
- 5.6.11Convolutional neural networks — convolution operation, pooling
- 5.6.12Recurrent neural networks — hidden state, BPTT
- 5.6.13LSTM — gates, cell state
- 5.6.14Transformers — attention mechanism, self-attention
- 5.6.15Aerospace ML applications — fault detection, system identification
- 5.6.16System identification — learning dynamics from data
- 5.6.17Reinforcement learning — MDP, Bellman equation, Q-learning
- 5.6.18Policy gradient — REINFORCE
- 5.6.19Application to GNC — learned guidance laws