Laws of Programming

In any field, there is a lot of hard-won knowledge that the more experienced attempt to impart to those with less experience. Depending on the field, these things may be expressed as old sayings, or laws. They typically aren’t really hard and fast rules, but rather are general tendencies that have been observed over time. Programming, like any other field, has those and many of them are well worth learning.

Episode Breakdown

08:24 Pareto Principle

For many phenomena, 80% of consequences come from 20% of the causes.

09:28 Parkinson’s Law

Work expands to fill the time available for its completion. Also known as the law of bikeshedding.

10:33 Haack’s Law

Work expands to overflow the time available and spill on the floor leaving a very sticky mess.

12:45 Peter Principle

In a hierarchy, every employee tends to rise to their level of incompetence.

14:17 Murphy’s Law

“At any time BJ’s laptop is open Windows will be updating.”

Anything that can go wrong, will go wrong.

16:38 Brook’s Law

Adding manpower to a software project will make it later.

18:59 Linus’s Law

Given enough eyeballs, all bugs are shallow.

20:59 Kerchkohoff’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.

22:14 Conway’s Law

Any piece of software reflects the organizational structure that produced it.

26:26 Moore’s Law

The power of computers doubles every 24 months OR The number of transistors on an integrated circuit board will double in about 18 months.

27:56 Wirth’s Law

Software gets slower faster than hardware gets faster.

28:24 Zawinski’s Law

Every program expands until it can read mail. Those programs which cannot so expand are replaced by those which can.

30:51 Fitt’s Law

The time to acquire a target is a function of the distance to and the size of the target. This is why the corners and edges of windows are so important, as it makes their “size”, for the purposes of navigation, infinite.

31:56 The 99 Rule

The first 90% of the code takes 10% of the time. The remaining 10% takes the other 90% of the time.

33:00 Knuth’s Optimization Principle

Premature optimization is the root of all evil.

34:02 Hofstadter’s Law

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

34:47 Law of Demeter

This is also known as the law of least coupling. Each unit should have only limited knowledge about other units: only units “closely” related to the current unit. Each unit should only talk to its friends; don’t talk to strangers.

36:48 Hanlon’s Razor

“We shave with Hanlon’s Razor”

Never ascribe to malice that which can adequately be explained by stupidity.

38:00 Dunning-Kruger Effect

Unskilled persons tend to mistakenly assess their own abilities as being much more competent than they actually are.

39:05 Postel’s Law

Be conservative in what you do, be liberal in what you accept from others.

“In interpersonal relationships, this also applies.”

39:48 Eagleson’s Law

Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.

41:44 Dilbert’s Law

Incompetent workers will be promoted above competent workers to managerial positions, thus removing them from the actual work and minimizing the damage they can do.

43:39 Sayre’s Law

In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake.

45:54 The Abstraction Principle

Each significant piece of functionality in a program should be implemented in just one place in the source code. Where similar functions are carried out by distinct pieces of code, it is generally beneficial to combine them into one by abstracting out the varying parts.

46:53 KISS Principle

“Don’t make it more complex than it has to be to make it useful.”

Keep it simple, stupid.

49:30 Brandolini’s Law

The amount of energy needed to refute false statements is an order of magnitude bigger than to produce it.

IoTease: Product

Sensibo

Sensibo is smart controls to allow you to control your heating and cooling through your smart phone. It works with just about any type of unit (wall, portable, and even central). You can set up a 7 day schedule for your system or set it up to turn on as you get close to your home. It’s an interesting product for if you want a smart house without tearing out all the insides of your home.

Tricks of the Trade

Understand Frame. Pull other people into your frame if you want control of a situation, don’t acquiesce to theirs.

Editor’s Notes:

Tagged with: , , , , , , , , , , , , , , ,
One comment on “Laws of Programming
  1. Neil Whitlow says:

    I hope you guys are happy.

    I was catching up on this episode today, and after your Google+ burn, you caused me to actually press that icon on my phone for the first time in over a year just to follow you 🙂 G+, a virtual wasteland indeed.

    Maybe if you could make it auto play midi files and have sparkly backgrounds like MySpace, then it would be more popular.

    Love the podcast.

Enjoy the show? Let us know in the comments.