We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy
Software: explore STEM content (page 18 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 each of the three trees responsible for, and how do they relate?1 / 10
The Widget tree is an immutable, cheap-to-rebuild configuration. The Element tree is the long-lived, mutable instantiation that holds state, BuildContext, and parent/child links. The RenderObject tree does layout, painting, and hit testing. Each Element points to one widget (its current config) and, for RenderObjectElements, to one RenderObject.
Software
Rendering Pipeline: Widget / Element / RenderObject
Fischer, Lynch, and Paterson (1985): in a fully asynchronous message-passing system, there is no deterministic protocol that solves consensus even if at most one process may crash-fail. The key conditions: asynchrony (no bound on message delay or computation speed), determinism, and tolerance of just one crash. This rules out wait-free consensus in the pure async model.
Cross-Origin Resource Sharing controls which origins (scheme+host+port) may access a resource via browser fetch/XHR. It exists to relax the Same-Origin Policy safely — the server sends Access-Control-Allow-Origin headers to opt-in specific origins.
A module is a reusable container of .tf files in a directory. The root module calls child modules via a module block, passing inputs and reading outputs.
Managing and provisioning infrastructure through declarative configuration files instead of manual console clicks. Benefits: version control, repeatability, code review, and automated provisioning. Terraform is a leading provider-agnostic IaC tool.
AOnly when the component unmountsBBefore the effect re-runs (deps changed) and on unmountCImmediately before the render phase startsDIt never runs automatically
Data Partitioning & Replication at Scale A single machine eventually runs out of disk, memory, or write throughput. Partitioning (sharding) splits data across many machines so the system scales horizontally; replication copies data across m
Software
Software · L4 · Data Partitioning & Replication at Scale
What is Inversion of Control (IoC) in Spring?1 / 10
Instead of objects creating their own dependencies, the Spring IoC container creates and injects them. This decouples components, centralizes wiring, and makes testing easy (inject mocks). Dependency Injection is the mechanism that implements IoC.
What is the difference between select/poll and epoll, and why does it matter at scale?1 / 8
select() and poll() require the kernel to scan the entire set of file descriptors on each call — O(n) per wakeup. epoll uses an event-driven model: the kernel only delivers events for ready FDs, so the application scales to hundreds of thousands of connections with O(1) per event.
What distinguishes the π-calculus from CSP in terms of expressive power?
AThe π-calculus supports asynchronous shared-memory communication; CSP does notBThe π-calculus allows channel names to be communicated as data, enabling dynamic reconfiguration of communication topologyCCSP supports recursion while the π-calculus does notDThe π-calculus has no notion of internal choice
Software
Software · L5 · Process Calculi & Concurrency Theory
What is the RSC payload, and how does it differ from the HTML a route produces?1 / 10
The RSC payload is a compact serialized description of the Server Component tree — rendered element output plus placeholders for Client Components and their props. The server uses it to produce the initial HTML, then streams the same payload to the client so React can reconcile and hydrate the Client Component holes without re-running server logic.
Why work on a separate feature branch instead of committing directly to main?
AFeature branches are required by Git itselfBIt keeps main always deployable and gives reviewers a clean diffCIt makes commits smaller automaticallyDIt disables CI on the branch
Software
Software · L1 · Git & Dev Workflow: The Feature Branch Workflow
Schema-First Thinking A GraphQL API is defined by a strongly typed schema written in the Schema Definition Language (SDL): object types, scalars, enums, interfaces, and the three root operation types. The schema is a contract — clients can
What is the difference between SSR, SSG, and ISR in Next.js?1 / 10
SSR (Server-Side Rendering) renders HTML per request. SSG (Static Site Generation) renders at build time, serving static HTML. ISR (Incremental Static Regeneration) serves static pages but regenerates them in the background after a revalidation interval — combining SSG speed with fresh data.