Madhav’s Second Brain

This is my knowledge garden, built from everything I’m reading, studying, and thinking through as a software engineer, poker player, and compulsive rabbit-hole follower.

It has two layers. The synthesized layer (concepts, topics, and sources) is maintained by an LLM as I ingest new material, based on Andrej Karpathy’s LLM-wiki pattern. The notes are unfiltered notes from books and courses, the source material the synthesis is built on. Each source page links back to the notes behind it.

The synthesized layer gets richer every time I read something new. The notes stay as they were written.


Notes

Sources

Concepts

  • Reliability, Scalability, and Maintainability — The three foundational properties of data-intensive systems; fault taxonomy
  • Data Models — Relational vs. document vs. graph models; schema-on-read vs. schema-on-write
  • Storage Engines and Indexes — Hash indexes, SSTables, LSM-trees, B-trees; OLTP vs. OLAP; column-oriented storage
  • Replication — Single-leader, multi-leader, leaderless replication; failover; replication log implementations
  • Eventual Consistency and Replication Lag — Replication lag anomalies: stale reads, non-monotonic reads, causal violations
  • Partitioning — Key-range vs. hash partitioning; secondary indexes; rebalancing strategies
  • Transactions and ACID — ACID guarantees; what “C” in ACID actually means
  • Isolation Levels — Read committed, snapshot isolation, serializability; 2PL, SSI; lost updates, write skew
  • Distributed Systems Faults — Partial failures, unreliable networks, unreliable clocks, Byzantine faults
  • Linearizability and CAP Theorem — Recency guarantee; CAP theorem; which replication strategies are linearizable
  • Thread Safety — What thread safety means; shared mutable state; three strategies
  • Atomicity — Indivisible operations; read-modify-write races; program-level vs. database-level atomicity
  • Locking — Intrinsic locks, reentrancy, lock-guarding discipline; database 2PL; deadlock
  • Memory Visibility and Reordering — JVM memory model; reordering; volatile variables
  • Dopamine — Baseline/peak ratio; the readily-releasable pool; cold water’s unique profile; caffeine vs. stimulants
  • Motivation Maintenance — Intermittent reinforcement; reward stacking problem; process rewards; burnout as baseline suppression
  • Scaling — Vertical vs. horizontal scaling; stateful bottlenecks; scale bottom-up heuristic
  • Delegation — Async by default; delegate and respond; what work belongs off the critical path
  • Communication Protocols — Short polling, long polling, WebSocket, SSE; when each applies

Topics

  • Distributed Systems — Theory and engineering of multi-machine systems; consistency, availability, fault tolerance
  • Databases — Storage engines, data models, transactions, and distributed databases
  • Concurrent Programming — Thread safety, locking, memory visibility; program-level concurrency on the JVM
  • Psychology — Neuroscience of motivation and behavior; dopamine mechanics and reward design
  • System Design — Designing large-scale systems; component selection, capacity estimation, architectural trade-offs

Reading List