We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy
Software: explore STEM content (page 17 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.
Big-O complexity cheat sheet Big-O notation describes how an algorithm's running time or space grows with input size n, ignoring constant factors and lower-order terms. Common complexity classes (fastest → slowest) Binary search example Bin
Compromising software via its dependencies, build pipeline, or distribution rather than the target's own code — e.g. a poisoned npm package or a tampered build server — so the malicious code reaches users through trusted channels.
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.
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.
From URL to Rendered Page A single 'visit this page' action hides several layered protocol steps, each building on the one before it, before a single byte of HTML is exchanged. With `Connection: keep-alive`, later requests to the same host
Software
Software · L1 · Networking & HTTP: Anatomy of a Web Request
SQL essentials SQL (Structured Query Language) is the standard language for relational databases. Understanding its core clauses and their execution order prevents common mistakes. Logical execution order JOIN types Indexes A B-tree index t
What is the core difference between a REST endpoint and a GraphQL endpoint?1 / 8
REST exposes many URLs, each returning a fixed shape of data for one resource. GraphQL exposes a single endpoint backed by a typed schema, and the client's query specifies exactly which fields it wants across related types in one request — fixing both over-fetching (unused fields) and under-fetching (needing several round trips to assemble a view).
What is the modern way to configure HTTP security in Spring Security 6?1 / 10
Define a `SecurityFilterChain` bean using the lambda DSL on `HttpSecurity`. As of Spring Security 6 (Spring Boot 3) the component-based `WebSecurityConfigurerAdapter` was removed, so this bean-based approach is the only option.
Why does the 'testing trophy' reweight the pyramid toward integration tests, and what assumption changes?1 / 10
The pyramid assumes unit tests are the cheapest path to confidence; the trophy assumes wiring and boundary bugs dominate, so integration tests (real collaborators, mocked edges) buy the most confidence-per-cost. It widens the middle layer and adds static analysis/types as the base, treating heavily-mocked unit tests as low-value.
What is Flutter's core layout rule in one sentence?1 / 10
Constraints go down, sizes go up, and the parent sets the position. A widget receives constraints from its parent, chooses its own size within them, and the parent then positions it.
A single class that knows or does too much, centralizing responsibilities and violating the Single Responsibility Principle, making it hard to maintain.
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.
Narrowing Before You Use a Value Once a value's type includes `null` or `undefined`, TypeScript won't let you use it until you've ruled those out. The two most common tools for that are the nullish coalescing operator `??` (supply a default
Software
Software · L1 · TypeScript: Handling Optional and Nullish Values
A Class Is a Blueprint A class defines the shape of an object: its fields (state) and methods (behavior). No memory is allocated just by writing a class — an object only exists once you construct one with `new`. Many objects can be built fr
Multi-Version Concurrency Control: readers never block writers and writers never block readers, because each transaction sees a consistent snapshot. Updates create new row versions rather than locking; old versions are cleaned up by VACUUM.