OS
OpenStem
@openstem · Joined Jul 2026
7420 public items8 groups
Flashcards10 cards
What problem do generics solve?1 / 10
Generics add compile-time type safety to collections and APIs, eliminating most casts and catching type errors at compile time instead of as runtime ClassCastExceptions. `List<String>` guarantees only Strings go in and come out.
Generics & Exceptions
@openstem
Generics & ExceptionsFlashcards10 cards
Are Java Stream operations eager or lazy?1 / 10
Intermediate operations like `map` and `filter` are lazy and only build a pipeline; processing happens when a terminal operation (e.g. `collect`, `forEach`) is invoked.
Streams & Functional
@openstem
Streams & FunctionalFlashcards10 cards
What is the difference between `rem` and `em` units?1 / 10
`em` is relative to the font-size of the current element (compounds with nesting). `rem` is relative to the root (<html>) font-size — predictable and not affected by parent sizes. Prefer `rem` for consistent, scalable typography and spacing.
Responsive & Modern CSS
@openstem
Responsive & Modern CSSFlashcards10 cards
What is the first rule of ARIA?1 / 10
Do not use ARIA if a native HTML element with the needed semantics and behavior already exists; prefer a real <button> over a <div role="button">.
Accessibility & ARIA
@openstem
Accessibility & ARIAFlashcards10 cards
What problem do Node streams solve?1 / 10
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.
Streams & Buffers
@openstem
Streams & BuffersFlashcards10 cards
What does `http.createServer(cb)` give you on each request?1 / 10
The callback receives an IncomingMessage (the readable request) and a ServerResponse (the writable response) for that connection.
HTTP & Servers
@openstem
HTTP & ServersFlashcards10 cards
What is CORS and why does it exist?1 / 10
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.
Web Protocols
@openstem
Web ProtocolsFlashcards10 cards
How does the browser send cookies back to a server?1 / 10
After a server sets a cookie via Set-Cookie, the browser automatically attaches matching cookies in the Cookie header on subsequent requests to that domain/path, subject to Secure, SameSite, and expiry rules.
Cookies, Sessions & Auth
@openstem
Cookies, Sessions & AuthFlashcards8 cards
What is virtual memory?1 / 8
An abstraction giving each process its own large, contiguous address space, mapped to physical RAM (and disk) by the MMU via page tables. It enables isolation, allows programs larger than RAM (via swapping), and simplifies memory allocation.
Memory Management
@openstem
Memory ManagementFlashcards8 cards
What is the goal of a CPU scheduler?1 / 8
To decide which ready process runs next on the CPU, balancing goals like throughput, low latency, fairness, and good CPU utilization.
CPU Scheduling
@openstem
CPU SchedulingFlashcards9 cards
What is the difference between a mutex and a semaphore?1 / 9
A mutex allows exactly one thread into a critical section (binary, with ownership — only the locker can unlock). A semaphore is a counter permitting up to N concurrent accesses and has no ownership. A mutex is a specialized binary semaphore with ownership semantics.
Synchronization Primitives
@openstem
Synchronization PrimitivesFlashcards10 cards
What is a race condition?1 / 10
A bug where the program's correctness depends on the nondeterministic timing or interleaving of concurrent operations on shared state.
Deadlocks & Race Conditions
@openstem
Deadlocks & Race ConditionsFlashcards10 cards
What is XSS (Cross-Site Scripting) and how do you prevent it?1 / 10
XSS injects malicious scripts into pages viewed by others, running in their browser to steal cookies/tokens or perform actions. Prevent by escaping/encoding output, using a Content-Security-Policy, and never inserting untrusted data into the DOM as HTML (use textContent, not innerHTML).
Web Security
@openstem
Web SecurityFlashcards10 cards
What is the difference between hashing and encryption?1 / 10
Hashing is one-way — you cannot reverse a hash to the original (used for passwords, integrity). Encryption is two-way — ciphertext can be decrypted with a key (used for confidentiality). Never 'encrypt' passwords; hash them with a slow algorithm like bcrypt/Argon2.
Cryptography Basics
@openstem
Cryptography BasicsFlashcards10 cards
What is the primary defense against SQL injection?1 / 10
Parameterized queries (prepared statements) keep user input as data, never as executable SQL, so the input cannot alter query structure.
OWASP & Injection Attacks
@openstem
OWASP & Injection AttacksFlashcards10 cards
What is a Pod in Kubernetes?1 / 10
The smallest deployable unit — one or more tightly-coupled containers sharing a network namespace (same IP) and storage. Usually one container per Pod; sidecars are the exception. Pods are ephemeral and replaced, not repaired.
Kubernetes
@openstem
KubernetesFlashcards10 cards
What is the difference between continuous delivery and continuous deployment?1 / 10
Continuous delivery keeps every change deployable and releases on a manual approval, while continuous deployment automatically ships every passing change to production with no manual gate.
CI/CD Pipelines
@openstem
CI/CD PipelinesFlashcards10 cards
What is the difference between a mock and a stub?1 / 10
A stub returns canned responses to make a test run; a mock additionally records and asserts on how it was called (behavior verification).
Unit Testing & Mocking
@openstem
Unit Testing & MockingFlashcards10 cards
What does an integration test verify that a unit test does not?1 / 10
It verifies that multiple components or modules work correctly together, including real interactions across boundaries like a database or service.
Integration & E2E
@openstem
Integration & E2EFlashcards10 cards
What is the Adapter pattern?1 / 10
Wraps an incompatible interface so it can be used where a different interface is expected — a translator between two APIs. Lets you integrate legacy or third-party code without changing it.
Structural Patterns
@openstem
Structural PatternsFlashcards10 cards
What does the 'S' in SOLID (Single Responsibility) mean?1 / 10
A class should have only one reason to change — one responsibility. Mixing concerns (e.g. business logic + persistence + formatting) makes code fragile and hard to test. Split responsibilities into focused units.
SOLID Principles
@openstem
SOLID PrinciplesFlashcards10 cards
What problem does the Observer pattern solve?1 / 10
It establishes a one-to-many dependency so that when a subject changes state, all registered observers are notified automatically.
Behavioral Patterns
@openstem
Behavioral PatternsFlashcards10 cards
What is the difference between @Controller and @RestController?1 / 10
@Controller returns view names (for server-side templates). @RestController = @Controller + @ResponseBody, so methods return data serialized directly to JSON/XML in the response body — the standard for REST APIs.
Web & REST Controllers
@openstem
Web & REST ControllersFlashcards10 cards
What annotation is the typical entry point of a Spring Boot application?1 / 10
`@SpringBootApplication`, a meta-annotation combining `@Configuration`, `@EnableAutoConfiguration`, and `@ComponentScan`.
Spring Boot & Autoconfiguration
@openstem
Spring Boot & AutoconfigurationFlashcards10 cards
What does the `?` suffix on a type like `String?` mean in Dart?1 / 10
It marks the type as nullable, allowing the value to be either a String or null. A bare `String` is non-nullable and can never hold null under sound null safety.
Null Safety
@openstem
Null SafetyFlashcards10 cards
What does the `await` keyword do inside an `async` function?1 / 10
It suspends the function until the awaited Future completes, then resumes with its result. The surrounding function returns a Future immediately to its caller.
Async & Futures
@openstem
Async & FuturesFlashcards10 cards
What is the result of this collection-if expression?1 / 10
[1, 2, 3] — collection-if conditionally includes the element 3 because the condition is true. Collection-if/for build lists inline.
Collections & Generics
@openstem
Collections & GenericsFlashcards10 cards
What is a factory constructor used for?1 / 10
It is a constructor that does not always create a new instance: it can return a cached object, a subtype, or run logic before returning. It must return an instance of the class.
OOP, Classes & Mixins
@openstem
OOP, Classes & MixinsFlashcards10 cards
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.
Layout & Constraints
@openstem
Layout & ConstraintsFlashcards10 cards
What does `Navigator.push` do?1 / 10
It adds a new route on top of the navigation stack, displaying the pushed screen. The previous route remains in the stack underneath.
Navigation & Routing
@openstem
Navigation & Routing