Interview preparation
UNDERSTAND. EXPLAIN. REPEAT.

Question library

Explained questions for the decisions developers make.

Filters
117 questions matching “Coding”

What LangGraph is and why it exists

AI Engineering·LangGraph, in depth

LangGraph represents execution as a graph of steps sharing explicit state. Nodes do work and edges select the next step; the graph can contain both ordinary code and model decisions. It supports applications that need branching, repeated tool use, and…

Intermediate3 min read

Deterministic workflows

AI Engineering·Deterministic and agentic workflows

A deterministic workflow follows explicitly coded transitions for given inputs and recorded external outcomes. It can call nondeterministic services, but its orchestration rules remain controlled. It is the natural extension of validation, transactions, and…

Intermediate2 min read

Policy-code search fails despite good semantic search. What do you do?

AI Engineering·Embeddings

I add exact identifier fields and lexical/hybrid retrieval. Embeddings may not preserve rare codes or precise numbers well. I test actual identifiers and keep them intact during query rewriting and text preprocessing.

Advanced2 min read

The decision mindset

AI Engineering·Senior engineer decision framework

A decision framework is a repeatable sequence of questions that turns a requirement into justified architecture. Each added capability should solve a concrete gap. It prevents treating every client request as an opportunity to deploy every AI framework.

Advanced3 min read

Do I need AI? Can deterministic code solve it?

AI Engineering·Senior engineer decision framework

Ask what the user actually needs and what the existing system already knows. Exact lookups, arithmetic, validation, and known transitions usually belong in normal code. AI is useful when language/media variation or learned pattern recognition provides value…

Advanced2 min read

What is the difference between var, let and const?

JavaScript & TypeScript·Scope & execution

var, let and const declare variables, but they have different scope and initialization rules. let and const are block-scoped, making it easier to keep a variable inside the code that needs it. const prevents reassignment of the binding; it does not make an object immutable.

Foundation2 min read

How does async JavaScript run?

JavaScript & TypeScript·Async JavaScript

Asynchronous JavaScript lets a program start work that may finish later without waiting synchronously for the result. A promise represents eventual completion, and async/await provides a readable way to work with promises. The runtime queues continuations and runs them when the current synchronous work has finished and the relevant checkpoints are reached.

Intermediate2 min read

CommonJS vs ES Modules: what is the difference?

JavaScript & TypeScript·Runtime & modules

CommonJS and ES Modules are two systems for dividing JavaScript code into reusable modules. CommonJS uses runtime require calls, while ES Modules provide standard import and export declarations with a statically described dependency structure. Their loading and interoperability rules depend on the runtime and file configuration.

Intermediate2 min read

How do garbage collection and memory leaks work?

JavaScript & TypeScript·Runtime & modules

Garbage collection automatically reclaims memory that can no longer be reached by running code. A memory leak happens when the program keeps a reference to data it no longer needs, so the collector must treat that data as still usable. Increasing the heap limit may delay failure but does not remove the unwanted references.

Intermediate2 min read

How do narrowing and type guards work?

JavaScript & TypeScript·TypeScript

Narrowing is TypeScript's process of reducing a broad type to a more specific type based on control flow and checks. A type guard is a check that gives the compiler evidence about a value, such as typeof, in or a custom predicate. Correct guards help application code safely use data that starts out uncertain.

Intermediate2 min read

What are mapped types, conditional types and decorators?

JavaScript & TypeScript·TypeScript

Mapped types build a new type by visiting the keys of another type, and conditional types choose a type based on a type relationship. Decorators are different: they run as part of JavaScript class definition and can add metadata or change behavior. Type transformations disappear during compilation, while decorator code can affect runtime behavior.

Intermediate2 min read

What is the output here?

JavaScript & TypeScript·Output prediction

Output prediction requires following the order in which synchronous code and queued callbacks can execute. This example combines the current script, a promise microtask and a timer callback. A zero-delay timer becomes eligible later; it does not interrupt the running script.

Intermediate2 min read

How should Express handle errors?

Node.js, Express & HTTP·Express lifecycle

Error handling turns application failures into predictable responses and useful internal logs. Express uses error middleware with four arguments to handle errors passed into its request pipeline. Synchronous throws are handled by Express, while promise forwarding differs between Express 4 and 5.

Intermediate2 min read

OAuth vs OIDC: what is the difference?

Node.js, Express & HTTP·Authentication & security

OAuth is a framework for delegated access, allowing a client to act with limited permission on protected resources. OpenID Connect (OIDC) adds a standard identity layer for user login on top of OAuth. The authorization code flow separates browser redirects from the token exchange and commonly uses PKCE to protect that exchange.

Intermediate2 min read

How do I prevent injection, XSS, CSRF and SSRF?

Node.js, Express & HTTP·Authentication & security

Injection, XSS, CSRF and SSRF attack different trust boundaries. Injection changes a database command, XSS runs unwanted browser code, CSRF abuses automatically attached credentials, and SSRF makes a server contact an unintended destination. Input validation helps, but each attack also needs controls at the point where the dangerous action happens.

Intermediate2 min read

What are modules, controllers and services?

NestJS·Modules & dependency injection

Nest modules define feature boundaries and register the controllers and providers that belong to a feature. Controllers handle transport concerns, while services usually contain business rules. This separation makes code easier to reuse and test without tying every decision to HTTP.

Foundation2 min read

Why does Nest say it cannot resolve a dependency?

NestJS·Modules & dependency injection

A dependency-resolution error means Nest cannot find or create a required provider in the current module context. The class may exist in source code but still be invisible to the consumer's module. Troubleshooting should follow the token, registration, export and import path.

Foundation2 min read

What is the Nest request lifecycle?

NestJS·Request lifecycle

The request lifecycle is the order in which Nest processes an incoming request and produces a response. Different extension points handle different concerns, such as access checks, input conversion and response wrapping. Knowing the order helps explain why code in one stage cannot rely on work that happens later.

Intermediate2 min read

Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.