Building Software

Engineering Fundamentals for the Agent Era

Contents

4

Math and Algorithms

Why it matters when agents do the typing

Every claim about correctness, speed or cost needs a check that does not depend on trusting its source, and math is the check you carry with you. Logic lets you reason about conditions and proofs, complexity tells you how code will scale before real data arrives, and statistics tells you whether a benchmark, a metric or an eval score means anything. Language models are probabilistic by construction, so reasoning about chance is part of everyday engineering.

  1. Logic and Discrete Math

    Boolean logic, proof, sets, relations and graphs: the structures underneath conditions, databases, permissions and dependency systems.

    A mistake it teaches you to catch: An inverted or incomplete condition, such as a less-than where less-than-or-equal was needed, or a compound check negated incorrectly.

    Depth: explain
  2. Core 7

    Algorithms, Data Structures and Complexity

    How the choice of algorithm and data structure decides whether code scales, and how to read that from the code before it meets real data.

    A mistake it teaches you to catch: A nested loop over two lists, taking quadratic time, where a hash map lookup would make it linear.

    Depth: do
  3. Probability and Statistics

    Distributions, sampling, variance and significance: the tools for judging whether a measurement, an experiment or an eval result means anything.

    A mistake it teaches you to catch: Average latency reported while a slow tail, which most users hit at least once per session, stays hidden.

    Depth: explain
  4. Back-of-the-Envelope Estimation

    Quick order-of-magnitude math for storage, throughput, latency, cost and time, done before building so bad designs fail on paper.

    A mistake it teaches you to catch: A design that needs tens of thousands of writes per second from a single database node sized for a few thousand.

    Depth: do