Anton Kosterin
guest
guest
The third episode focuses on documentation and naming. Self-documenting code does not eliminate comments: code shows machine action but rarely preserves reasons, constraints, and rejected alternatives. If an interface requires reading its implementation, the abstraction has leaked.
The speakers examine familiar excuses: no time, stale comments, and useless prose. The author treats comments as a design investment because rebuilding context years later costs more. High-level comments change less often and explain behavior, agreements, and nonobvious relationships.
The four levels are interface, data structure, implementation, and cross-module context. Useful prose adds what code cannot reveal. Naming serves the same purpose: a precise, consistent name builds the reader's model. The two meanings of block show how a vague word expands a bug search.
Write Comments First turns documentation into a design tool. Describe the contract, parameters, return value, exceptions, and logic before implementation. This draft exposes an awkward interface before code exists. When the system changes, review comments with implementation; high-level explanations need fewer edits.