# Architecture principles whose scope is function

> 21 records

This index as JSON: https://banes-lab.com/json/api/facets/architecture/scope/function

## Entries

- [Design by Contract](https://banes-lab.com/records/architecture/design-by-contract.md): A design rule that every operation states the preconditions it needs, the postconditions it guarantees and the invariants it keeps.
- [Preconditions](https://banes-lab.com/records/architecture/preconditions.md): A rule or precondition that must hold on an operation's input and state before the operation runs.
- [Postconditions](https://banes-lab.com/records/architecture/postconditions.md): A rule or precondition that an operation's result and resulting state must satisfy when it returns.
- [Determinism](https://banes-lab.com/records/architecture/determinism.md): A design rule that the same inputs and state always produce the same result, with time and randomness passed in as inputs.
- [Referential Transparency](https://banes-lab.com/records/architecture/referential-transparency.md): A design rule that an expression can be replaced by its value without changing the program's behavior.
- [Pure Functions](https://banes-lab.com/records/architecture/pure-functions.md): A technique for writing logic as functions whose result depends only on their arguments and which have no side effects.
- [Correctness](https://banes-lab.com/records/architecture/correctness.md): The degree to which the behavior of code matches its specification.
- [Specification-Based Testing](https://banes-lab.com/records/architecture/specification-based-testing.md): The activity of deriving tests from a specification's stated behavior, independently of how the code implements it.
- [Property-Based Testing](https://banes-lab.com/records/architecture/property-based-testing.md): The activity of checking that a stated property holds for many generated inputs, and shrinking each failure to a minimal counterexample.
- [Do Not Repeat Yourself (DRY)](https://banes-lab.com/records/architecture/duplicate-code.md): A design rule that each piece of logic, constant or schema has one source in the code, and every other use refers to it.
- [Composability](https://banes-lab.com/records/architecture/composability.md): A design rule that parts share compatible interfaces and carry no hidden side effects, so they can be combined into larger parts.
- [Reusability](https://banes-lab.com/records/architecture/reusability.md): The degree to which a function or module can serve a new caller without change, because it carries no context of its first one.
- [Defensive Programming](https://banes-lab.com/records/architecture/defensive-programming.md): A design rule that code checks its inputs and assumptions before acting on them, and reports a violation as an explicit error.
- [Error Handling](https://banes-lab.com/records/architecture/error-handling.md): A design rule that every error is either handled with its context kept, or propagated as a typed error the caller must handle.
- [Time Complexity](https://banes-lab.com/records/architecture/time-complexity.md): A measure of how an algorithm's running time grows as its input grows.
- [Benchmarking](https://banes-lab.com/records/architecture/benchmarking.md): The activity of timing a fixed workload repeatedly in a controlled environment, so results can be compared across changes.
- [Stateless Processing](https://banes-lab.com/records/architecture/stateless-processing.md): A design rule that a processor derives each result only from its input and explicitly passed context.
- [Type Safety](https://banes-lab.com/records/architecture/type-safety.md): A mechanism that has the compiler reject operations on values of the wrong type before the code runs.
- [Input Validation](https://banes-lab.com/records/architecture/input-validation.md): A mechanism that checks external input against a schema at the boundary before core logic uses it.
- [State Isolation](https://banes-lab.com/records/architecture/state-isolation.md): A design rule that each piece of mutable state belongs to one unit of concurrent execution, so no two units that run at the same time can write it.
- [Controlled Side Effects](https://banes-lab.com/records/architecture/controlled-side-effects.md): A design rule that mutation, I/O and persistence happen at declared boundaries, around a core of pure functions.
