skip to content

Paradigm Families

A comparative map of how programming styles differ — in state, control, evaluation and composition — and which problems each one fits. Interviewers ask so you justify a style, not a favourite.

on this pageshow

explore

questions

page 2 of 2

A rota solver returns a legal roster in seconds but takes hours to return the one with fewest weekend shifts - why?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Satisfaction stops at the first roster that satisfies every rule. Optimisation must also prove nothing cheaper exists, which means refuting the whole remaining space under a bound. The proof, not the discovery, is what takes hours.

open as a page

A handler running during a recalculation pass edits a cell and starts another pass — what can go wrong?

level: seniorimportance: should knowfreq 42%

basics

~20 s

The nested pass sees a graph that is half-updated, so the handler reads values no settled state ever had. It can also re-trigger itself without bound, and its edit is a dependency the engine never recorded.

open as a page

A dataflow recalculation has many independent cells but barely speeds up on more workers — what explains that?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Independence licenses concurrency; it does not create it. Speedup is bounded by the longest dependency chain through the graph, by per-cell work too small to repay scheduling, and by hidden edges that serialise cells the engine believed were independent.

open as a page

A declarative description is correct, yet the engine keeps choosing a slow or wrongly ordered plan — how do you intervene without giving up the paradigm?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Prefer stating a fact the engine was missing, such as a dependency or a narrower property, over dictating strategy. A hint is the next resort and pins you to today's engine; a literal step is last, forfeiting derived order and idempotence.

open as a page

A long-lived order service is half-migrated from mutable records to immutable values, with both styles live - why is that state more expensive than either endpoint?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Both bills, neither guarantee. Seams appear wherever the front line runs instead of at one edge, invariants hold in only part of the graph so nobody can rely on them, and every reviewer carries two models.

open as a page

Two reviewers call opposite styles idiomatic for the same module in a language that supports both - how do you settle it?

level: seniorimportance: should knowfreq 40%

basics

~20 s

Cost settles it, not taste. Once a language supports several styles, idiomatic means what this codebase decided plus what the surrounding module already does, so the fix is a written rule naming which regions use which style.

open as a page

Two payroll routines both write a module-level running-total ledger — what does that shared state cost you when a third routine joins?

level: seniorimportance: should knowfreq 58%

basics

~20 s

Module-level state acts as an argument no signature declares. A third writer couples silently to the other two, turns call order into an unwritten contract, and forces every test, retry and concurrent run to reset the ledger first.

open as a page

How do you decide whether converting a long-lived service's mutable core to immutable values is worth its cost to the teams that own it?

level: principalimportance: should knowfreq 36%

basics

~20 s

Name a defect class you can count, check it concentrates in that core, price the boundary plus the review tax, scope to a region closeable in one planning cycle, weigh cheaper partial moves, and set a stop rule.

open as a page

On the evaluation axis, what can you no longer conclude from where an expression appears in the text?

level: middleimportance: nice to knowfreq 33%

basics

~20 s

When - or whether - the work happens. Under deferred evaluation, writing an expression only records how to produce a value; the work runs at the point some other code demands it, which may be far away or never.

open as a page

In a stack-based concatenative pipeline, what makes writing two words next to each other compose them?

level: middleimportance: nice to knowfreq 26%

basics

~10 s

A single shared operand stack. Each word takes its inputs off the top and leaves its outputs there, so the next word written finds exactly what the previous one left: juxtaposition is composition.

open as a page

When does evaluating a pure transform over partitioned chat history in parallel actually pay?

level: seniorimportance: nice to knowfreq 33%

basics

~20 s

It pays when partitions are independent, each large enough to dwarf the cost of splitting and merging, reasonably even in size, and combined by an associative merge. Skew and the sequential fraction, not worker count, set the floor on wall-clock time.

open as a page

Two constraint models of the same support rota differ only in encoding, yet one solves in seconds and the other thrashes for hours - what makes the difference?

level: seniorimportance: nice to knowfreq 28%

basics

~20 s

Solve time is a property of the encoding, not only of the problem. A rule stated as one group constraint prunes far more than the equivalent pairwise pile, interchangeable people multiply identical rosters, and a poor variable order makes the search rediscover one conflict everywhere.

open as a page

What does the von Neumann bottleneck critique claim is wrong with programming in the imperative style?

level: seniorimportance: nice to knowfreq 26%

basics

~20 s

The critique says a narrow word-at-a-time channel between store and processing unit shaped the languages built on it, so programs became statement-at-a-time recipes with no useful algebra for combining them and a meaning that depends on a large implicit state.

open as a page

Two recursive containment rules have identical logical readings, but one fails to terminate - how can clause and goal order decide that?

level: seniorimportance: nice to knowfreq 29%

basics

~20 s

Order changes nothing about what the rules mean and everything about how the engine looks for it. Under a fixed depth-first, top-to-bottom strategy, a recursive goal placed before the goal that would narrow it descends forever.

open as a page

showing 31–44 of 44