Quick recap · Cheat sheet ☷ Flashcards
Quick recap

All 299 questions, one line each

Filter to one category, collapse what you already know, and print the rest. Click any question to open the full explanation.


The 20 things to be sure of

If you remember nothing else, remember these.

1Value types copy the data, reference types copy the pointer. "Stack vs heap" is an implementation detail.
2Override Equals → you must override GetHashCode, and hash only immutable fields.
3throw; preserves the stack trace. throw ex; destroys it.
4await on I/O creates no thread — it frees one. That's why it scales.
5I/O-bound → async. CPU-bound → Parallel. Never Task.Run around async I/O.
6No fire-and-forget background work: exceptions vanish, and the scoped DbContext is already disposed.
7.Result/.Wait() = deadlock in classic ASP.NET, thread-pool starvation in Core.
8Always bound concurrency — size it to the bottleneck (connection pool, rate limit), not the CPU.
9IQueryable runs in SQL, IEnumerable runs in memory. Don't downgrade too early.
10LINQ is deferred — enumerating twice runs the query twice.
11Any() not Count() > 0. And All() on an empty list is true.
12Read-only EF query → AsNoTracking() + project to a DTO.
13N+1 is the most common EF bug — find it by logging the SQL, fix it with Include or a projection.
14Concurrency conflicts: a rowversion token → DbUpdateConcurrencyException → 409, don't overwrite silently.
15Middleware order is behaviour: exception handler first, UseAuthentication before UseAuthorization.
16A Singleton must never hold a Scoped service — captive dependency. Catch it with ValidateOnBuild.
17Never expose entities: data leaks, over-posting, circular references. Use DTOs.
18Status codes are the contract: 400 malformed · 401 unauthenticated · 403 not permitted · 409 conflict. Never 200 with an error inside.
19CORS is a browser rule — that's why Postman works. It protects users, not your API.
20A timeout ≠ a failure. Retry only transient errors, with backoff + jitter, and only if the operation is idempotent.

Words that signal seniority

idempotent · captive dependency · thread-pool starvation · optimistic concurrency · deferred execution · N+1 · backpressure · exponential backoff with jitter · circuit breaker · trust boundary · set-based · separation of concerns · measure first · trade-off

How to answer, whatever they ask

What it is → why it matters → what you'd do in practice, then tie it to something you've actually built. If you don't know, say so and say how you'd find out.