Mid-Level Developer Interview Questions and Answers
Mid-level interviews focus on trade-offs and ownership. Interviewers want to see that you have hit real problems such as slow queries, race conditions or re-render storms, and know how to reason your way through them.
Choose SQL when your data is relational and you need transactions, joins and strong consistency; choose NoSQL when you need flexible schemas, very high write throughput or horizontal scaling for a specific access pattern.
Caching stores frequently read data in fast storage such as memory to reduce latency and database load; the main strategies are cache-aside, write-through, write-back and time-based expiry (TTL).
REST exposes resources over HTTP URLs and is simple and cache-friendly, GraphQL lets clients ask for exactly the fields they need from a single endpoint, and gRPC uses binary Protocol Buffers over HTTP/2 for fast service-to-service calls.
An operation is idempotent if repeating it any number of times has the same effect as doing it once; it matters because network retries can otherwise create duplicate orders or payments.
Choose an algorithm such as token bucket or sliding window, store a counter per client (by user ID, API key or IP) in a fast shared store like Redis, and return HTTP 429 with a Retry-After header when the limit is exceeded.
git revert creates a new commit that undoes an earlier one and is safe on shared branches; git reset moves the branch pointer back to an earlier commit, effectively removing later commits from that branch鈥檚 history.
Docker Compose defines a multi-container application (services, networks and volumes) in one YAML file so you can start, stop and rebuild the whole stack with a single command, typically for local development and testing.
Treat a flaky test as a bug: quarantine it so it stops blocking the pipeline, reproduce it by running it repeatedly, fix the root cause (usually timing, shared state or external dependencies), then bring it back.
Selenium is the long-established, language-agnostic standard built on WebDriver; Cypress runs inside the browser with an excellent developer experience for JavaScript apps; Playwright offers fast, auto-waiting cross-browser automation with multiple tabs, contexts and languages. For a new web project, Playwright is usually the strongest default.
Describe a real technical or process disagreement, show that you listened and argued with evidence rather than opinion, explain how a decision was reached, and how you supported it afterwards even if it was not your idea.
Validate all input, use parameterised queries, add security headers with helmet, rate-limit requests, restrict CORS, hash passwords, keep secrets in environment variables, and keep dependencies updated and audited.