All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Rob Pike's Five Essential Rules for Effective Programming

By

vismit2000

2mo ago· 2 min readen

Summary

The article presents Rob Pike's five rules of programming, which emphasize practical software development principles. The rules focus on avoiding premature optimization, measuring performance before tuning, using simple algorithms for typical cases, and understanding that simplicity often outperforms complexity. The rules are distilled from decades of programming experience and echo Tony Hoare's famous maxim about premature optimization being the root of all evil.

Key quotes

· 4 pulled
You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don't try to second guess and put in a speed hack until you've proven that's where the bottleneck is.
Measure. Don't tune for speed until you've measured, and 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. Fancy algorithms have big constants. Until you know that n is frequently going to be big, don't get fancy.
Premature optimization is the root of all evil.
Snippet from the RSS feed
Pike's rules 1 and 2 restate Tony Hoare's famous maxim "Premature optimization is the root of all evil."

You might also wanna read