Question library
Explained questions for the decisions developers make.
A third-party API starts timing out. What do I do?
A third-party timeout means your service did not receive an answer within its waiting budget. It does not prove that the remote operation was never performed. Timeouts need bounded waiting, controlled concurrency and a strategy for uncertain results, especially for actions with side effects.
Duplicate workflow jobs are processed. How do I fix this?
Duplicate jobs can occur when a producer resends work or a consumer crashes before acknowledging a completed action. Many reliable delivery systems intentionally allow redelivery to avoid losing work. Correct processing therefore identifies the logical operation and makes repeated attempts safe.
A deployment causes intermittent 500s. What do I check?
Intermittent failures after deployment often mean only some instances, requests or data shapes are incompatible with the change. A rolling deployment can briefly run old and new versions together. Grouping errors by instance and version reveals whether the issue is configuration, code, readiness or schema compatibility.
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.
What are Jest, React Testing Library and Supertest?
Jest provides test execution, assertions and tools for replacing dependencies. React Testing Library helps test components through behavior visible to users, while Supertest sends HTTP requests to an application for API assertions. They can be combined, but none automatically chooses meaningful cases or guarantees realism.
Mock vs stub vs spy vs fixture?
Test doubles replace real collaborators so a test can control conditions or observe interactions. A stub supplies a response, a spy records calls, and a mock often combines replacement with expected interactions; terminology varies by library. Fixtures supply stable input data so cases are repeatable.
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.
Merge vs rebase vs cherry-pick?
Merge, rebase and cherry-pick integrate changes through different history operations. Merge combines histories, rebase recreates commits on a new base, and cherry-pick recreates selected changes on the current branch. Recreated commits receive new IDs, which matters when other people already depend on the old history.
Reset vs revert, and when should I use stash?
Reset changes the current branch reference and may also change staged or working files depending on its mode. Revert records a new inverse change while preserving shared history. Stash stores local changes temporarily so another operation can proceed, but it should not replace committing important work.
How do I resolve a merge conflict or find a bad commit?
A merge conflict means Git cannot automatically decide how competing changes should combine. Resolving it requires understanding the intended behavior, not just removing conflict markers. Bisect solves a different problem: it narrows the commit range that introduced a reproducible regression through repeated good/bad checks.
Image vs container vs Dockerfile?
A Docker image packages a filesystem and configuration for starting an application. A container is an isolated process environment created from an image with a writable layer and runtime settings. A Dockerfile describes how the image is built, making the package reproducible rather than depending on manual server setup.
What are layers and multi-stage builds?
Docker layers are reusable filesystem changes produced during image creation. Build caching can reuse unchanged earlier work, while multi-stage builds separate compilation tools from the final runtime package. This improves build speed and can reduce production image size and unnecessary software.
Volumes vs networks vs Compose?
Volumes provide storage independent of a container's disposable writable layer. Container networks define communication paths and service-name resolution, while Compose declares a set of cooperating containers and their configuration. Together they make a local multi-service setup repeatable without placing every service in one container.
How do I make a production container safer and smaller?
A production image should contain the application and required runtime dependencies with no unnecessary development tools or embedded credentials. Runtime restrictions then reduce what a compromised process can access or change. Image size helps distribution, but maintenance and permissions are equally important.
CI vs continuous delivery vs continuous deployment?
Continuous integration checks changes frequently through automated builds and tests. Continuous delivery keeps a verified release ready for deployment, while continuous deployment automatically sends qualifying changes to production. The distinction is the production release decision, not whether any automation exists.
What should a pipeline do?
A delivery pipeline turns source changes into a verified, versioned artifact and releases it through controlled environments. Each step should provide evidence that the next step is safe and reproducible. Promoting the same artifact avoids rebuilding slightly different software for each environment.
What are GitHub Actions concepts?
GitHub Actions defines automated workflows triggered by repository or scheduled events. Workflows contain jobs that run on runners, and jobs contain ordered steps using commands or reusable actions. Artifacts and outputs move results between steps or jobs, while permissions control what the workflow may access.
Which AWS and Azure concepts should I know?
Cloud platforms provide managed building blocks for compute, storage, databases, networking and operations. AWS and Azure use different service names, but the underlying choices—virtual machine versus managed runtime, object storage versus database, public versus private network—are transferable. Understanding responsibilities is more useful than memorizing a long service list.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.