Interview preparation
UNDERSTAND. EXPLAIN. REPEAT.

Question library

Explained questions for the decisions developers make.

Filters
118 questions matching “Behavioral”

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

Dataset preparation, evaluation, and RAG comparison

AI Engineering·Fine-tuning

Dataset preparation converts representative examples into the selected training format with reviewed expected outputs. Evaluation compares trained behavior against the baseline on separate data. RAG supplies current external knowledge at runtime; fine-tuning…

Advanced2 min read

How do you validate AI-generated code?

Mock interview questions·Behavioral

Validating AI-generated code means taking responsibility for its behavior rather than accepting plausible-looking output. Start from requirements and trace the important paths, then use tests and documentation to verify assumptions. Generated code deserves the same correctness, security and maintainability standards as manually written code.

Intermediate2 min read

How do you maintain code quality?

Mock interview questions·Behavioral

Code quality is the ability of a codebase to remain correct, understandable and safe to change. It comes from clear design, meaningful tests, review and feedback from production behavior. Tools enforce some consistency, but they do not replace sound business rules or ownership of dependencies.

Intermediate2 min read

What are hooks, virtuals, instance methods and static methods?

MongoDB & Mongoose·Mongoose

Hooks run around selected document or query operations, virtuals compute values that are not normally stored, and methods attach reusable behavior to documents or models. These features keep related logic near the data model. However, each feature has a defined execution context and does not apply to every write path automatically.

Intermediate2 min read

Logs vs metrics vs traces, and SLI vs SLO?

Performance & security·Observability

Observability means understanding a system's behavior from the information it emits. Logs capture events, metrics summarize measurements over time, and traces connect work across a request path. An SLI is a measured service behavior, while an SLO is the target the team aims to meet over a defined period.

Intermediate2 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

Choosing a vector/search store

AI Engineering·Vector databases and search

Pinecone, Qdrant, Weaviate, pgvector, MongoDB Vector Search, Elasticsearch, and OpenSearch provide different ways to store and retrieve vector-backed knowledge. Some are dedicated vector services; others extend databases or search engines you may already…

Foundation3 min read

Fine-tuning and when it is justified

AI Engineering·Fine-tuning

Fine-tuning trains an existing model further using task-specific examples. It changes learned behavior rather than simply adding a document to the current prompt. It can target formatting, domain task performance, style, or consistent instruction following.

Advanced2 min read

Schema vs model vs document in Mongoose?

MongoDB & Mongoose·Mongoose

A Mongoose schema defines document fields and behavior, and compiling it creates a model used for collection operations. A document is one hydrated record returned or created through that model. Hydration supplies methods and change tracking, which are useful for edits but add work compared with plain objects.

Intermediate2 min read

What are schemas, roles, sequences, functions and triggers?

SQL & PostgreSQL·PostgreSQL & ORMs

PostgreSQL schemas organize database objects, and roles with grants control access to those objects. Sequences generate numeric values, functions package executable database logic, and triggers run configured logic in response to events. These features add organization and automation, but hidden trigger behavior can make writes harder to reason about.

Intermediate2 min read

What should I check before deploying Next.js?

React & Next.js·Security & deployment

Deploying Next.js means matching the application's rendering and server features with the hosting environment. A static export cannot provide every capability that requires a running server. Configuration, secrets, cache behavior and protected-route handling must therefore be checked in the actual deployment mode.

Intermediate2 min read

Mock vs stub vs spy vs fixture?

Testing & delivery·Testing

Test doubles replace real collaborators so a test can control conditions or observe interactions. A stub supplies a response, a spy records calls, and a mock often combines replacement with expected interactions; terminology varies by library. Fixtures supply stable input data so cases are repeatable.

Foundation2 min read

How do I check correctness?

AI code review·Review reasoning

Correctness means the implementation satisfies the required behavior for valid, invalid and concurrent inputs. A review begins with the intended rule, because readable or compilable code can still implement the wrong rule. Trace the inputs, state changes and outputs before judging style.

Intermediate2 min read

How do I check maintainability?

AI code review·Review reasoning

Maintainability means another developer can understand and safely change the code without discovering hidden dependencies. Clear responsibilities, names and contracts reduce the chance that a small change breaks unrelated behavior. Abstraction helps when it removes a real duplication or dependency, not merely when it adds more classes.

Intermediate2 min read

System, user, assistant, and tool messages

AI Engineering·AI and LLM fundamentals

Message roles identify the purpose and source of information. System or developer instructions describe application behavior, user messages contain requests, assistant messages contain model responses, and tool results supply external observations. Exact role…

Foundation2 min read

RAG evaluation and comparison with alternatives

AI Engineering·RAG, beginner to advanced

RAG evaluation measures retrieval quality and answer quality independently and together. Fine-tuning changes model behavior through training; long context supplies a large body of content directly; traditional search returns evidence without generating an…

Intermediate2 min read

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