OS

OpenStem

@openstem · Joined Jul 2026
7420 public items8 groups
Content7420Groups8
Flashcards10 cards
What is the GCP equivalent of AWS EC2 and S3?1 / 10
Compute Engine = virtual machines (≈ EC2). Cloud Storage = object storage in buckets (≈ S3). Cloud Functions = serverless functions (≈ Lambda). GKE = managed Kubernetes (≈ EKS). The cloud primitives map closely across providers.
Software

Core Services

@openstem
Core Services
Flashcards10 cards
What sits at the top of the GCP resource hierarchy?1 / 10
The Organization node is the root of the hierarchy, representing a company. Below it are Folders, then Projects, then resources. Policies set higher up are inherited downward.
Software

Cloud Fundamentals

@openstem
Cloud Fundamentals
Flashcards10 cards
What language do you write Terraform configuration in?1 / 10
HCL (HashiCorp Configuration Language), a declarative language for describing infrastructure in .tf files. Terraform can also accept equivalent JSON.
Software

Terraform Fundamentals

@openstem
Terraform Fundamentals
Flashcards10 cards
What is Infrastructure as Code (IaC)?1 / 10
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.
Software

IaC Fundamentals

@openstem
IaC Fundamentals
Flashcards5 cards
What is a loop in programming?1 / 5
A loop is an instruction that repeats a block of steps more than once. Instead of writing the same line ten times, you write it once inside a loop.
Software

Software · L2 · Loops: Doing Things Again and Again

@openstem
Software · L2 · Loops: Doing Things Again and Again
Flashcards5 cards
What is a variable?1 / 5
A variable is like a labelled box. You give it a name and put a value inside. The program can look at or change that value whenever it needs to.
Software

Software · L2 · Variables: Labelled Boxes for Values

@openstem
Software · L2 · Variables: Labelled Boxes for Values
Flashcards10 cards
What is a closure in JavaScript?1 / 10
A closure is a function that remembers the variables from its enclosing lexical scope, even after that scope has finished executing. Every function in JS is a closure.
Software

Closures & Scope

@openstem
Closures & Scope
Flashcards9 cards
What is the prototype chain?1 / 9
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`.
Software

Prototypes & Classes

@openstem
Prototypes & Classes
Flashcards10 cards
What are generics in TypeScript?1 / 10
Generics let you write reusable code that works with multiple types while preserving type safety. `function identity<T>(x: T): T` returns the same type it receives — T is inferred at the call site.
Software

Generics & Utility Types

@openstem
Generics & Utility Types
Flashcards10 cards
What is a discriminated union and why is it useful?1 / 10
A union of object types each with a shared literal property that TypeScript uses to narrow: `type Shape = { kind: 'circle'; r: number } | { kind: 'rect'; w: number; h: number }`. The `kind` discriminant lets TypeScript know which branch you're in.
Software

Patterns & Best Practices

@openstem
Patterns & Best Practices
Flashcards10 cards
What is a .d.ts declaration file?1 / 10
A file containing only type declarations and no runtime code; it describes the shape of existing JavaScript so TypeScript can type-check against it.
Software

Modules & Declaration Files

@openstem
Modules & Declaration Files
Flashcards8 cards
Explain list comprehension vs a generator expression.1 / 8
A list comprehension `[x for x in it]` eagerly builds the whole list in memory. A generator `(x for x in it)` yields lazily — far more memory-efficient for large or infinite sequences.
Software

Comprehensions & Iteration

@openstem
Comprehensions & Iteration
Flashcards8 cards
What is the difference between `__str__` and `__repr__`?1 / 8
`__repr__` should return an unambiguous technical string for developers (ideally eval-able). `__str__` returns a human-readable string for end users. `str()` calls `__str__`; if missing, falls back to `__repr__`. Always implement `__repr__` at minimum.
Software

OOP & Classes

@openstem
OOP & Classes
Flashcards10 cards
What problem does useCallback solve, and when is it pointless?1 / 10
It memoizes a function identity across renders so memo-wrapped children or effect dependencies don't trigger unnecessarily. Pointless if the consumer isn't memoized — you pay the memoization cost for no benefit.
Software

Hooks

@openstem
Hooks
Flashcards10 cards
What is prop drilling and how do you solve it?1 / 10
Passing props through many intermediate components that don't use them — just to reach a deeply nested child. Solve with React Context, a state management library (Zustand, Redux), or component composition.
Software

State & Context

@openstem
State & Context
Flashcards8 cards
What are the three DFS traversal orders for a binary tree?1 / 8
In-order (Left → Root → Right) — visits BST nodes in sorted order. Pre-order (Root → Left → Right) — useful for serialization/copy. Post-order (Left → Right → Root) — useful for deletion and evaluating expression trees.
Software

Trees & BST

@openstem
Trees & BST
Flashcards8 cards
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.
Software

Structures & Trade-offs

@openstem
Structures & Trade-offs
Flashcards8 cards
What is the recurrence relation for merge sort?1 / 8
T(n) = 2T(n/2) + O(n). By the Master Theorem: O(n log n) time. It requires O(n) auxiliary space and is stable (preserves relative order of equal elements).
Software

Sorting Algorithms

@openstem
Sorting Algorithms
Flashcards10 cards
What is the CAP theorem?1 / 10
A distributed system can guarantee at most two of: Consistency (all nodes see the same data), Availability (every request gets a response), Partition tolerance (works despite network splits). Since partitions are unavoidable, the real trade-off is CP vs AP.
Software

CAP & Consistency

@openstem
CAP & Consistency
Flashcards9 cards
When would you add a cache and what are the main invalidation strategies?1 / 9
Add a cache when reads vastly outnumber writes and slight staleness is acceptable. Strategies: write-through (cache + DB together), write-back (write cache, flush later), TTL expiry, and cache-aside (app manages cache). Invalidation is the hard part.
Software

Caching

@openstem
Caching
Flashcards9 cards
What is a database index and how does it work?1 / 9
An index is typically a B-tree data structure that maps column values to row locations, enabling fast lookups without a full table scan. Read speed improves from O(n) to O(log n). Each write must update all relevant indexes — there's a write overhead.
Software

Indexes & Performance

@openstem
Indexes & Performance
Flashcards9 cards
What is a window function and how does it differ from GROUP BY?1 / 9
A window function computes a value across a set of rows (the 'window') without collapsing them into one row like GROUP BY does. Each input row gets an output row. `OVER (PARTITION BY ... ORDER BY ...)` defines the window.
Software

Window Functions

@openstem
Window Functions
Flashcards10 cards
What is the difference between `git fetch` and `git pull`?1 / 10
`git fetch` downloads remote changes into the remote-tracking branch but does NOT change your working directory. `git pull` = `git fetch` + `git merge` (or rebase with `--rebase`). Fetching first lets you review changes before integrating.
Software

Collaboration & PR Workflow

@openstem
Collaboration & PR Workflow
Flashcards10 cards
What is a fast-forward merge?1 / 10
When the target branch has no new commits, Git simply moves its pointer forward to the source branch's tip, creating no merge commit.
Software

Branching & Merging

@openstem
Branching & Merging
Flashcards10 cards
What is a goroutine?1 / 10
A lightweight thread managed by the Go runtime, started with the `go` keyword. Goroutines are multiplexed onto OS threads by the scheduler, are very cheap (~2KB initial stack), so you can run hundreds of thousands concurrently.
Software

Goroutines & Channels

@openstem
Goroutines & Channels
Flashcards10 cards
How do interfaces work in Go?1 / 10
Go interfaces are satisfied implicitly — a type implements an interface simply by having the required methods, with no `implements` keyword. This enables structural typing and decoupling. The empty interface `interface{}` (or `any`) matches every type.
Software

Types & Interfaces

@openstem
Types & Interfaces
Flashcards9 cards
How does Go conventionally handle errors?1 / 9
Functions return an `error` as the last return value, and callers check `if err != nil`. Errors are ordinary values, not exceptions, making control flow explicit.
Software

Errors & Idioms

@openstem
Errors & Idioms
Flashcards10 cards
What is `Option<T>` and why does Rust have no null?1 / 10
`Option<T>` is an enum with variants `Some(T)` and `None`. Rust has no null pointer — absence of a value is encoded in the type system, forcing you to handle the None case explicitly. This eliminates null-pointer dereferences.
Software

Enums & Error Handling

@openstem
Enums & Error Handling
Flashcards10 cards
What is a trait in Rust?1 / 10
A trait defines shared behavior as a set of method signatures that types can implement. It is Rust's mechanism for interface-like polymorphism and abstraction over types.
Software

Traits & Generics

@openstem
Traits & Generics
Flashcards10 cards
What is the difference between an interface and an abstract class?1 / 10
An interface declares method signatures (and default methods since Java 8) with no state; a class can implement many. An abstract class can have state, constructors, and concrete methods, but a class extends only one. Use interfaces for capability, abstract classes for shared base implementation.
Software

OOP & Collections

@openstem
OOP & Collections

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