Skip to content
tezvyn:

Architecture

376 bites tagged Architecture — interview questions with model answers, and 60-second explainers.

Android & Kotlin2 min read

How to use a nested navigation graph for a login flow?

Tests your ability to structure complex UI flows using Navigation Component. A great answer defines a separate login graph XML, includes it in the main graph, and navigates to the graph's ID. This encapsulates the flow, making it reusable.

Android & Kotlin2 min read

Why is LiveData<Boolean> bad for one-time ViewModel events?

Tests if you know LiveData holds state, not events. A good answer explains that LiveData re-emits on configuration changes, causing repeated events. The solution is to model events as part of the UI state and consume them.

Android & Kotlin2 min read

Explain ViewModel, Repository, and Data Source in MVVM

This tests your understanding of separation of concerns. A great answer defines ViewModel (UI state), Repository (data abstraction), and Data Sources (implementation), then explains the unidirectional data flow.

Android & Kotlin2 min read

Describe the state hoisting pattern in Compose

Tests your grasp of unidirectional data flow. Explain state hoisting is moving state up to make composables stateless. This enables reusability, easier testing, and a single source of truth. A red flag is just describing the mechanics without the benefits.

Android & Kotlin2 min read

Bound Service Lifecycle with Config Changes & Multiple Clients

Tests your grasp of bound Service lifecycles. Explain that with BIND_AUTO_CREATE, the Service survives an Activity's config change recreation. It's only destroyed after the *last* client unbinds. A red flag is assuming the Service dies with the first client.

Android & Kotlin2 min read

How does a ViewModel survive configuration changes?

Tests understanding of lifecycle-aware components. ViewModels are retained by a ViewModelStore owned by the Activity/Fragment, which survives configuration changes. The ViewModel is cleared only when its scope is permanently finished.

Android & Kotlin2 min read

Hot vs. Cold Streams: `StateFlow` vs. `Flow`

Tests your grasp of stream lifecycles. A great answer defines cold `Flow` (lazy, per-collector) vs. hot `StateFlow` (shared, active), then uses a ViewModel UI state scenario to show why `StateFlow` is correct for surviving configuration changes.

Android & Kotlin2 min read

When would you use a sealed class instead of an enum?

This tests your understanding of state representation. Explain that sealed classes define a hierarchy of types that can hold different data, while enums are a set of singleton constants.

Analytics & Metrics2 min read

Client-Side vs. Server-Side Event Tracking: Pros and Cons

Tests your grasp of data integrity trade-offs. A good answer defines both, contrasts reliability vs. implementation ease, and gives clear examples like 'payment_processed' (server) vs. 'button_click' (client). Red flag: Ignoring ad-blockers and data loss.

Analytics & Metrics2 min read

Design an A/B Testing Framework

This tests your ability to design a scalable system with statistical rigor for non-experts. A great answer outlines config management, deterministic user hashing, a data pipeline for metrics, and a results UI that simplifies stats.

Agile & Scrum2 min read

Design an Architecture for Rapid Product Iteration

This tests your grasp of evolutionary architecture for uncertain markets. Outline how to support guided, incremental change across multiple dimensions (tech, data, security) using fitness functions to protect key characteristics.

Agile & Scrum2 min read

What is SAFe's Architectural Runway and how do you build it?

This tests your grasp of balancing proactive technical investment with agile delivery. Define it as the code and infrastructure for near-term features, built via 'Enabler' stories. The red flag is describing it as a rigid, big design up-front (BDUF) plan.

Agile & Scrum2 min read

How would you apply Conway's Law to design team structures?

This tests applying organizational theory to technical strategy. A great answer defines the law, explains the 'Inverse Conway Maneuver' by structuring teams around business capabilities, and avoids imposing an architecture without changing team structure…

Agile & Scrum2 min read

Decomposing a Monolith: Technical Strategy

This tests your ability to create a practical, phased migration strategy from monolith to microservices. A strong answer defines service boundaries via Bounded Contexts, manages data with events, and uses an API Gateway for contracts.

Agile & Scrum2 min read

How do you adapt when user feedback invalidates your current sprint?

This tests your ability to connect process to technical strategy under pressure. A great answer involves immediately notifying the Product Owner, quantifying the impact, and proposing technical pivots like feature flagging.

Agile & Scrum3 min read

MVP vs. Throwaway Prototype: Technical Differences

This tests your understanding of Minimum Viable Architecture (MVA). Differentiate by intent: a prototype is a throwaway concept test, while an MVP is a sustainable first version built on an MVA. A red flag is describing a sacrificial architecture for an MVP.

Agile & Scrum2 min read

When to formalize a cross-cutting concern?

Tests your judgment on architectural trade-offs. A good answer uses the "Rule of Three," weighs volatility and complexity to decide, and avoids dogmatic DRY. A red flag is immediately abstracting without considering the high cost of a shared solution.

Agile & Scrum2 min read

What is the Strangler Fig pattern?

Tests your understanding of gradual legacy system modernization. A good answer defines the pattern (new system grows around old), outlines the steps (identify seams, build, redirect traffic), and links it to Agile's incremental value delivery.

Agile & Scrum2 min read

Balancing Emergent Design with Long-Term Architectural Vision

This tests your ability to balance agile practice with large-scale system needs. Explain how an "Architectural Runway," built with "Enablers," reconciles emergent design with intentional architecture for near-term features.

Agile & Scrum3 min read

Explain the Test Pyramid and how it guides your strategy.

Tests your grasp of balanced automated testing. Define the pyramid's layers (Unit, Service, UI), explain trade-offs like speed and cost, then apply it to a new service. A red flag is describing the layers without explaining the 'why' behind the shape.

Agile & Scrum2 min read

Agile Change vs. Chaos: Technical Enablers

Tests if you know Agile is disciplined, not chaotic. A great answer contrasts structured, time-boxed change with reactive chaos, then details technical enablers like CI/CD and loose coupling. A red flag is equating Agile with no planning.

Android & Kotlin2 min read

Why is `LiveData<Boolean>` bad for one-time ViewModel events?

This tests your grasp of state vs. events. A `LiveData<Boolean>` is state; it re-triggers on rotation. Instead, expose events via a `StateFlow` and have the UI call an `eventConsumed()` function on the ViewModel to maintain unidirectional data flow.

Android & Kotlin2 min read

Explain ViewModel, Repository, and Data Source in MVVM

This tests your grasp of separation of concerns in Android. A good answer defines ViewModel, Repository, and Data Source roles, then traces the unidirectional data flow. A red flag is having the ViewModel directly access a data source like Retrofit.

Android & Kotlin2 min read

remember vs. rememberSaveable: When and Why to Use Each

Tests understanding of Compose state survival. `remember` is for recomposition scope. `rememberSaveable` survives activity recreation and process death via a `Bundle`, requiring custom `Saver`s for complex types. Red flag: saying `remember` survives rotation.

Get Architecture bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

Open testing — you’ll join as an early tester.