We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy
Software: explore STEM content (page 9 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.
Designing a REST API REST (Representational State Transfer) models server-side resources as URLs and uses HTTP verbs to express actions on those resources. HTTP verbs and their semantics Idempotency An operation is idempotent if calling it
Elements like <header>, <nav>, <main>, <article>, <footer> convey meaning to browsers, screen readers, and search engines — improving accessibility and SEO over generic <div> soup. Assistive tech uses them for navigation landmarks.
Three Kinds of Method Every method in a Python class body is one of three flavors, distinguished by what it's implicitly handed as its first argument — and that first argument tells you exactly what the method is allowed to touch. Deciding
Software
Software · L2 · Python: classmethod, staticmethod, or Instance Method?
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.
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.
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.
They process data in chunks as it arrives instead of buffering the whole payload in memory, enabling constant-memory handling of large or unbounded data.
Its output depends only on its inputs (no reliance on external mutable state), and calling it causes no observable side effects (no I/O, no mutation of arguments or globals).
What Happens Before Your Handler Runs Every incoming request passes through several distinct layers, each with a specific job, before reaching the controller method you wrote. An exception filter sits outside this whole flow — it catches an
One Branch per Change Instead of committing directly to main, most teams isolate each change on its own short-lived branch. That keeps main always deployable and gives reviewers a clean diff to look at. If review comes back with requested c
Software
Software · L1 · Git & Dev Workflow: The Feature Branch Workflow
What are the three rules of ownership in Rust?1 / 10
1) Each value has a single owner. 2) There can be only one owner at a time. 3) When the owner goes out of scope, the value is dropped (freed). This is how Rust guarantees memory safety without a garbage collector.
A document database: data is stored as flexible, JSON-like documents (BSON) grouped into collections. Documents in a collection need not share the same schema. Maps naturally to objects in code — no joins/normalization required for nested data.
What does a `useFactory` provider let you do that `useClass` doesn't?
ACompute the provided value at runtime, optionally injecting other providersBSkip dependency injection entirelyCRegister the provider globally by defaultDAvoid needing an injection token