Architecture
376 bites tagged Architecture — interview questions with model answers, and 60-second explainers.
How do you assess architecture impact during a corporate pivot?
Tests business-technical alignment under strategic uncertainty. Strong answers map new outcomes to capability gaps, assess debt and migration cost, then co-own replanning with product. Red flag: proposing a full rewrite before understanding limits or ROI.
Describe an ML workflow with massive egress fees and re-architecture to mitigate
Tests whether you recognize egress spikes when storage and compute cross cloud or region boundaries. Great answers sketch a multi-cloud training pipeline, cite per-GB rates, and propose caching or compute placement. Red flag: suggesting compression alone.
Design a multi-tenant ML platform with isolation, security, and cost attribution
Tests mapping tenancy to compute, network, and identity primitives. Strong answers compare hard vs soft isolation, use namespaces or node pools with network policies and IAM, and enforce chargeback via resource quotas and labels.
Where to place feature transformations: client, serving API, or upstream service?
Tests separation of concerns in ML systems. Client causes duplication and skew; serving API couples compute to requests; dedicated service adds a network hop but centralizes logic. Red flag: ignoring training-serving skew.
Argue for declarative or imperative feature platforms with trade-offs
This tests whether you weigh control flow against data flow. A strong answer argues from org maturity: declarative systems abstract DAG topology, while imperative ones offer Spark control at the cost of manual idempotency. Red flag: ignoring org culture.
Design an MLOps platform for a mid-sized company: components and build-vs-buy trade-offs
Tests pragmatic scoping and build-vs-buy reasoning. Strong answers rank data estate, feature store, registry, CI/CD/CT, and monitoring above exotic serving, buying commodity and building differentiators. Red flag: custom orchestrators or missing governance.
Describe a basic RAG architecture and its two main components
This tests retrieval-generation separation. Good answers name the retriever, which fetches relevant documents, and the generator, which synthesizes an answer using those documents plus the query.
Explain positional encodings in Transformers and their necessity
Explain encodings inject order into embeddings; cite sinusoidal or learned vectors. Self-attention is permutation-invariant, requiring position signals. Claiming attention learns token order without position info.
Design state-driven navigation for a conditional wizard in UIKit and SwiftUI
This tests separating navigation state from UI. Model the flow as a state machine enum, derive the stack from state, and unit test transitions in plain Swift. A red flag is imperative pushes inside views or view controllers.
How would you architect the app root for onboarding vs authenticated flows?
Tests window root swapping and state-driven architecture. Use a coordinator to own the window, swap rootViewController between nav and tab controllers on auth changes, and crossfade. Red flag: onboarding modal over tabs or keeping both hierarchies alive.
Explain the Coordinator pattern and the navigation problem it solves in MVC
This tests if you see view controllers bloat from absorbing navigation flow. A good answer names 3 problems (delegate bloat, massive view controllers, embedded routing) and says coordinators own creation and routing.
How does the Coordinator pattern decouple navigation, and what are its components?
This tests iOS separation of concerns. Explain that Coordinators extract navigation logic from view controllers for reuse, and describe AppCoordinator tree with child coordinators. A red flag is treating it as a router or ignoring parent-child retention.
Explain MVVM, its improvements over MVC, and Swift data binding techniques.
Tests architectural separation of concerns and pattern comparison skills. Define ViewModel as state transformer, cite MVC's massive view controller, and list Combine or closures for binding. Red flag: calling MVVM as MVC with no testability.
Compare server-side and client-side experimentation architectures
This tests rendering-layer architecture. A strong answer contrasts server-side zero-flicker and algorithm tests against client-side marketer agility and SEO safety, mapping each to release cycles. A red flag is claiming one approach dominates every dimension.
Why does Go forbid circular dependencies, and how do you resolve them?
Cycles break incremental compilation; resolve by moving logic down, merging coupled packages, or using dependency injection. Knowledge of Go's DAG package model. Suggesting compiler workarounds over fixing design.
Design a BLoC solution for an API call that updates multiple UIs
Decoupled BLoC orchestration for multi-surface updates. Use a coordinator stream so each BLoC subscribes independently while keeping loading and error states local per widget. Directly nesting one BLoC inside another or using global variables for shared state.
Riverpod providers are objects, not widgets. What are the practical advantages?
Tests architectural decoupling of state and UI in Flutter. Strong answers hit compile-time safety, unit testing without widget trees, and logic that survives outside BuildContext. Red flag: praising syntax sugar without explaining the coupling problem.
Describe the BLoC pattern: Events, States, and widget connection
Tests UI-business separation. Strong answers cast Events as user intents, States as immutable snapshots, and BLoC as a pure reducer. Widgets listen via BlocBuilder and dispatch via context.read. Red flag: mutating state directly or using setState inside BLoC.
Walk me through Flutter's rendering pipeline and its phases.
Tests your understanding of the three-tree separation and how changes become pixels. Outline: setState marks objects dirty; Build updates elements, Layout computes sizes bottom-up via constraints, and Paint records commands top-down into layers.
Flutter's Widget, Element, and RenderObject trees: roles and relationships
Tests your mental model of Flutter's rendering layers. Strong answer: Widget is immutable configuration; Element is the mutable lifecycle manager owning the RenderObject; RenderObject is the concrete layout and paint entity.
When to use SQLite over key-value storage?
Tests structured-vs-flat storage judgment. Good answers cite relational data, complex queries, or multi-table schemas, then list adding the dependency, getting a path, opening with onCreate, and keeping a singleton.
Relationship between Widget, Element, and RenderObject trees and their benefits
Widget configures, Element owns state, RenderObject paints; Element.update reuses the RenderObject, so rebuilds stay cheap. Your understanding of Flutter's three-tree separation of concerns.
Repository Pattern: Hide Your Data Sources
A repository is a contract that hides where your data lives. Your Flutter app should not care if a user profile comes from Firebase, SQLite, or a mock. Engineers often leak HTTP clients or database models into UI instead of returning domain models.
Design token pipeline serving Web, iOS, and Android
This tests cross-platform design system architecture and governance. A strong answer uses W3C JSON tokens in option, decision, component layers, with Style Dictionary generating Web, iOS, and Android outputs. Red flag: using Figma or CSS as source of truth.
Get Architecture bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.