Question library
Explained questions for the decisions developers make.
How can I practice joins and window functions?
A useful SQL exercise starts with a small dataset whose expected answer can be checked manually. Window functions then demonstrate ranking while keeping each employee's fields available. The example below returns all employees tied for the highest salary in each department.
Local state vs Redux/Zustand vs server state?
Local state belongs to a nearby component, a client store coordinates shared UI data, and server state represents data owned by a remote service. Server-state tools manage freshness, fetching and invalidation because the browser is only keeping a cached copy. Choosing the owner first prevents duplicated and conflicting sources of truth.
What are DDD, SOLID and dependency inversion?
Domain-driven design models software around business concepts and their boundaries. SOLID is a group of design principles for keeping responsibilities focused and dependencies manageable. Dependency inversion is one of those principles: high-level business policy depends on an abstraction rather than a particular low-level implementation.
Cache, CDN, replica or shard: which solves what?
Caches, CDNs, replicas and shards address different kinds of repeated work or load. A cache reuses a result, a CDN brings cacheable content closer to users, a replica copies data, and a shard owns a subset of data. Combining them requires freshness, routing and recovery rules rather than simply adding more boxes.
How would you design a real-time dashboard?
A real-time dashboard presents frequently changing summaries without making each browser recalculate the whole dataset. An ingestion or aggregation layer builds the current view, and SSE or WebSockets deliver relevant updates. Clients still need an initial snapshot and a way to recover missed updates after disconnecting.
XSS vs CSRF vs CORS?
XSS, CSRF and CORS concern browser trust but refer to different mechanisms. XSS runs attacker-controlled script in a trusted page, CSRF triggers requests with automatically attached credentials, and CORS controls whether browser code may read cross-origin responses. A defense for one does not automatically solve the others.
How did you prevent duplicate processing?
Duplicate prevention identifies repeated attempts at the same logical operation and avoids applying its effect twice. It must work under concurrent requests and crashes, so an ordinary pre-check is often insufficient. A stable key plus an atomic database rule is one approach, with separate handling for external effects.
What would you cache?
Caching reuses an earlier result to avoid repeated work. Good candidates are expensive repeated reads with an acceptable freshness window and a clear key. Caching is a poor shortcut when every answer must reflect the latest write or when users could share private results accidentally.
Which edge cases and tests matter most?
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.
How to use this AI Engineering guide
A practical textbook for building AI applications, agents, and reliable client solutions.
Prompt engineering, zero-shot, and few-shot prompting
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…
Provider ecosystems: OpenAI, Anthropic, Gemini, and Azure OpenAI
Providers supply hosted model inference and related capabilities. OpenAI, Anthropic, and Google offer their own model ecosystems; Azure OpenAI provides access to supported OpenAI models within Azure's service and identity environment. Common concepts…
Pydantic and FastAPI
Pydantic validates data against Python model definitions. FastAPI uses declared routes and schemas to build HTTP services with validation and API documentation. Think of Pydantic as a role similar to Zod and FastAPI as a Python web framework with typed…
Multi-hop RAG and agentic RAG
Multi-hop RAG retrieves information in dependent steps: one finding determines the next search. Agentic RAG lets a bounded agent choose retrieval tools or decide whether another search is needed. A fixed two-step retrieval workflow can be multi-hop without…
OpenAI Agents SDK
The OpenAI Agents SDK provides agent-oriented building blocks for model calls, tools, handoffs, and run management. It offers a higher-level agent interface than manually processing each API response. SDK features and provider integration details depend on…
Microsoft Agent Framework: agents and workflows
Microsoft Agent Framework, or MAF, provides agent abstractions and explicit workflows. An agent handles model-driven interaction and tool use; a workflow connects agents and ordinary functions through controlled paths. Microsoft describes it as the successor…
Semantic Kernel and AutoGen
Semantic Kernel is a Microsoft ecosystem for integrating models, plugins/functions, and agent capabilities into applications. AutoGen is known for multi-agent conversation and orchestration abstractions. Their historical APIs remain relevant in existing…
Long-running workflows, retries, timeouts, and schedules
Long-running workflows persist progress while waiting for jobs, timers, or people. Retries repeat transiently failing work; timeouts cap waits; schedules start work at defined times. Durable waiting should not consume an open request or a sleeping application…
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.