Cosmic Module

S

Qubits of DPK

March 30, 2026

Core SWE @ Google
This chapter introduces the core philosophy behind modern large-scale software development.
The main message of this chapter is simple:
Software engineering is not just about writing code.
Many people think programming and software engineering are the same thing.
This chapter explains why they are very different.

Programming vs Software Engineering

Programming

Programming means writing code to solve a problem.
Example:
You write a small script that calculates monthly expenses.
Once the script works, the job is done.

Characteristics of Programming

  • Short-term solution
  • Usually written by one person
  • Minimal maintenance required
  • Focus on solving a problem immediately

Software Engineering

Software engineering focuses on building systems that will:
  • survive for many years
  • be used by millions of people
  • be modified by many engineers
  • continue evolving over time

Example

Imagine building software like:
  • Gmail
  • Google Search
  • Amazon
  • Netflix
These systems cannot be written once and forgotten.
They must be continuously improved and maintained.

The Restaurant Analogy

A simple way to understand the difference:
Programming is like cooking a meal for yourself.
Software engineering is like running a restaurant.
In a restaurant:
  • many chefs cook food
  • recipes must stay consistent
  • processes must be documented
  • new chefs must understand the system
Similarly, software engineering requires systems that many engineers can understand and maintain.

The Three Fundamental Challenges of Software Engineering

Google identifies three main pressures that shape software engineering decisions:
  1. #
    Time
  2. #
    Scale
  3. #
    Tradeoffs
Every engineering decision must consider these three forces.

1. Time

Software is rarely temporary.
Most systems continue evolving for many years.

Example

A feature written today might still exist in the system 10 or 20 years later.
Future engineers who did not write the original code will need to:
  • read it
  • understand it
  • modify it

Why Time Matters

If code is difficult to understand, the cost of maintaining it increases.
Poor code causes problems like:
  • bugs during modifications
  • slow development
  • fragile systems
Therefore engineers should write code that is:
  • clear
  • simple
  • maintainable

2. Scale

Large systems operate at massive scale.
Scale appears in multiple ways.

Example of Scale Problems

Imagine a library used by thousands of services.
If a developer accidentally changes the behavior of that library:
  • thousands of systems may break
  • multiple teams may be affected
This is why large organizations emphasize careful design and testing.

3. Tradeoffs

Engineering decisions always involve tradeoffs.
There is no perfect architecture.
Improving one aspect of a system often makes another aspect worse.

Example Tradeoffs

Good engineers evaluate these tradeoffs carefully before making decisions.

Hyrum’s Law

One of the most important principles introduced in this chapter.

Definition

With enough users of an API, every observable behavior will eventually be depended on by someone.

Example

Imagine an API:
java
QUBITS OF DPK
1List<User> getUsers()
Suppose the function returns users sorted alphabetically, even though this behavior was never documented.
Developers may start relying on this ordering.
Later, if the sorting behavior changes, their systems break.

The Lesson

If people can observe a behavior, someone will eventually depend on it.
Therefore engineers must assume that all observable behavior becomes part of the API contract.

Software Engineering as Programming Over Time

A key idea introduced in this chapter is:
Software engineering is programming integrated over time.
This means software must support:
  • continuous improvement
  • evolving requirements
  • new technologies
  • new engineers joining the project
Systems must be designed to adapt safely to change.

Why Maintainability Is Critical

Maintainability determines whether software can evolve successfully.
Maintainable systems have:
  • clear structure
  • readable code
  • good documentation
  • strong testing
Without maintainability, systems become fragile and difficult to change.

Key Principles from Chapter 1

This chapter establishes several foundational ideas.

1. Software engineering is different from programming

Programming solves problems immediately.
Software engineering ensures systems survive long-term.

2. Time affects every system

Code written today must remain understandable years later.

3. Scale introduces complexity

Large systems must support many users and many engineers.

4. Engineering decisions involve tradeoffs

There is no universally perfect architecture.

5. API behavior becomes dependencies

Hyrum’s Law shows that every observable behavior may become relied upon.

Simple Summary (For Non-Technical Readers)

Software engineering is about building systems that:
  • last for many years
  • can be maintained by many people
  • work reliably at large scale
  • adapt to change without breaking
The goal is not just to make software work today, but to ensure it continues working tomorrow.