OS

OpenStem

@openstem · Joined Jul 2026
7420 public items8 groups
Content7420Groups8
Flashcards10 cards
What does calling `setState` do in a StatefulWidget?1 / 10
It notifies the framework that internal state has changed, scheduling a rebuild of the widget's `build` method. Mutations should happen inside the setState callback.
Software

State Management

@openstem
State Management
Flashcards10 cards
What is a Server Action in Next.js?1 / 10
An async function marked with 'use server' that runs on the server but can be invoked directly from client components (e.g. in a form action or event handler). It eliminates manually writing API routes for mutations — Next handles the RPC.
Software

Data & Optimization

@openstem
Data & Optimization
Flashcards10 cards
Are components in the Next.js App Router server or client by default?1 / 10
They are Server Components by default; you opt into client behavior by adding the "use client" directive at the top of the file.
Software

App Router & Server Components

@openstem
App Router & Server Components
Flashcards10 cards
What is the role of a Nest module?1 / 10
A class annotated with `@Module` that groups related providers, controllers, imports, and exports into a cohesive feature boundary.
Software

Modules & Providers

@openstem
Modules & Providers
Flashcards10 cards
What does a @Controller decorator define?1 / 10
A class whose methods handle incoming requests for a route prefix, mapping HTTP verbs to handler methods via decorators like `@Get` and `@Post`.
Software

Controllers, Pipes & Guards

@openstem
Controllers, Pipes & Guards
Flashcards10 cards
What is the MongoDB aggregation pipeline?1 / 10
A sequence of stages that transform documents, where each stage's output feeds the next. Common stages include `$match`, `$group`, `$project`, and `$sort`.
Software

Aggregation Framework

@openstem
Aggregation Framework
Flashcards10 cards
What is the default index type in PostgreSQL?1 / 10
A B-tree index, which supports equality and range queries on ordered data and is the default for `CREATE INDEX`.
Software

Indexes & Query Planning

@openstem
Indexes & Query Planning
Flashcards10 cards
What does a LEFT JOIN return for unmatched right-side rows?1 / 10
All rows from the left table, with NULLs in the right-table columns where no match exists.
Software

Joins & Subqueries

@openstem
Joins & Subqueries
Flashcards10 cards
What is the difference between `json` and `jsonb` in PostgreSQL?1 / 10
`json` stores the exact text and reparses on access; `jsonb` stores a decomposed binary form that is faster to query and indexable.
Software

Data Types & JSONB

@openstem
Data Types & JSONB
Flashcards10 cards
What is the primary purpose of a VPC?1 / 10
A VPC is a logically isolated virtual network within an AWS region where you launch resources, controlling IP addressing, subnets, routing, and gateways.
Software

Networking & VPC

@openstem
Networking & VPC
Flashcards10 cards
What kind of database is Amazon RDS?1 / 10
RDS is a managed relational database service supporting engines like PostgreSQL, MySQL, MariaDB, Oracle, and SQL Server, handling patching, backups, and failover.
Software

Databases (RDS & DynamoDB)

@openstem
Databases (RDS & DynamoDB)
Flashcards10 cards
What is an IAM policy?1 / 10
An IAM policy is a JSON document that defines permissions by allowing or denying actions on specified resources under given conditions.
Software

Security & IAM

@openstem
Security & IAM
Flashcards10 cards
What is the difference between Compute Engine and Cloud Run?1 / 10
Compute Engine provides managed VMs (IaaS) that you size and patch. Cloud Run runs stateless containers serverlessly, scaling to zero and billing per request.
Software

Compute & Networking

@openstem
Compute & Networking
Flashcards10 cards
Which Cloud Storage class is cheapest for rarely accessed, long-term backups?1 / 10
Archive storage has the lowest storage price but the highest retrieval cost and a 365-day minimum storage duration, ideal for cold, long-term data.
Software

Storage & Databases

@openstem
Storage & Databases
Flashcards10 cards
What three parts make up an IAM policy binding in GCP?1 / 10
A binding ties a role (a set of permissions) to one or more members (principals) on a resource; the policy is the collection of bindings.
Software

IAM & Security

@openstem
IAM & Security
Flashcards10 cards
What is a Terraform module?1 / 10
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.
Software

Modules & Variables

@openstem
Modules & Variables
Flashcards10 cards
Why does Terraform need a state file?1 / 10
State maps configuration resources to real-world infrastructure IDs, tracks metadata and dependencies, and lets Terraform compute diffs for plans.
Software

State Management

@openstem
State Management
Flashcards10 cards
What is a Terraform provider?1 / 10
A provider is a plugin that implements resource and data source types for a platform (AWS, GCP, Kubernetes), translating Terraform config into API calls.
Software

Providers & Resources

@openstem
Providers & Resources
Flashcards10 cards
What is the event loop?1 / 10
The event loop runs the call stack until empty, then drains ALL microtasks (Promises, queueMicrotask), then picks ONE macrotask (setTimeout, setInterval, I/O), then repeats. Microtasks always run before the next macrotask.
Software

Async & Promises

@openstem
Async & Promises
Flashcards10 cards
How does JavaScript's garbage collector know when to free memory?1 / 10
Modern engines use mark-and-sweep: the GC marks all objects reachable from GC roots (globals, call stack), then sweeps (frees) everything unreachable. Objects not reachable from any live reference are eligible for collection.
Software

Performance & Memory

@openstem
Performance & Memory
Flashcards10 cards
What does a conditional type `T extends U ? X : Y` evaluate to?1 / 10
It picks X when T is assignable to U and Y otherwise; it becomes a powerful tool when combined with generics and inference.
Software

Advanced Types (Conditional & Template Literal)

@openstem
Advanced Types (Conditional & Template Literal)
Flashcards10 cards
What is a recursive type and when is it needed?1 / 10
A type that references itself in its definition, used to model recursive data structures like JSON, trees, or linked lists. e.g. `type JSONValue = string | number | boolean | null | JSONValue[] | { [k: string]: JSONValue }`
Software

Type-Level Programming

@openstem
Type-Level Programming
Flashcards9 cards
What does this print and why is it surprising?1 / 9
Prints `[1]` then `[1, 2]`. Default mutable arguments are evaluated ONCE at function definition, not per call — the same list persists across calls. Fix: use `def add(x, lst=None): if lst is None: lst = []`.
Software

Gotchas & Edge Cases

@openstem
Gotchas & Edge Cases
Flashcards9 cards
What is the GIL and what does it mean for CPU-bound vs I/O-bound Python code?1 / 9
The Global Interpreter Lock (GIL) in CPython allows only one thread to execute Python bytecode at a time. CPU-bound threads do NOT run in parallel — use multiprocessing or C extensions. I/O-bound threads DO get effective concurrency because the GIL is released during I/O waits.
Software

Performance & Internals

@openstem
Performance & Internals
Flashcards10 cards
What does React.memo do?1 / 10
Wraps a component to skip re-renders when props haven't changed (shallow equality). Useful for expensive components receiving stable props. Avoid over-using it — the memoization overhead can cost more than the re-render.
Software

Performance

@openstem
Performance
Flashcards9 cards
What is the key constraint of a React Server Component?1 / 9
It runs only on the server, never ships its code to the client, and cannot use state or effects like useState/useEffect or browser-only APIs. Server Components were stabilized in React 19.
Software

Server Components & Suspense

@openstem
Server Components & Suspense
Flashcards8 cards
What is dynamic programming?1 / 8
An optimization technique that solves problems by breaking them into overlapping subproblems and storing results to avoid redundant computation. Requires optimal substructure (optimal solution contains optimal subproblem solutions) and overlapping subproblems.
Software

Dynamic Programming

@openstem
Dynamic Programming
Flashcards8 cards
What is the difference between BFS and DFS?1 / 8
BFS explores level by level (queue) — optimal for shortest paths in unweighted graphs. DFS goes deep first (stack/recursion) — useful for topological sort, cycle detection, and connected components.
Software

Graphs & Traversals

@openstem
Graphs & Traversals
Flashcards10 cards
What core benefit does a message queue provide between services?1 / 10
Asynchronous decoupling: producers and consumers operate independently, buffering load spikes and improving resilience.
Software

Message Queues & Streaming

@openstem
Message Queues & Streaming
Flashcards10 cards
What is the difference between L4 and L7 load balancing?1 / 10
L4 (transport layer) load balancing routes based on IP and TCP/UDP port — fast, simple, no protocol awareness. L7 (application layer) routes based on HTTP headers, URLs, cookies, or content — enables sticky sessions, path-based routing, and more sophisticated traffic management.
Software

Scalability & Reliability

@openstem
Scalability & Reliability

We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy