# Laws of Computer Programming

*2007-01-18*

> A collection of humorous programming laws about obsolete software, endless bugs, documentation, maintenance, and late projects.

1. Any given program, when running, is obsolete.

2. Any given program costs more and takes longer.

3. If a program is useful, it will have to be changed.

4. If a program is useless, it will have to be documented.

5. Any program will expand to fill available memory.

6. The value of a program is proportional to the weight of its output.

7. Program complexity grows until it exceeds the capabilities of the programmer who must maintain it.

8. Any non-trivial program contains at least one bug.

9. Undetectable errors are infinite in variety, in contrast to detectable errors, which by definition are limited.

10. Adding manpower to a late software project makes it later.

**Lubarsky’s Law of Cybernetic Entomology:** There’s always one more bug.

**Shaw’s Principle:** Build a system that even a fool can use, and only a fool will want to use it.

**Woltman’s Law:** Never program and drink beer at the same time.

**Gallois’ Revelation:** If you put tomfoolery into a computer, nothing comes out but tomfoolery. But this tomfoolery, having passed through a very expensive machine, is somehow enobled, and no one dares to criticize it.

Original source: [Laws of Computer Programming](http://members.safe-t.net/jwalker/programming/lawsOfComputerPrograming.html) [Wayback Machine](https://web.archive.org/web/20080308084347/https://members.safe-t.net/jwalker/programming/lawsOfComputerPrograming.html)

