We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy
Software: explore STEM content (page 20 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.
Every JS object has an internal `[[Prototype]]` link. When you access a property, JS looks on the object, then up the chain until it reaches `null`. This is how inheritance works — all arrays inherit from `Array.prototype`, which inherits from `Object.prototype`.
What Matters Most? No scheduling algorithm is best on every axis — each one optimizes for a particular goal at the expense of another. Picking one starts with naming what the workload actually needs. A Decision Path In practice, most genera
Software
Software · L2 · Operating Systems: Choosing a CPU Scheduling Algorithm
What is the main risk of a single monolithic Terraform state for a large org?1 / 10
Everything shares one lock and blast radius: plans get slow, a single apply can touch unrelated systems, and concurrent work is serialized. Split state by service/layer instead.
What are the three conditions under which the FLP impossibility result applies?
ASynchrony, randomisation, and majority fault toleranceBAsynchrony, determinism, and tolerance of at least one crash faultCPartial synchrony, Byzantine faults, and n > 3f processesDAsynchrony, probabilistic algorithms, and message loss
How do V8 and libuv divide responsibilities in Node.js?1 / 10
V8 compiles and executes JavaScript (heap, GC, JIT). libuv provides the event loop, async I/O, the thread pool, timers, and OS abstraction for network/file ops. Node's bindings glue the two together.
What is the difference between authentication and authorization?1 / 10
Authentication (authn) verifies WHO you are (login, credentials). Authorization (authz) determines WHAT you are allowed to do (permissions, roles). Authentication always comes first.
Which decorator maps a GET request to a controller method?1 / 8
`@Get()` — placed on a controller method, optionally with a path segment like `@Get(':id')`. Sibling decorators include @Post, @Put, @Patch, and @Delete.
Request In, Response Streamed Out A raw Node HTTP server has no built-in middleware concept, but the pattern is simple: an ordered list of functions, each given the chance to act or hand off control to the next one via `next()`. Because Inc
How is an object's SHA computed, and what is the loose-object on-disk format?1 / 10
The hash is taken over the header `<type> <size>\0` concatenated with the raw content — not over the compressed bytes. On disk a loose object is that same header+content zlib-deflated, stored at `.git/objects/ab/cdef…` (first two hex chars name the directory).
How do IAM allow policies combine down the organization → folder → project → resource hierarchy?1 / 10
Each node has its own allow policy, and a principal's effective access is the union of all bindings inherited from every ancestor plus the resource itself. Allow policies are purely additive — a child cannot revoke a role granted higher up; that requires an IAM deny policy or removing the binding at its source.
What is the key difference between a message queue and a pub/sub topic?1 / 8
A queue delivers each message to exactly one consumer among a competing group (work distribution). A pub/sub topic delivers a copy of each message to every subscriber (fan-out/broadcast). Many real systems (Kafka, SNS+SQS) combine both: a topic fans out to several queues, each queue load-balanced across its own consumer group.
Replication Topologies Replication exists to survive node failure and to spread read load, but the topology chosen shapes the whole system's failure behavior. Leader-based (single-master) replication funnels writes through one node and stre
Representing a Graph A graph is a set of vertices connected by edges. The two common representations trade memory for lookup speed differently, and the right choice depends on how dense the graph is and what operations dominate. BFS vs DFS
Software
Software · L2 · Data Structures & Algos: Graph Traversal