Interview preparation
UNDERSTAND. EXPLAIN. REPEAT.

Question library

Explained questions for the decisions developers make.

Filters
117 questions matching “Coding”

App Router vs Pages Router?

React & Next.js·Next.js architecture

Next.js provides two routing systems: the Pages Router organizes page files, while the App Router uses nested route segments, layouts and React Server Components. They have different data-fetching and rendering conventions. Knowing which router a project uses prevents mixing APIs and assumptions from different architectures.

Intermediate2 min read

Server Component vs Client Component?

React & Next.js·Next.js architecture

A Server Component runs in the server environment and does not ship its component implementation to the browser as interactive JavaScript. A Client Component is part of a client boundary and supports state, effects and browser events. In Next.js, Client Components can still contribute server-generated HTML on the initial load, so client does not mean browser-only rendering.

Intermediate2 min read

How should I secure and organize a frontend?

React & Next.js·Security & deployment

Frontend architecture organizes components, data access and state so a feature can be understood and changed without tracing the whole app. Security defines which data and actions each user may access, and the backend must enforce it independently of visible controls. A clear API layer and explicit loading/error states also make failures easier to handle consistently.

Intermediate2 min read

What makes a good REST API?

System design·Architecture & API design

A REST-oriented API exposes resources through consistent HTTP operations and representations. A useful API contract explains identifiers, input rules, outcomes, errors and pagination so clients do not need to guess. The goal is predictable behavior and evolvable interfaces, not forcing every business operation into a simplistic CRUD shape.

Intermediate2 min read

MongoDB aggregation becomes slow. What do I check?

Performance & security·Production incidents

A slow aggregation often processes a much larger intermediate dataset than its final output suggests. Joins, unwinds, sorts and groups can expand work or exceed useful memory limits. Inspecting the pipeline stage by stage reveals where the expensive growth occurs.

Advanced2 min read

What are Jest, React Testing Library and Supertest?

Testing & delivery·Testing

Jest provides test execution, assertions and tools for replacing dependencies. React Testing Library helps test components through behavior visible to users, while Supertest sends HTTP requests to an application for API assertions. They can be combined, but none automatically chooses meaningful cases or guarantees realism.

Foundation2 min read

How do I resolve a merge conflict or find a bad commit?

Testing & delivery·Git

A merge conflict means Git cannot automatically decide how competing changes should combine. Resolving it requires understanding the intended behavior, not just removing conflict markers. Bisect solves a different problem: it narrows the commit range that introduced a reproducible regression through repeated good/bad checks.

Foundation2 min read

The container exits immediately. What should I check?

Testing & delivery·Troubleshooting

A container stays running while its main process remains alive. An immediate exit usually means the command finished, failed startup or was killed, rather than that Docker randomly stopped a healthy application. Logs, exit status and runtime configuration tell you which case occurred.

Intermediate2 min read

How were errors handled?

Project deep dives·Project discussion

Error handling defines what happens when inputs, business rules or dependencies fail. A reliable API returns an appropriate response while preserving enough internal context for diagnosis. The answer should describe actual behavior rather than promise that errors were simply “handled centrally.”

Intermediate2 min read

How do I check performance?

AI code review·Review reasoning

A performance review checks whether the amount of work stays reasonable as input size and traffic increase. Database calls, large allocations and synchronous CPU work can be more important than small syntax choices. Use measurements for suspected hotspots rather than adding optimizations everywhere.

Intermediate2 min read

How do I check reliability?

AI code review·Review reasoning

Reliability means the operation behaves predictably when dependencies fail, time out or return uncertain outcomes. It includes recovery after a crash, bounded resource use and preservation of business state. A happy-path test cannot prove that retries, rollback and cleanup are correct.

Intermediate2 min read

Which edge cases and tests matter most?

AI code review·Review reasoning

Edge cases are valid boundary conditions and failure situations that ordinary examples may not exercise. Useful tests prove important rules under those conditions, including concurrent and repeated requests. The highest-value case is often where a missing record, denied access or partial failure changes control flow.

Intermediate2 min read

How to use this AI Engineering guide

AI Engineering·Start here

A practical textbook for building AI applications, agents, and reliable client solutions.

Foundation2 min read

Prompt engineering, zero-shot, and few-shot prompting

AI Engineering·AI and LLM fundamentals

Prompt engineering is writing clear task instructions, inputs, constraints, and output expectations. Zero-shot prompting gives instructions without examples; few-shot prompting adds a small number of input/output examples. A prompt is part of the application…

Foundation2 min read

Structured output and JSON output

AI Engineering·AI and LLM fundamentals

JSON output is machine-readable data, such as an object with named fields. Structured output adds a declared schema so the response follows expected fields and types when the provider supports schema-constrained generation. Valid JSON, valid schema, and valid…

Foundation3 min read

Functions, classes, modules, and exceptions

AI Engineering·Python for AI engineers

Functions package operations; classes group state and behavior; modules are importable Python files or packages. Exceptions represent errors that interrupt normal control flow until handled. These serve the same broad purposes as functions, classes, imports,…

Foundation2 min read

Agents, chatbots, and workflows

AI Engineering·Agents and agent patterns

An AI agent is software that uses a model to choose actions toward a goal, observes results, and decides what to do next within application limits. A chatbot describes a conversational interface; it may or may not contain an agent. A workflow defines the…

Intermediate2 min read

LangChain overview, models, prompts, and chains

AI Engineering·LangChain

LangChain is a framework ecosystem for assembling model-driven applications. Model wrappers, prompt templates, and composable operations make integration easier. A chain is a sequence of transformations or calls; it can be fixed and does not automatically…

Intermediate2 min read

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