Architecture
376 bites tagged Architecture — interview questions with model answers, and 60-second explainers.
How BEM tames specificity and !important
BEM names block, element, modifier as flat single classes, keeping specificity low and equal, removing the need for deep selectors and !important. knowledge of scalable CSS architecture.
Architect themes on a token foundation
Separate primitive tokens from semantic alias tokens that themes redefine, emit semantics as custom properties per theme scope, components use only semantics. layered token architecture. components reading primitives.
Utility-first versus semantic CSS trade-offs
Utility-first gives speed, small purged bundles, and no naming overhead but verbose markup; semantic BEM gives readable markup and clear boundaries but naming and dead-CSS risk. balanced CSS architecture judgment.
Should a component own its outer spacing?
Components own internal padding but should not own external margin; the parent or layout owns spacing between siblings, keeping components context-independent. spacing ownership in design systems.
Explain the inverted triangle of ITCSS
ITCSS orders layers from far-reaching low-specificity (settings, tools, generic) down to localized high-specificity (components, utilities), so specificity climbs gradually. managing the cascade at scale.
What are the two principles of OOCSS?
Separate structure from skin, and separate container from content; this lets visual themes and layout be mixed and reused independently. reusable CSS architecture thinking.
Categories of Design Tokens
Design tokens fall into tiers: primitive tokens hold raw values, semantic tokens assign meaning by aliasing primitives, and component tokens scope decisions to specific UI parts.
Explain the Strangler Fig pattern
A facade routes traffic, new services gradually replace legacy features one slice at a time, and the old system is retired when fully strangled. incremental modernization strategy.
Design petabyte-scale distributed training
Object storage with columnar formats, distributed preprocessing, a data-parallel framework with efficient sharded loading, and managed orchestration. end-to-end big-data ML architecture.
Why not store uploads on local PaaS disk?
PaaS instances are ephemeral and unshared, so local files vanish on restart and are invisible to peers; store uploads in object storage. statelessness and ephemeral storage. treating instance disk as durable or shared.
Layer 4 vs Layer 7 load balancers
L4 routes on IP and TCP/UDP ports fast and protocol-blind; L7 inspects HTTP for host, path, and headers. OSI model and load balancer routing knowledge. claiming L7 is always better.
Modularizing a monolithic iOS app
Extract low-dependency, high-reuse leaf code first behind clear interfaces, enforce boundaries, iterate inward. incremental modularization strategy.
Compare MVVM with unidirectional flow (TCA, Redux)
MVVM is lightweight with bidirectional binding and per-screen view models; unidirectional flow centralizes a single state mutated only by reducers via actions, gaining predictability and testability at… architectural trade-off judgment.
Explain UIKit MVC and the Massive View Controller problem
Model holds data, View displays it, Controller mediates between them; the view controller accretes networking, parsing, and logic into a Massive View Controller. understanding UIKit's core pattern and its pitfall.
Architect a configurable, goal-based onboarding flow
Capture the goal, let the backend return a server-driven flow definition mapping goal to steps and content, render generic components on the client. building a data-driven, configurable flow rather than hardcoded branches.
Architecting an L7 proxy in Go versus Rust
Go offers GC and cheap goroutines for fast delivery but tail-latency GC pauses; Rust offers ownership and async/await for predictable latency at higher complexity. ability to weigh systems trade-offs under real constraints.
When to build an Operator vs a Helm chart
Charts handle install-time templating; operators add continuous day-two logic like failover, backups, and scaling for stateful apps. tool selection judgment. building an operator for a stateless app a chart would handle.
Core control plane components
Api-server as the front door, etcd as state store, scheduler placing pods, and controller-manager running reconciliation loops, plus cloud-controller-manager. knowledge of cluster brain components.
Structuring color tokens for a new app
Primitive palette, semantic role tokens, optional component tokens, theming benefit. tiered color-token architecture and why layering matters. a flat list of named colors with no semantic layer, blocking theming and dark mode.
Framework-agnostic components across React, Vue, Angular
Web components for one core, framework wrappers for ergonomics, codegen as an alternative, with their costs. cross-framework component strategy and its trade-offs.
Design systems across micro-frontends
Shared singletons and version alignment, token-based theming, distribution via shared scopes, stronger governance. adapting a design system to independently deployed front ends.
Architecting a federated documentation site
Docs-as-code with a manifest, CI publishing artifacts, a build that pulls and merges, unified deploy. aggregating docs from many repos into one site. manually copy-pasting docs between repos with no automated aggregation.
Architect periodic and on-demand sync with WorkManager
Tests combining periodic and push WorkManager requests safely. Outline: one Worker class, PeriodicWorkRequest hourly and OneTimeWorkRequest on push, with ExistingWorkPolicy.KEEP plus constraints. Red flag: two Workers, no deduplication, or ForegroundService.
Trade-offs: product teams vs project teams and funding model impacts
This tests funding impact on architecture. Contrast temporary project teams funded by scope versus product teams funded by problems; tie rolling budgets to ownership and refactoring. Red flag: claiming agile ceremonies fix org design while ignoring funding.
Get Architecture bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.