Question library
Explained questions for the decisions developers make.
Subgraphs and multi-agent graphs
A subgraph is a smaller graph used as a component of a larger one. A multi-agent graph assigns model-driven responsibilities to separate nodes or subgraphs. Subgraphs support modularity even when no multi-agent behavior is involved.
The overall insurance assistant
An insurance assistant helps authenticated customers understand documents, check claim status, prepare submissions, and reach staff. It combines RAG, exact service lookups, and bounded agent behavior. It does not become the authoritative policy or…
What should I study first?
Preparation works best when later topics build on earlier ones. JavaScript scope and async behavior support Node and React; database rules support backend correctness and system design. Follow the sequence, but spend extra time where you cannot yet explain a concept without reading the answer.
What are hoisting and the TDZ (Temporal Dead Zone)?
Hoisting is JavaScript's behavior of processing declarations before executing the code in a scope. Because of this, a function declaration can usually be called before its line appears, while variables behave differently depending on how they are declared.
How do prototypes and classes work?
A prototype is an object from which another object can inherit properties and methods. When a property is missing on an object, JavaScript follows its prototype chain until it finds the property or reaches null. Classes provide structured syntax for constructing objects and sharing methods through that mechanism.
Dynamic module vs global module?
A dynamic module creates its module definition from supplied configuration, making a feature reusable in different environments. A global module makes its exported providers broadly available after registration. Dynamic describes configuration behavior; global describes visibility, so these are independent properties.
TypeORM vs Sequelize vs Mongoose?
TypeORM and Sequelize are object-relational mappers for relational databases, while Mongoose models documents in MongoDB. They provide convenient data-access APIs but do not replace database knowledge. The generated queries, constraints and transaction behavior still determine correctness and performance.
Why does an effect run twice in development or loop forever?
React Strict Mode performs an extra development-only setup and cleanup cycle for effects to reveal missing cleanup. An infinite effect loop is a different issue, usually caused by updating state that keeps changing an effect dependency. Understanding the trigger helps fix the design rather than masking the behavior.
App Router vs Pages Router?
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.
SSR vs CSR vs SSG vs ISR?
SSR, CSR, SSG and ISR describe when and where page content is generated. SSR renders for requests, CSR builds UI in the browser, SSG generates static content ahead of requests, and ISR refreshes generated content after deployment. The choice trades freshness, server work, cacheability and initial loading behavior.
Route handler vs Server Action vs middleware/Proxy?
Route handlers expose HTTP endpoints, Server Actions provide server-side functions for mutations, and middleware/Proxy can intercept requests for routing behavior. They are different entry points with different responsibilities. An action or handler exposed through the app must still validate input and enforce access near the protected work.
How should caching and revalidation work?
Caching saves a previously computed or fetched result so it can be reused, while revalidation refreshes or invalidates that stored result. A cache design needs a key, a freshness rule and a plan for changes. In Next.js there can be several caching layers, so one invalidation mechanism may not describe every layer's behavior.
What makes a good REST API?
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.
How do I prevent SQL injection, NoSQL injection and SSRF?
Injection occurs when untrusted data becomes part of a command's structure rather than remaining data. SSRF occurs when the server's network access is used to reach an unintended destination. These attacks bypass simple “is this input present?” checks because apparently valid strings or objects can still cause unauthorized behavior.
What are least privilege, TLS and secure headers?
Least privilege limits what a user or service can access, TLS protects data while it travels, and secure headers constrain some browser behaviors. Encryption at rest protects stored data under the storage threat model, but does not prevent an authorized application from exposing it. Security works through several focused controls rather than one universal setting.
Is rate limiting enough to prevent every attack?
Rate limiting restricts how much work a caller can request within a defined policy. It protects capacity and makes repeated abuse harder, but it cannot distinguish every attacker or stop all traffic before it reaches the system. Rules should fit the resource, user identity and infrastructure layer.
Unit vs integration vs E2E tests?
Unit tests check a small piece of logic, integration tests verify collaborating components, and E2E tests exercise a complete user or API flow. They catch different classes of failure and have different setup and execution costs. A balanced strategy puts detailed business-rule checks near the unit level and preserves real integration coverage where mocks would hide bugs.
Is 100% coverage enough?
Coverage measures which lines, branches or functions executed while tests ran. It can reveal untested areas, but execution does not prove that the assertions checked correct behavior. A suite can reach every line and still miss invalid inputs, race conditions or a wrong expected value.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.