Question library
Explained questions for the decisions developers make.
MAF versus LangGraph?
I compare ecosystem/language fit, state contracts, review/resume behavior, persistence guarantees, observability, and hosting. LangGraph starts from explicit state-graph orchestration; MAF provides agent and workflow abstractions in its ecosystem. The…
A client already uses Semantic Kernel. Do you rewrite?
I inventory maintained features, current support, and actual pain points. I prototype MAF behind stable tool contracts and compare evaluation/recovery behavior before migrating. A rename or new framework alone does not justify a risky rewrite.
What is a guardrail?
A check limiting unsafe or invalid behavior at input, output, or tool boundaries. Examples include schemas, content checks, evidence validation, rate limits, business rules, and approval gates.
Why isn't normal unit testing enough?
Model outputs vary and can be plausible but wrong. I still unit-test deterministic code, but also evaluate representative tasks, support from evidence, tool behavior, and safe failure using versioned datasets and rubrics.
Do type hints validate runtime input?
No. They help developers and type checkers. I use Pydantic or explicit validation for external data and carefully configure coercion/strictness where field values affect business behavior.
Agents and frameworks
LangGraph essentials: nodes return state updates; reducers define merge behavior; edges control next steps; model routes need validation; production needs durable checkpoint storage and authorized threads. An interrupted node can restart, so pre-pause side…
Java DSA basics
Common data structures in Java
Why Scripted Testing Matters
An important lesson is to test the deterministic engine without depending on live LLM variability.
Are objects passed by reference?
JavaScript passes every argument by value. For an object, the copied value is a reference to that object, so the caller and function can still reach the same underlying object. This explains why changing a property affects the caller, but assigning a new object to the parameter does not.
Which Promise method should I use?
Promise combinators combine several promises into one result. The correct method depends on whether you need every success, every outcome, the first outcome or the first success. They observe promises; they do not automatically cancel ongoing operations when the combined result settles.
Is spread a deep copy?
Spread syntax creates a new outer object or array by copying its enumerable contents. It is a shallow copy, so nested objects are still shared references. This matters when updating React state or copying request data that another part of the application may modify.
Debounce vs throttle: what is the difference?
Debouncing and throttling control how frequently a function runs when events arrive repeatedly. Debouncing waits for a quiet period, while throttling limits execution frequency during continued activity. They reduce unnecessary work but introduce different delays and must match the user experience.
How do global, controller and route handlers interact?
Nest can attach request handlers at global, controller and route scopes. Scope determines which requests a handler applies to, while handler type determines execution order. Interceptors wrap inner work and unwind on the response path; exception filters select a matching handler rather than form a normal middleware chain.
How do I test and deploy a Nest app?
Testing a Nest application means verifying business rules, framework wiring and real integrations at suitable levels. Deployment then packages that verified application with configuration, health checks and lifecycle handling. Mock-only tests cannot prove the database constraints or authentication chain behave correctly.
What index types should I know?
MongoDB offers different index types because equality lookup, array search, text search, uniqueness and expiry have different needs. A compound index orders several fields together, while a partial index includes only documents matching a condition. TTL indexes support eventual cleanup rather than precise scheduling.
Populate vs lean: what should I remember?
populate resolves references so related records are available in a query result. lean skips creating full Mongoose document instances and returns plain JavaScript objects. One controls related-data retrieval and the other controls result hydration, so they solve different performance concerns.
What are primary keys, foreign keys and constraints?
Keys identify records and relationships, while constraints tell the database which stored states are allowed. A primary key identifies each row, a foreign key validates a relationship, and other constraints enforce required or unique values and conditions. Database enforcement protects data even when different application paths write concurrently.
Optimistic vs pessimistic locking?
Optimistic locking checks whether data changed before committing an update, often by comparing a version number. Pessimistic locking acquires a database lock before performing a critical change. The first avoids waiting when conflicts are rare; the second coordinates competing writers but can increase waits and deadlocks.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.