Steven's Knowledge

Fundamentals

The basic units of code — names, functions, classes, variables, comments, and formatting

Fundamentals

The basic units engineers spend most of their day inside. Get these right and most other code-quality problems shrink; get them wrong and no amount of architecture can compensate.

Topics

  • Naming — Choosing names that survive review, refactor, and time.
  • Functions — Cohesion, parameters, return values, and the right level of abstraction.
  • Classes — Class size, single responsibility, encapsulation, and composition.
  • Variables — Scope, lifetime, mutability, and initialization.
  • Comments — What deserves a comment, what does not, and what to write instead.
  • Formatting — Vertical and horizontal layout, file organization.

On this page