Intermediate interview questions in Backend Dev, page 12
Go slices versus Rust Vec growth and reallocation
Both are a (pointer, length, capacity) triple over a heap buffer that reallocates and copies on growth, roughly doubling; key difference is Go slices share backing arrays and have no ownership…
Pydantic BaseModel vs dataclasses in FastAPI
BaseModel validates and coerces data at runtime, parses and serializes JSON, integrates with OpenAPI schema generation, and supports rich validators; dataclasses only store data with no validation.
Detecting and diagnosing event loop lag
Measure delay between scheduled and actual timer fire, expose it as a metric, find synchronous CPU-bound code.
How databases implement GROUP BY aggregation
Hash aggregation builds a hash table keyed by group holding running aggregates; sort aggregation orders rows then aggregates adjacent groups; optimizer picks based on data and memory.
Designing a logging abstraction: Go interfaces vs Rust traits
Define a Logger interface/trait with a write method; Go interfaces are always dynamically dispatched; Rust lets you choose static dispatch (impl Trait/generics) or…
Mapping camelCase JSON to snake_case Pydantic fields
Set an alias_generator (to_camel) plus populate_by_name in model config, accept aliases on input, and serialize with by_alias=True so responses come out camelCase.
V8 generational GC and event loop responsiveness
Young-generation scavenges are frequent but short, old-generation major GC is rarer but longer, stop-the-world pauses block the single JS thread.
Logical vs physical query plans and the optimizer
Logical plan says what (relational algebra, no algorithms); physical plan says how (specific operators); cost-based optimizer enumerates physical options and picks the cheapest using statistics.
Go if err != nil versus Rust's ? operator
Go's explicit checks are verbose but make every error site visible; Rust's ? propagates concisely while still forcing the error into the type, reducing boilerplate.
Pydantic computed fields in response models
A @computed_field decorated property is excluded from input and validation but included in serialization and the OpenAPI schema, ideal for values like full_name derived from other fields.
Validating request bodies with Express middleware
Run validation middleware before the handler, check email format and password length, return 400 with errors on failure, call next on success.
Optimizing queries on a billion-row fact table
Partition to prune scans, index for selective lookups, materialize views to precompute aggregates; each adds write or maintenance cost.
anyhow versus thiserror in Rust error handling
Anyhow gives one opaque dynamic error type for applications where you mostly propagate and report; thiserror derives concrete typed enums for libraries so callers can match on variants.
Streaming large file downloads efficiently
Use StreamingResponse with a generator that yields chunks (or FileResponse for an on-disk file), set media_type and a Content-Disposition header, so memory stays flat regardless of file size.
Purpose of an ORM like Sequelize
Maps rows to objects, gives a model-based API, handles associations, migrations, and parameterized queries across dialects.
Diagnosing and optimizing a slow production query
Read the EXPLAIN ANALYZE plan, find the costly node, then fix via indexing, rewrite, or stats.
Implicit Go interfaces versus explicit Rust trait impls
Go's implicit satisfaction enables decoupling and retrofitting but hides who implements what and risks accidental conformance; Rust's explicit impls aid discovery, refactoring…
Feature-based vs layer-based project structure
Layer-based groups by technical role and is simple early but scatters a feature across folders; feature-based groups by domain, improving cohesion and ownership at the cost of some duplication and…
Pinpointing validation errors in nested request data
Use schema validation that reports a path, collect all errors not just the first, return a 400 with field paths and messages.
Designing an HA/DR strategy for an OLTP database
Sync standby in-region for zero data loss, async cross-region for DR, automated failover with a quorum.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles