Runtime lines

An interactive reference for full-stack and AI interviews

How Node.js, Python and LLMs actually work

Seven explorers, drawn as lines on a transit map. Step through real programs one line at a time and watch the call stack, the heap, the GIL and the type system move, then see how a language model picks its next token and how LangChain and LangGraph wire models, tools and memory together. Every output comes from a real run, and every line ends with the interview questions it prepares you for.

Start with the event loop

A route for interview prep

Each line builds on the one before it: async first, then values and equality, then how Python stores objects, how its types interact, and concurrency. The AI track comes last: how models work, then how to build with them.

  1. Node event loopasync fundamentals
  2. JavaScript typesvalues and equality
  3. Python memorynames and references
  4. Python typesdispatch and hashing
  5. The GILthreads and processes
  6. How AI workstokens, embeddings, sampling
  7. LangChain & LangGraphbuilding LLM apps

NNode event loop

How one thread juggles thousands of tasks: the call stack, the nextTick and promise queues, timers, the libuv phases and the thread pool.

You’ll be ready for
  • Does a promise callback run before setTimeout(fn, 0)?
  • setImmediate or setTimeout: which fires first?
  • What blocks the event loop, and how do you fix it?

MPython memory

Names, objects and reference counts, how the cycle collector frees what refcounting can’t, and why pymalloc keeps memory after you delete things.

You’ll be ready for
  • Is Python pass-by-value or pass-by-reference?
  • What’s the difference between is and ==?
  • Why doesn’t memory drop after del?

GThe GIL

Four threads and one lock on a live timeline: CPU-bound versus I/O-bound work, free-threaded Python, processes, and a race condition you can step through.

You’ll be ready for
  • Do threads make Python code faster?
  • Does the GIL make my code thread-safe?
  • Threads, processes or asyncio: how do you choose?

JJavaScript types

The typeof junction, how V8 stores each type, copies versus references, the exact == algorithm, truthiness and the 64 bits inside a number.

You’ll be ready for
  • Why is [] == false true?
  • Shallow copy or deep copy?
  • Why is 0.1 + 0.2 !== 0.3?

PPython types

The built-in types and where to use each one, how a + b is dispatched, when += changes things in place, and how dict keys are hashed.

You’ll be ready for
  • What makes an object hashable?
  • What happens when Python evaluates a + b?
  • What’s wrong with def f(items=[])?

AHow AI works

What a language model really does: tokens, next-token probabilities, temperature and top-p, vector embeddings and cosine similarity, and why models hallucinate.

You’ll be ready for
  • What does temperature actually change?
  • What is a vector embedding, and how is similarity measured?
  • Why do LLMs hallucinate, and how do you reduce it?

LLangChain & LangGraph

The essential toolkit for Python AI developers: runnables and LCEL chains, chat models and tools, retrieval, and LangGraph agents with state, checkpoints and human-in-the-loop.

You’ll be ready for
  • What is a Runnable, and what does the | operator build?
  • How does a tool-calling agent loop work?
  • When do you reach for LangGraph instead of a chain?

Step through it

Play, Next and Back move one line of code at a time. Use ← and → to step, Space to play, and pick a speed that suits you.

Outputs you can trust

Every printed output was checked against Node.js 22, CPython 3.12 and the real LangChain and LangGraph packages. The JavaScript passes ESLint and the Python is formatted with black.

Built for revision

Each line ends with interview questions and short answers you can say out loud. Every line has its own address, such as /gil or /langchain, so you can bookmark exactly what you are revising.