Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Misconception Elimination Project

Overview

This collection targets forty-four widely repeated claims that survive interviews, code reviews, and design documents because each one contains a kernel of truth. The format is deliberately adversarial but fair: each page states the claim in its strongest common form, renders a verdict (false, incomplete, or context-dependent), explains why the claim is believable, gives the correct formulation, and then breaks the claim with a concrete scenario whose numbers actually work out.

The goal is not to mock the claims. Most of them are true in a specific, well-defined regime, and engineers who repeat them are usually quoting a real experience. The failure is in the missing quantifiers: “always”, “guarantees”, “completely”, “average case” — words that quietly delete the preconditions under which the statement holds. Removing those deletions is what this project does. Read the inventory below, pick the claim you have caught yourself repeating, and audit it against the counterexample.

A Taxonomy of Misconception Types

Not all wrong claims are wrong in the same way, and the verdict category changes what you should do about it.

TypeDefinitionWhat to do about itExample in this collection
FalseThe claim is contradicted outright: a valid counterexample exists where the outcome is the opposite of the claimReplace the claim; memorize the counterexample“TCP guarantees the application receives the data”
IncompleteThe claim is true in a common regime but omits preconditions whose violation flips or voids the resultAttach the preconditions explicitly; treat the claim as conditional“Good average-case complexity guarantees good real-world performance”
Context-dependentThe claim is true on one side of a tradeoff and false on the other; neither polarity is universally validLearn the regime boundary, not a verdict“Recursion is always slower than iteration”

The distinction matters in interviews. Saying “that is false” when the honest answer is “that is incomplete — here are the three missing preconditions” signals precision, and interviewers probe exactly this. A false claim has a counterexample that inverts the outcome; an incomplete claim usually has a counterexample that only fails to deliver the promised benefit. When you are unsure which verdict applies, try to construct a scenario where the claim’s outcome is worse than the baseline. If you can, the claim is false; if the outcome merely fails to improve, the claim is incomplete; if the outcome depends on workload shape, it is context-dependent.

Why These Claims Persist

Every claim in this collection survives because it encodes a kernel of truth so reliable that most encounters with the claim never expose the boundary.

  • The common regime dominates experience. Hash lookups are O(1) almost every time you measure them; most tables are indexed usefully; most caches improve latency. A rule that holds in 99% of observed cases is indistinguishable from an unconditional rule unless you go looking for the 1%.
  • Teaching simplifications harden into axioms. Courses say “hash tables are constant time” to defer the fine print about expected versus worst-case cost. Students remember the slogan and lose the quantifier “expected, under simple uniform hashing”.
  • Guarantees get smuggled across abstraction layers. TCP really does guarantee reliable, ordered byte delivery — to the kernel socket buffer, not to the receiving application. The guarantee is real at one layer and fictional one layer up.
  • Survivorship bias. The projects where “more threads fixed it” ship; the projects where more threads caused a contention collapse get rewritten before anyone writes the postmortem.
  • The fine print is documented but unread. Java’s HashMap javadoc and PostgreSQL’s planner documentation both state their limits plainly. The misconception persists because nobody reads the documentation of things they believe they already understand.

How to Audit Your Own Beliefs

Use this checklist on any performance or correctness claim you are about to repeat in a design review or an interview.

  1. State the claim with quantifiers. Rewrite it as “for all X, doing Y yields Z”. Vague claims cannot be audited.
  2. Name the regime where it holds. Every surviving claim has one. If you cannot name it, you do not understand the claim yet.
  3. Hunt for one valid counterexample. Not a plausible story — a concrete scenario with numbers you have actually computed. If your counterexample does not survive arithmetic, the claim survives.
  4. Identify the missing precondition. Classify the verdict: false, incomplete, or context-dependent, using the table above.
  5. Check what the primary source actually promises. Read the RFC, the javadoc, the database planner documentation, or the language specification. Most misconceptions are directly contradicted by the official documentation of the very technology involved.
  6. Separate transport from delivery, average from worst case, isolation from autonomy. Many claims fail because two adjacent concepts were merged into one word.

Repeat the audit periodically. Beliefs decay as tools change: a claim that was true for Python 2 dictionaries (pre-hash-randomization) becomes false for an adversarial workload on Python 3 unless the sentence names the version and the protections.

Inventory

#FileClaimVerdictCore correction
1hash-lookup-o1“Hash-table lookup is always O(1)”FalseO(1) is the expected cost under uniform hashing; worst case is O(n), and resizing pauses are real
2more-threads-faster“Adding more threads always improves performance”FalseUseful parallelism is bounded by the parallelizable fraction and by contention points
3indexes-always-faster“Indexes always make databases faster”Context-dependentIndexes trade write amplification and planner dependence for selective-read speed
4tcp-guarantees-delivery“TCP guarantees the application receives the data”FalseTCP guarantees ordered delivery to the socket buffer while the connection lives, not delivery to the application
5deadlock-requires-cpu“A deadlock involves heavy CPU usage”FalseDeadlocked threads are blocked and consume near-zero CPU; liveness failures have distinct CPU signatures
6recursion-always-slower“Recursion is always slower than iteration”Context-dependentWithout tail-call optimization deep recursion pays stack costs; with it, recursion compiles to a loop
7cache-always-improves“A cache always improves performance”IncompleteCaching pays off only under locality, reuse, sufficient hit rate, and tolerance for staleness
8process-full-isolation“A process is completely isolated from other processes”FalseProcess isolation is strong address-space isolation, not total isolation: kernel, filesystem, IPC, and side channels remain shared
9consistency-availability-partition“A distributed system can always provide consistency and availability during a partition”FalseGilbert–Lynch 2002 proves C and A cannot both hold under partition; PACELC extends the tradeoff
10average-case-complexity“Good average-case complexity guarantees good real-world performance”IncompleteAverages are over a distribution; adversarial inputs, tails, and constants decide real-world outcomes
11big-o-is-speed“O(n log n) always beats O(n²)”FalseBig-O is an asymptotic statement; at real sizes constants and input shape decide the race
12https-means-secure“The padlock means this site is safe”FalseTLS authenticates a domain and protects a transport; it says nothing about operator, content, or application safety
13ssd-ignores-io-patterns“SSDs make I/O patterns irrelevant”IncompleteRandom-write amplification and fsync behavior still dominate sustained writes and durability on flash
14gc-means-no-leaks“GC languages can’t leak”FalseLeaks are unbounded reachable-but-unused memory; collectors manage reachability, not intent
15containers-are-vms“Containers are lightweight virtual machines”FalseNamespaces and cgroups share the host kernel; the isolation boundary differs in kind, not degree
16relational-dbs-dont-scale“You must leave SQL to scale”FalseSQL systems run at planetary scale; scaling limits are per-system engineering choices, not the relational model
17more-replicas-more-consistency“More replicas = more reliable and more consistent”FalseAsync replicas widen staleness; quorum math decides consistency, not copy count
18bandwidth-fixes-latency“More bandwidth will make it faster”Context-dependentBandwidth fixes throughput-bound work; RTT-bound work needs fewer round trips
19async-await-parallelism“async/await makes my code run in parallel”Falseasync/await provides I/O concurrency on one thread; parallelism needs workers, processes, or a multithreaded runtime pool
20encryption-means-authenticated“It’s encrypted, so it can’t be tampered with”FalseCiphers provide confidentiality only; malleability and padding oracles make integrity an AEAD/MAC job
21udp-cannot-be-reliable“UDP is unreliable, so serious applications can’t use it”FalseReliability is a layer you choose to build (QUIC/HTTP-3, netcode, DNS retries); TCP’s ordering has costs
22crc-equality-means-file-equality“The checksums match, so the file is intact/identical”IncompleteCRC equality detects accidental damage; adversarial collisions are algebra, and only keyed digests authenticate
23single-threaded-languages-cant-parallelize“Node.js/Python can’t use multiple cores”FalseWorkers, processes, GIL-releasing native code, and free-threaded builds move work to other cores
24immutability-means-thread-safe“final/const/immutable fields make this thread-safe”IncompleteDeep immutability plus safe publication is the real theorem; the keywords deliver only half
25averages-summarize-latency“Average latency is a good performance metric”IncompleteMeans hide tails and multimodality; percentiles from merged histograms represent user experience
26green-tests-mean-correct“All tests pass, so the code is correct”FalseA suite samples the behavior space; green proves only that sampled, asserted behavior matched expectations — sampling, oracle, and assertion-strength gaps remain
27backups-mean-recovery“We have backups, so we can recover”IncompleteRecovery is a capability, not an artifact: tested restore path, RTO/RPO arithmetic, consistency under a running engine, and independence from the failure
28corruption-would-be-loud“If data gets corrupted, something would crash or error”FalseBit rot, lost writes, and torn writes yield valid-looking wrong data; loudness is purchased per layer, and only end-to-end checks cover meaning
29high-throughput-means-low-latency“The system does 50k req/s, so responses are fast”FalseLatency follows queueing (Little’s Law), not the rate record; saturation pins throughput flat while waiting grows unbounded
30dashboards-mean-observability“We have dashboards, so we are observable”IncompleteObservability is the ability to ask new questions of production; dashboards are frozen answers over pre-aggregated, cardinality-capped series
31coverage-means-tested“90% code coverage means the code is well tested”FalseCoverage measures execution, not assertion strength; mutation scoring measures the gap, and the uncovered residue maps the expensive paths
32jwt-is-encrypted“JWTs are secure because they’re encrypted”FalseA JWT is base64url-encoded and typically signed (JWS), not encrypted (JWE); payloads are readable by anyone holding the token, and alg confusion invites forgery
33encryption-at-rest-means-access-control“The data is encrypted at rest, so access is controlled”IncompleteAt-rest encryption protects the medium, not the credential path; authorization and key policy are separate access-control surfaces
34rollback-means-undo“We can always roll back the deploy, so the change is reversible”IncompleteRollback reverts the artifact, not the world: migrations, side effects, caches, and contracts survive; expand-contract manufactures the reversibility the button promises
35stateless-means-no-state“Our microservices are stateless, so scaling is trivial”IncompleteState moved, not vanished: backing stores concentrate it, saturate first, and affinity returns through cache locality
36load-test-proves-production“We load-tested at 2x peak, so production is safe”FalseA load test bounds collapse points for a synthetic workload on a named environment; parity gaps, traffic shape, and coordinated omission void the certificate
37the-network-is-reliable“The network is reliable”FalseThe first fallacy of distributed computing: loss, delay, duplication, and partition are ordinary events; reliability is engineered at the endpoints (timeouts, retries, idempotency, quorums)
38transactions-span-services-safely“A transaction spans the services, so it all commits or rolls back together”FalseA transaction ends at the resource manager that logs it; HTTP calls and broker publishes commit outside any rollback — outbox and sagas manufacture cross-service atomicity
39base64-is-encryption“It’s base64-encoded, so it’s encrypted”FalseBase64 is a keyless, reversible encoding (RFC 4648); secrecy needs a keyed transform, and one command decodes the “protected” value
40uuids-are-unguessable“UUIDs are unguessable, so exposing them in URLs is safe”IncompleteUnguessability belongs to the entropy source, not the format: v4 from a CSPRNG holds, v1 leaks time and node, v3/v5 are computed, and no identifier is an authorization system
41orm-prevents-injection“We use an ORM, so SQL injection is handled”IncompleteThe ORM parameterizes the queries it generates; raw fragments, identifier positions like ORDER BY, and second-order reuse of stored strings bypass it
42localhost-means-loopback“localhost means the loopback interface, so it stays on this machine”IncompleteThe reservation is real (127/8, ::1, RFC 6761), but address family, network namespaces, hosts files, and the bind-versus-dial privacy inversion each carry preconditions
43queues-guarantee-ordering“The queue guarantees ordering”IncompleteBrokers preserve order within a scope (partition, message group) up to first delivery; producer retries, worker concurrency, redelivery, and replay reorder application
44regex-can-parse-html“A regex can parse HTML”FalseRegular languages cannot match unbounded nesting; real HTML parsing needs the WHATWG error-recovery algorithm, and regexes match tokens, not trees

Coverage Ledger

FileTopic areaVerdictStatusWord count
index.mdTaxonomy and audit method—Written~2,120
hash-lookup-o1.mdData structuresFalseWritten~1,420
more-threads-faster.mdConcurrencyFalseWritten~1,420
indexes-always-faster.mdDatabasesContext-dependentWritten~1,360
tcp-guarantees-delivery.mdNetworkingFalseWritten~1,320
deadlock-requires-cpu.mdConcurrency, OSFalseWritten~1,290
recursion-always-slower.mdAlgorithms, languagesContext-dependentWritten~1,440
cache-always-improves.mdSystems, cachingIncompleteWritten~1,460
process-full-isolation.mdOperating systems, securityFalseWritten~1,420
consistency-availability-partition.mdDistributed systemsFalseWritten~1,450
average-case-complexity.mdAlgorithms, performanceIncompleteWritten~1,420
big-o-is-speed.mdAlgorithmsFalseWritten~1,630
https-means-secure.mdSecurity, networkingFalseWritten~1,820
ssd-ignores-io-patterns.mdStorage, systemsIncompleteWritten~1,860
gc-means-no-leaks.mdLanguages, memoryFalseWritten~1,810
containers-are-vms.mdOperating systems, cloudFalseWritten~1,760
relational-dbs-dont-scale.mdDatabases, distributedFalseWritten~1,700
more-replicas-more-consistency.mdDistributed systems, replicationFalseWritten~1,600
bandwidth-fixes-latency.mdNetworking, performanceContext-dependentWritten~1,930
async-await-parallelism.mdLanguages, concurrencyFalseWritten~2,330
encryption-means-authenticated.mdSecurityFalseWritten~2,360
udp-cannot-be-reliable.mdNetworkingFalseWritten~2,330
crc-equality-means-file-equality.mdStorage, securityIncompleteWritten~2,420
single-threaded-languages-cant-parallelize.mdLanguages, concurrencyFalseWritten~2,310
immutability-means-thread-safe.mdConcurrency, languagesIncompleteWritten~2,510
averages-summarize-latency.mdPerformance, observabilityIncompleteWritten~2,440
green-tests-mean-correct.mdTesting, correctnessFalseWritten~2,360
backups-mean-recovery.mdStorage, operations, recoveryIncompleteWritten~2,380
corruption-would-be-loud.mdStorage, integrityFalseWritten~2,330
high-throughput-means-low-latency.mdPerformance, queueingFalseWritten~2,320
dashboards-mean-observability.mdObservability, operationsIncompleteWritten~2,350
coverage-means-tested.mdTesting, metricsFalseWritten~2,400
jwt-is-encrypted.mdSecurity, tokensFalseWritten~2,320
encryption-at-rest-means-access-control.mdSecurity, storage, access controlIncompleteWritten~2,350
rollback-means-undo.mdDeployments, databases, operationsIncompleteWritten~2,310
stateless-means-no-state.mdArchitecture, scaling, stateIncompleteWritten~2,300
load-test-proves-production.mdTesting, performance, reliabilityFalseWritten~2,310
the-network-is-reliable.mdNetworking, distributed systemsFalseWritten~2,370
transactions-span-services-safely.mdDistributed systems, transactionsFalseWritten~2,500
base64-is-encryption.mdSecurity, encodingFalseWritten~2,340
uuids-are-unguessable.mdSecurity, identifiersIncompleteWritten~2,430
orm-prevents-injection.mdSecurity, databasesIncompleteWritten~2,350
localhost-means-loopback.mdNetworking, containersIncompleteWritten~2,390
queues-guarantee-ordering.mdMessaging, distributed systemsIncompleteWritten~2,320
regex-can-parse-html.mdParsing, languages, theoryFalseWritten~2,320

The collection stands at forty-four claims after six expansion rounds. The Round 15 candidates tracked in the hub backlog (“HTTPS means safe”, “GC eliminates leaks”, “container == VM”) have since been incorporated as full audits in Round 16, Round 17 added seven more whose thread runs through runtime execution models (async/await, the GIL, immutability), transport and cipher guarantees (UDP, encryption, checksums), and measurement discipline (latency averages), and Round 18 added seven whose thread runs through evidence and verification (green suites, coverage, dashboards, backups), measured versus experienced performance (throughput versus latency), and the boundary between encoding and protection (silent corruption, JWT structure). Round 19 added five whose thread runs through the boundary between a control and the property it is sold as — encryption versus access control, rollback versus reversibility, statelessness versus scale, a load test versus safety, and the network versus reliability. Round 20 added seven whose thread runs through the gap between a mechanism and the guarantee borrowed from it — transaction boundaries versus service atomicity, encoding versus encryption, identifier format versus entropy, ORM parameterization versus injection coverage, a name versus the address it resolves to, broker scope order versus end-to-end order, and regular expressions versus nested structure. The remaining backlog candidate (advisory locks prevent all race conditions) stays tracked at the hub, to keep every entry fully argued rather than enumerated.

Cross-References