rob-pike
Installation
SKILL.md
Rob Pike's 5 Rules of Programming
The Rules
- You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places. Don't guess — prove it.
- Measure. Don't tune for speed until you've measured. Even then, don't unless one part of the code overwhelms the rest.
- 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.
- Fancy algorithms are buggier than simple ones. Use simple algorithms and simple data structures.
- 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
Stop and ask these questions in order: