We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy
Software: explore STEM content (page 13 of 25) · openstem
Explore STEM Content
Search the community's STEM library — free to study, yours to make your own.
Software
Programming, algorithms and systems on openstem — flashcards, notes, quizzes, sketches and flowcharts shared by the community. Study free, or clone anything into your library.
Why does containment happen before eradication in incident response?
AEradication is always faster, so it should come lastBIsolating the affected system stops ongoing damage while investigation continuesCContainment and eradication are the same stepDBecause backups must be restored first
Why does range-based sharding on a monotonically increasing key cause a hotspot?
ABecause range sharding requires more storage per shardBBecause all new writes land on whichever shard currently owns the highest rangeCBecause range sharding disables replicationDBecause it forces every read to scan all shards
Resources, Not Actions A REST API is organized around resources — nouns like orders, users, or invoices — addressed by URLs, with the HTTP method supplying the verb. A well-modeled API reads as a set of collections and items: /orders is a c
Concurrency patterns and pitfalls Concurrent programming allows multiple tasks to make progress simultaneously, but introduces hazards that single-threaded code never encounters. Core hazards Mutex (mutual exclusion lock) A mutex allows onl
A concurrent, tri-color mark-and-sweep collector with a write barrier. It runs mostly concurrently with the program to keep stop-the-world pauses very short (sub-millisecond), trading some throughput for low latency.
Within what scope does Kafka guarantee message ordering?
AAcross the entire topic, regardless of partitionBOnly within a single partitionCOnly across the entire clusterDKafka provides no ordering guarantees at all
The smallest deployable unit — one or more tightly-coupled containers sharing a network namespace (same IP) and storage. Usually one container per Pod; sidecars are the exception. Pods are ephemeral and replaced, not repaired.
What is Amazon S3 and what is its core abstraction?1 / 10
S3 (Simple Storage Service) is object storage — you store files ('objects') in 'buckets', accessed by key over HTTP. It's highly durable (11 nines), scalable, and used for static assets, backups, data lakes, and static website hosting. Not a filesystem — there are no real folders.
Why must you see the test fail (Red) before writing the implementation?
AIt's a formality with no practical benefitBIt proves the test actually exercises the intended behavior and would catch a regressionCFailing tests run fasterDGreen-phase code doesn't compile without it
Software
Software · L1 · Testing: The Red-Green-Refactor Cycle
It runs before a request is completed — ahead of the matched route — letting you rewrite, redirect, or set headers/cookies before the route handles the request. In Next.js 16 the file/function is renamed from middleware to proxy (proxy.ts / export function proxy()), running on the Node.js runtime; the legacy edge `middleware` name is deprecated.
In the cache-aside pattern, what happens on a cache miss?
AThe request fails immediatelyBThe application reads from the database and populates the cache for next timeCThe cache automatically fetches from the database without application involvementDThe stale cached value is returned anyway
Red, Green, Refactor Test-Driven Development isn't just 'write tests' — it's a specific loop, repeated for every small piece of behavior you add. Skipping the Red phase — writing the implementation before the test ever fails — means you nev
Software
Software · L1 · Testing: The Red-Green-Refactor Cycle
Match the Tool to the Coordination Problem Go's concurrency toolbox isn't one-size-fits-all. Mutexes, channels, and wait groups solve three different problems, and reaching for the wrong one usually means fighting the language instead of wr
Software
Software · L2 · Go: Choosing a Concurrency Primitive
What is the difference between a mutex and a semaphore?1 / 9
A mutex allows exactly one thread into a critical section (binary, with ownership — only the locker can unlock). A semaphore is a counter permitting up to N concurrent accesses and has no ownership. A mutex is a specialized binary semaphore with ownership semantics.
The Three Pillars Observability tooling is usually organized around three complementary data types, each suited to a different question. Metrics are cheap, aggregatable numeric time series (counters, gauges, histograms) — great for dashboar
Software
Software · L4 · Observability: Metrics, Logs, and Traces