Contents

Software Principles

Security: The principle that every syntactically incorrect program should be rejected by the compiler and that every syntactically correct program should give a result or an error message that was predictable and comprehensible in terms of the source language program itself. Thus no core dumps should ever be necessary. It was logically impossible for any source language program to cause the computer to run wild, either at compile time or at run time. A consequence of this principle is that every occurrence of every subscript of every subscripted variable was on every occasion checked at run time against both the upper and the lower declared bounds of the array. Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to - they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980, language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law.

From The Emperor’s Old Clothes, By C.A.R. Hoare, Communications of the ACM, 1981.

Postel’s Law “Be conservative in what you send, liberal in what you accept.”

Pareto Principle “For many phenomena, 80% of consequences stem from 20% of the causes.”

Sturgeon’s Revelation “Ninety percent of everything is crud.”

Hofstadter’s Law “A task always takes longer than you expect, even when you take into account Hofstadter’s Law.”

Murphy’s Law “If anything can go wrong, it will.”

Brook’s Law “Adding manpower to a late software project makes it later.”

Conway’s Law “Any piece of software reflects the organizational structure that produced it”

Kerchkhoff’s Principle “In cryptography, a system should be secure even if everything about the system, except for a small piece of information — the key — is public knowledge.”

Linus’s Law “Given enough eyeballs, all bugs are shallow.”

Reed’s Law “The utility of large networks, particularly social networks, scales exponentially with the size of the network.”

Moore’s Law “The power of computers per unit cost doubles every 24 month.”

Wirth’s law “Software gets slower faster than hardware gets faster.”

Zawinski’s Law “Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.”

Fitt’s Law “The time to acquire a target is a function of the distance to and the size of the target.”

Hick’s Law “The time to make a decision is a function of the possible choices he or she has.”

Occam’s Razor ““Among competing hypotheses, the one with the fewest assumptions should be selected.””

Hanlon’s Razor ““Never attribute to malice what can be adequately explained by stupidity.””

Peter Principle “The selection of a candidate for a position is based on the candidate’s performance in their current role, rather than on abilities relevant to the intended role.”

Hofstadter’s Law “It always takes longer than you expect, even when you take into account Hofstadter’s Law.”

The 90–90 Rule “The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time.”

Sayre’s Law “In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake.”

Release early, release often.
Do One Thing and Do It Well - Single responsibility.
You aren’t gonna need it.
Good is the enemy of perfect.
People are part of the system. The design should match the user’s experience, expectations, and mental models.
A Software System should have a single source of truth.
Don’t repeat yourself.
A replicated piece of code should be replaced by a new procedure, if it is repeated for more than three times.
Keep it simple and strightforward.
Conventions over Configuration.
Allow none of foo, one of foo, or any number of foo.
Worse is better, bazzar over the cathedral.
Make it run. Make it fast. Make it beautiful. Make it secure.
Avoid Hasty Abstractions.
Program to an interface and keep interfaces simple. Modules and functions should have the least knowledge about the internals of another.

Unix

UNIX is simple. But It just needs a genius to understand its simplicity.

–Dennis Ritchie

Before software can be reusable, it first has to be usable.

–Ralph Johnson

Good judgment comes from experience, and experience comes from bad judgment.

–Fred Brooks

It’s hard enough to find an error in your code when you’re looking for it; It’s even harder when you’ve assumed your code is error-free.

– Steve McConnell (Code Complete)

You can either have software quality or you can have pointer arithmetic; You cannot have both at the same time.

–Bertrand Meyer

There are two ways to write error-free programs; only the third works.

–Alan J. Perlis

Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

–Bill Gates

The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

–Tom Cargill

Programmers are in a race with the Universe to create bigger and better idiot-proof programs. The Universe is trying to create bigger and better idiots. So far the Universe is winning.

–Anon

Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why it works. Programmers combine Theory and Practice: Nothing works and they don’t know why.

–Anon

The Six Phases of a Project:

  • Enthusiasm

  • Disillusionment

  • Panic

  • Search for the Guilty

  • Punishment of the Innocent

  • Praise for non-participants

–Anon