We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy
Software: explore STEM content (page 16 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.
What is the key behavioral difference between a message queue and a pub/sub topic?
AA queue delivers each message to exactly one consumer in a group; a topic delivers a copy to every subscriberBA queue is always slower than a topicCA topic never persists messagesDThere is no functional difference
Software
Software · L3 · Message Queues & Event-Driven Communication
What are the three pillars of observability?1 / 10
Metrics, logs, and traces: metrics are aggregated numeric measurements, logs are discrete timestamped events, and traces follow a request across services.
When does middleware.ts run relative to a matched route?
ABefore the route's page or route handler code executesBAfter the page has already renderedCOnly when the route throws an errorDOnly during the production build, never at request time
Dataflow Analysis as Fixpoint Computation Classical dataflow analysis attaches, to each point in a control-flow graph, an abstract fact drawn from a lattice (L, ⊑, ⊔, ⊓) — a partial order with meet and join. Each statement or CFG edge has a
Software
Software · L5 · Program Analysis & Abstract Interpretation
What does a RepaintBoundary do at the layer level, and when does it actually help?1 / 10
It inserts its own `OffsetLayer` so its subtree is rasterized into a separate retained layer; a repaint inside it does not dirty siblings, and a sibling's repaint does not dirty it. It helps when a small region animates frequently (e.g. a progress spinner) so the static rest of the screen is not re-recorded each frame — but adding boundaries everywhere wastes memory and composite time.
When would you choose a hash map over a balanced BST?1 / 8
Hash map for O(1) average lookups when you only need exact-match and ordering doesn't matter. BST (O(log n)) when you need sorted traversal, range queries, or predecessor/successor lookups.
One Dockerfile, Many Running Containers An image only becomes useful once it moves — from your machine, to a registry, to wherever it needs to run. Each stage has its own command and its own output. The registry is the handoff point: it's t
What is the difference between `==` and `.equals()` in Java?1 / 10
`==` compares references (whether two variables point to the same object) for objects, or values for primitives. `.equals()` compares logical equality and should be overridden for value comparison. Always use `.equals()` for Strings and objects.
Mechanically, how does interactive rebase apply the todo list you edit?1 / 10
Git writes the todo to `.git/rebase-merge/` and processes one line at a time, cherry-picking each `pick`/`edit`/`squash`/`fixup`/`reword`. On `edit` or a conflict it stops with HEAD detached at that point; `--continue` resumes from the saved state. The original branch tip is preserved as `ORIG_HEAD` and in the reflog.
Which of these disqualifies a function from being pure?
ATaking more than one argumentBReturning a new object instead of a primitiveCReading the current system time inside the function bodyDBeing called more than once in a program
What does the `synchronized` keyword guarantee?1 / 10
It provides mutual exclusion on a monitor lock so only one thread executes the guarded block per object, and establishes happens-before visibility for changes made inside it.
What makes Dart's null safety *sound*, and what runtime cost does that soundness avoid?1 / 10
Soundness means a non-nullable static type provably never holds null at runtime, so the compiler can omit null checks the type guarantees away — enabling smaller, faster code and unboxed representations. It is enforced end-to-end: there is no `dynamic`-style escape hatch that silently introduces null into a non-nullable type without a checked cast or `!`.
Queues vs Pub/Sub A message queue distributes work: each message is delivered to exactly one consumer from a competing pool, so adding consumers increases throughput. A pub/sub topic broadcasts: every subscriber gets its own copy of each me
Software
Software · L3 · Message Queues & Event-Driven Communication
What problem does state locking specifically prevent?
ASlow terraform plan performanceBTwo concurrent applies corrupting or conflicting on the same stateCProvider version mismatchesDForgetting to run terraform init
Software
Software · L2 · Terraform: Safe Applies with Remote State & Locking