RELATED TOPICS
Understanding these concepts allows programmers and architects to reason mathematically about system behavior, performance, and correctness.
The way of hiding underlying details to simplify the model and expose only the essential features needed for interaction.
CS Context: Abstraction is the most important tool for managing complexity. It allows you to use a data structure (like a list) without knowing if it's implemented as an array or a linked list, or to use a function/API without knowing the thousands of lines of code inside it.
Goal: To separate the "what" (the behavior) from the "how" (the implementation).
The ability to reference something via an intermediate entity (a layer or a pointer) rather than directly.
CS Context: Almost every major feature in CS uses indirection: pointers (memory addresses), DNS (mapping a name to an IP address), virtual memory (mapping a logical address to a physical one), or interfaces (referencing an object by its contract, not its concrete class).
Benefit: Indirection enables decoupling and flexibility. Changing the underlying implementation only requires updating the intermediary, not every part of the system that uses it.
The act of delaying a computation or action until its result is actually needed.
CS Context: Often called Lazy Evaluation, this is a powerful optimization technique. An array of objects might not fully initialize all objects until they are first accessed.
Benefit: Improves performance by avoiding unnecessary work and can save memory by only loading data on demand (e.g., streaming media, or creating an infinite list in functional programming).
The information stored by a component, process, or system at a particular point in time that defines its condition and influences its future behavior.
CS Context: A variable's value, a database record, or the memory of a running program are all forms of state. State is what makes a process deterministic.
Challenge: Managing shared, mutable state is the primary challenge in concurrent and distributed systems, as it introduces complexity and race conditions.
The property of an object or value that ensures it cannot be modified after it is created.
CS Context: Once a variable is initialized, its value is fixed. Instead of modifying the object, any operation that seems to change it actually returns a new object with the desired change.
Benefit: Greatly simplifies concurrent programming, as multiple threads can safely read an immutable object without needing locks (since it can't change).
The property of an operation that guarantees the result will be the same regardless of how many times the operation is executed.
CS Context: Critical in network and distributed systems. For instance, a DELETE request for a resource should return success (or "not found") whether you call it once or ten times. A payment charge operation is typically not idempotent (to prevent duplicate charges), but an attempt to set a user's name is.
Goal: To allow for safe retries in the face of network failure without causing unintended side effects.
The degree to which a system's components can be separated and recombined, often encapsulated into distinct, exchangeable units (modules).
CS Context: Achieved through techniques like high cohesion (module components belong together) and low coupling (modules are independent). Examples include libraries, services in a microservice architecture, and classes.
Benefit: Eases development, testing, maintenance, and reuse, as changes within one module ideally do not affect others.
The ability of a system to handle multiple tasks or processes at the same time by interleaving their execution over a single computational resource (CPU core).
CS Context: Often achieved using context switching, where the operating system quickly swaps between threads or processes, giving the appearance of simultaneous execution.
Goal: To manage many tasks efficiently and maximize the system's throughput.
The ability of a system to execute multiple tasks or processes simultaneously on multiple separate computational resources (CPU cores).
CS Context: Requires multi-core processors, multi-processor systems, or distributed machines. True simultaneous execution.
Goal: To reduce the total execution time of a computation by splitting the work.