Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8668 bites

Page 154

iOS & Swift2 min read

Swift Collections: Array, Set, Dictionary

Swift's three collections are different access patterns, not just different APIs. Arrays keep order, Sets enforce uniqueness, and Dictionaries map keys to values. Picking an Array for uniqueness checks turns membership from O(1) into O(n) scans.

iOS & Swift2 min read

Swift Basic Types: Value Semantics by Default

Swift's basic types are value type structs, so assignment copies, not shares, a reference. You feel this when passing Strings into functions or choosing Int over Double. The footgun is treating them as free to copy; large values cost memory and speed.

iOS & Swift2 min read

Apple's Natural Language Framework

Apple's Natural Language Framework turns raw strings into structured meaning on-device without network calls. Tokenize queries or extract entities from user text locally. It is not infallible; heavy synchronous tagging on the main thread freezes your UI.

iOS & Swift2 min read

UserNotifications Framework: iOS Alert Gatekeeper

UserNotifications is the gatekeeper between your app and the lock screen. You use it to request permission and schedule local or push alerts on iOS. Send a notification before authorization and the system silently drops it.

iOS & Swift2 min read

Result Builders: Declarative Swift DSLs

Result builders teach the compiler to fold expressions into one combined value, enabling declarative DSLs. SwiftUI relies on them to compose stacked views. Type errors surface on compiler-generated boilerplate instead of your original code.

iOS & Swift2 min read

Swift Enums: Type-Safe Choice Modeling

A Swift enum is a closed menu of possibilities the compiler tracks exhaustively. Use it to replace string constants or model a network result state. Adding a case without updating every switch breaks compile-time safety if you rely on a default clause.

Explain the difference between statistical and practical significance
Growth & Experimentation2 min read

Explain the difference between statistical and practical significance

Define statistical vs practical significance; note large samples make tiny effects significant; give a real example.

Build a system to measure viral coefficient and attribute invites to signups
Growth & Experimentation2 min read

Build a system to measure viral coefficient and attribute invites to signups

Tests if you can map K=i×c to logged events and resilient pipeline. Good answers define invite_sent, click, signup events with referral tokens; sketch stream joins; and flag cross-device and organic attribution gaps. Red flag: assuming perfect attribution.

Design a referral system: data models, APIs, attribution, self-referral prevention
Growth & Experimentation2 min read

Design a referral system: data models, APIs, attribution, self-referral prevention

Tests data modeling with fraud guardrails and idempotent rewards. Cover: Users with nullable referred_by, ReferralEvents state table, async ledger attribution, and device-fingerprint self-referral blocks. Red flag: bare integer credit with no audit trail.

Describe cluster or switchback randomization for network-effect A/B tests.
Growth & Experimentation2 min read

Describe cluster or switchback randomization for network-effect A/B tests.

Tests SUTVA violation, cluster-switchback tradeoffs. Outline: cluster (geo, teams) or switchback (time slices) isolation; cover pipeline changes, 10x inflation, and correlated error. Red flag: user-level randomization with post-hoc fixes or ignoring spillover.

Compare server-side and client-side experimentation architectures
Growth & Experimentation2 min read

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.

How do you prevent concurrent onboarding and navigation experiments from polluting results?
Growth & Experimentation2 min read

How do you prevent concurrent onboarding and navigation experiments from polluting results?

This tests experiment isolation via layer-based traffic allocation. A strong answer covers hashing users into independent layers with one variant per layer, and assigning each experiment to a distinct layer.

How do you systematically manage and pay down experiment debt?
Growth & Experimentation2 min read

How do you systematically manage and pay down experiment debt?

Tests sustainable velocity through experiment lifecycle hygiene. Strong answers cover isolated experiment directories, TTLs on feature flags, and recurring cleanup sprints. Red flag: banning experiments or treating all experiment code as permanent.

What experiment artifacts and metrics do you present to decide shipping?
Growth & Experimentation2 min read

What experiment artifacts and metrics do you present to decide shipping?

This tests structured experiment discipline. A strong answer covers the pre-approved design doc, scorecard results for primary goal and guardrail metrics plus secondary breakdowns versus the hypothesis, and duration context.

Lifecycle of a feature flag experiment from creation to cleanup
Growth & Experimentation2 min read

Lifecycle of a feature flag experiment from creation to cleanup

Tests operational rigor across the full flag lifecycle. A strong answer covers six stages: SDK instrumentation with event tracking, phased rollout, monitored experiment, ship/kill decision, and code cleanup.

How do you mitigate peeking in experiment infrastructure?
Growth & Experimentation2 min read

How do you mitigate peeking in experiment infrastructure?

Lock results behind minimum samples; auto-correct via sequential testing; hide early metrics and require stop approval.

Design a pre-aggregation architecture for low-latency experiment results
Growth & Experimentation2 min read

Design a pre-aggregation architecture for low-latency experiment results

Tests OLAP-at-scale trade-offs. Strong answers design streaming rollups into a real-time OLAP store, use partial cubes for high-cardinality dimensions, and retain raw events.

Design a system to reduce large client-side experiment payload size
Growth & Experimentation2 min read

Design a system to reduce large client-side experiment payload size

Tests edge evaluation and payload compression. Use server-side pre-evaluation or edge nodes sending only assigned variants; compact bucketing indexes or Bloom filters; lazy-load noncritical experiments. Never do full client-side evaluation of every flag rule.

Growth & Experimentation2 min read

Compare PostgreSQL versus a columnar warehouse for raw event data

Contrast row vs column storage, compression, and scan speed; note Postgres suits OLTP and point lookups while columnar stores excel at aggregations.

Should we build or buy an A/B testing platform?
Growth & Experimentation2 min read

Should we build or buy an A/B testing platform?

This tests build-vs-buy judgment for experimentation infrastructure. Strong answers cover build for warehouse metrics and cache control; buy for proven stats and front-end speed. Red flag: answering with cost alone or assuming in-house is always superior.