Programming Concepts 💡

Language-independent ideas and mental models that come up when writing, reading, and reasoning about how code executes and how computers manage memory.

This section provides a 4-stage progressive roadmap from foundational execution and memory basics up to everyday backend design paradigms and runtime concurrency.


The 4-Stage Learning Roadmap

flowchart LR
    S1["Stage 1: Core Execution & Memory\n(Compiled vs Interpreted, Stack/Heap, Pointers, GC)"]
    S2["Stage 2: Types, Functions & Scope\n(Type Systems, Closures/Callbacks, Recursion)"]
    S3["Stage 3: Structuring Code\n(Paradigms, Composition/Interfaces, Errors, Generics)"]
    S4["Stage 4: Runtime & Backend Bridge\n(Async/Await, Processes/Threads, Serialization)"]

    S1 --> S2 --> S3 --> S4

Stage 1: Core Execution & Memory Basics (Simple)

Foundational concepts about how source code runs on physical hardware and where variables live in memory:

  • Compiled vs Interpreted Languages — How source code turns into machine instructions, Ahead-of-Time (AOT) vs bytecode interpretation, JIT compilation, and container/serverless trade-offs.
  • Stack vs Heap Memory & Stack Overflow — The cafeteria tray stack vs hotel storage heap mental model, local variables, dynamic data, and the anatomy of stack overflow crashes.
  • Value vs Reference, Pointers & Mutability — Photocopiers vs shared Google Docs, pointers in plain English (* and &), mutable vs immutable data, and Python default argument traps.
  • Garbage Collection Basics — Manual memory management (malloc/free) vs automatic GC, Reference Counting vs Mark-and-Sweep, and how memory leaks still happen in managed languages.

Stage 2: Data Types, Functions & Scope (Easy–Medium)

How programming languages check data types, organize variable visibility, and pass logic around:


Stage 3: Structuring Code & Design Paradigms (Medium)

How to organize programs cleanly without getting trapped in deep inheritance hierarchies:


Stage 4: Everyday Runtime & Backend Bridge (Medium)

Connecting core programming concepts to cloud-native microservices and distributed systems:

  • await) — The coffee shop buzzer analogy, blocking vs non-blocking I/O, I/O-bound vs CPU-bound tasks, and how Go takes a different approach with goroutines.
  • Processes, Threads & Coroutines (Goroutines) — Separate houses (processes) vs roommates (threads) vs cooperative chore-swapping (goroutines/fibers), memory overhead, and context switching.
  • Serialization & Data Formats: JSON, YAML & Protobuf — Converting in-memory objects to text or bytes, flat-pack furniture analogy, and choosing between JSON, YAML, and Protocol Buffers.