Blog
Posts and series that take software and IT from the basics to advanced topics: from programming languages and databases to architecture and AI.
What Is System Design and How Do You Approach It? A 4-Step Method from Requirements to Deep Dive
You approach system design in four steps: clarify requirements and scope, draw a high-level design and get buy-in, deep dive into the component that carries the problem, then state the trade-offs and wrap up. In the Bookstore campaign day example, Little's law (L = λ × W) shows on paper that the bottleneck is the connection pool, not the CPU, and real SqlClient output confirms it.
Keeping Decisions Alive: Decision Logs, Architecture Reviews and the Advice Process
A decision log only works while it stays discoverable and is reviewed regularly: a generated index, a supersede chain checked in CI, calendar and condition triggers and a 30-minute monthly review. A C# tool that audits Bookstore's 15-ADR log, the advice process and the architecture advisory forum, the maintenance status of ADR tools at the time of writing, and a minimum process for a team of six.
From ADR to Automated Check: Verifying Decisions with Fitness Functions and CI
The Confirmation section of every ADR is the specification of a fitness function: a decision is checked on every PR, on a schedule, continuously in production, or lands on a short manual list. At Bookstore we verify the public API decision with oasdiff, the bundle size decision with Angular budgets, migration reversibility with an xUnit test and the .NET support window with a weekly check, all with real output.
Documenting Architecture: arc42, Docs as Code and Keeping C4 Diagrams Next to ADRs
To keep architecture documentation alive, arc42 provides the structure, C4 views the diagrams and ADRs the decisions, all in one repository, and CI checks on every PR that the diagrams match the model. In Bookstore's docs folder: mapping arc42 sections to ADRs and C4 views, Structurizr's !docs and !adrs directives, inspect and a staleness check, and which diagram to show to which reader.
RFCs and Design Docs: Debating Big Decisions in Writing
A decision whose solution is unclear and that affects several teams is first debated in a design doc, with an RFC process with written rules when needed, and its outcome is recorded as a separate, immutable ADR. Using a two-page design doc for adding an outbox to Bookstore's order service: Context and Scope, measurable Goals, real Non-Goals, Alternatives Considered, cross-cutting concerns, the lifecycle and the RFC comment period.
Trade-off Analysis: Comparing Options Against Scenarios, Sensitivity and Trade-off Points
You compare options not with each other but against prioritized quality attribute scenarios, ideally with measurements from a spike; ATAM's sensitivity point, trade-off point and risk concepts show where the decision is fragile. We weigh no cache, HybridCache and Redis for the Bookstore catalog with a real spike: why p95 did not move, why an L2 did not fix stale prices and why a weighted decision matrix misleads.
Writing ADRs: Decision Records with the Nygard Template, MADR 4.0 and Y-Statements
A good ADR records not just the decision but the question it answers, the options it was made against, the accepted cost and when to reopen it, and it is never edited once decided. Nygard's five-section template, the sections and front matter of MADR 4.0.0, a rejected decision record, Y-statements, the status lifecycle and a real script that enforces immutability in PRs.
What Is an Architecture Decision? Recognizing Architecturally Significant Choices
A decision is architectural, and deserves a record, when it is expensive to reverse, reaches several modules or the system boundary, or moves a prioritized quality attribute scenario. We classify ten decisions from Bookstore's first months with these three criteria in C#, and discuss which deserve an ADR, a design doc or a PR description, who owns the decision, and what unrecorded decisions cost.
Boundaries in Large Angular Apps: Feature Folders, Facades and Layers
In a large Angular app you should organize code by feature, split each feature into ui, state, data and domain layers, and allow cross-feature imports only through a public API (index.ts) with rules enforced by lint; the compiler does not know these boundaries. With real output we show three shortcuts passing ng build and being caught by eslint-plugin-boundaries, and cover the facade service and the API client layer.
Component Architecture: Container and Presentational Components, Composition and Contracts
A container component knows about data and side effects, while a presentational component only takes inputs and reports what happened through outputs; the split is not a strict rule but a thinking tool for testability and reuse. We split the Bookstore's product list into three components and show with real output how renaming an input causes NG8002/NG8008 errors, content projection, and how light a presentational test is.
Unidirectional Data Flow in Angular: Signals, input/output and State in Services
Unidirectional data flow in Angular means the state has a single owner, data goes down with input(), change requests go up with output(), and derived values are computed with computed(). With real tests we show how state written by an effect lags behind, how model() bypasses a business rule and why default OnPush misses an array changed in place, then move the state into a service that holds signals.
Flux and Unidirectional Data Flow: Why Didn't Two-Way Binding Scale?
Two-way binding and observable models that update each other produce cascading updates whose result depends on listener order, plus intermediate states that were never valid (glitches); Flux solved this with a one-way flow (action → dispatcher → store → view). We show the glitch with real output on the same order form, cover Redux's three principles and the Elm Architecture, write a 40-line TypeScript store and weigh the cost of immutability and boilerplate.