rob-pike

Installation
SKILL.md

Rob Pike's 5 Rules of Programming

The Rules

  1. You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places. Don't guess — prove it.
  2. Measure. Don't tune for speed until you've measured. Even then, don't unless one part of the code overwhelms the rest.
  3. Fancy algorithms are slow when n is small, and n is usually small. Big-O doesn't matter when constants dominate. Use Rule 2 first.
  4. Fancy algorithms are buggier than simple ones. Use simple algorithms and simple data structures.
  5. Data dominates. Choose the right data structures and the algorithms become self-evident. "Write stupid code that uses smart objects."

How to Apply

Before Any Optimization

Step 0: Check for Existing Instrumentation

Before asking "have you measured?", determine whether measurement is even possible right now.

Scan the codebase for signs of existing instrumentation:

Related skills

More from tmdgusya/engineering-discipline

Installs
35
GitHub Stars
76
First Seen
Mar 31, 2026