Install WordPress on GoDaddy Shared Hosting One Billion PCs
Jun 17


As any experienced computer programmer knows, there are unwritten laws that govern software development. However there are no penalties for breaking these laws; rather, there is often a reward. Following are 21 Laws of Computer Programming:




  1. Any given program, once deployed, is already obsolete.
  2. It is easier to change the specification to fit the program than vice versa.
  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. Only ten percent of the code in any given program will ever execute.
  6. Software expands to consume all available resources.
  7. Any non-trivial program contains at least one error.
  8. The probability of a flawless demo is inversely proportional to the number of people watching, raised to the power of the amount of money involved.
  9. Not until a program has been in production for at least six months will its most harmful error be discovered.
  10. Undetectable errors are infinite in variety, in contrast to detectable errors, which by definition are limited.
  11. The effort required to correct an error increases exponentially with time.
  12. Program complexity grows until it exceeds the capabilities of the programmer who must maintain it.
  13. Any code of your own that you haven’t looked at in months might as well have been written by someone else.
  14. Inside every small program is a large program struggling to get out.
  15. The sooner you start coding a program, the longer it will take.
  16. A carelessly planned project takes three times longer to complete than expected; a carefully planned project takes only twice as long.
  17. Adding programmers to a late project makes it later.
  18. A program is never less than 90% complete, and never more than 95% complete.
  19. If you automate a mess, you get an automated mess.
  20. Build a program that even a fool can use, and only a fool will want to use it.
  21. Users truly don’t know what they want in a program until they use it.



Copyright © 2007-8 Tiwebb Ltd. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without explicit permission from Tiwebb Ltd.

26 Responses to “21 Laws of Computer Programming”

  1. Jo Says:

    #16 is ambiguous: is it twice as long as expected, or twice as long as the carelessly planned project?

  2. Arjan`s World » LINKBLOG for June 17, 2008 Says:

    [...] 21 Laws of Computer Programming - DevTopics Humoristic list with an undertone of reality [...]

  3. timm Says:

    Hi Jo, LOL, spoken like a true programmer! Must have unambiguous specifications!

    The ambiguity is resolved with the word “only,” which implies that the “twice as long” refers to “than expected,” not 2 x 3 = 6. ;-)

  4. Regan Johnson Says:

    Too true! Thanks for the list.

  5. tim Says:

    these aren’t laws, they’re someone’s opinions of laws.

    sorry, i know this is supposed to be funny, but this is the last blog article “top # of xyz” where I stay quiet

  6. timm Says:

    Having a bad day, tim?

  7. xman Says:

    all true…

  8. web design company Says:

    Murphy s law applied to programming!

  9. mikedopp - Mikes Links Monday 6/23/08 Says:

    [...] 21 laws of computer programming [...]

  10. UtopiaPlanetia » 21 laws of computer programming Says:

    [...] Taken from: http://www.devtopics.com/21-laws-of-computer-programming/ [...]

  11. Lunis Says:

    @tim

    They’re not interpretations. Any programmer knows that these are all true, sadly.

  12. G Says:

    Jo,
    [In response to #16 ambiguity]
    the usage of the word ‘only’ suggests that the later is less than the former, so I’d say it’s “twice as long as expected”

  13. Fredrik Says:

    “#17 Adding programmers to a late project makes it later.”

    LOL

  14. abev Says:

    It’s good to read these things coming from someone else. I ran into many of these problems and I just thought I sucked.

  15. Ashish Says:

    Humorous, witty, and true. You were creative and thorough to analyze and extract the concealed truth and especially were able define it intelligently. Thumbs up!!!

  16. paresh Says:

    nice useful list.

  17. Las 21 leyes de la programación « Comunidad de Investigación de Software Libre de la USS Says:

    [...] el blog “DevTopics“, he encontrado estas 21 leyes de la programación, que ciertamente muchos desarrolladores de [...]

  18. Celina Says:

    20 made me laugh really and I also agree to 21 coz my clients always change their mind as soon as something is achieved as a deliverable

  19. yamuna Says:

    really nice

  20. Shycon Design Says:

    Haha, thanks, that made me laugh… and cry at the same time.

  21. Anne Says:

    Wow. Good to know since I plan to get into programming.

  22. Pascal Says:

    not bad. I like the part about the obsolete statement, very satirical.

    Check this out for learning programming languages:
    http://www.codesplunk.com

  23. Tim D Says:

    My two favs are any code you haven’t looked at in a month might as well have been written by someone else. - I’m always going back and looking at things I coded 3 months ago or more and it takes me a while just to figure out how I did what I did and then another while to figure out why.

    The second fav is if you automate a mess all you get is an automated mess. - So so true. If a process isn’t working making it go faster doesn’t solve the problem.

  24. Jeffrey Nonken Says:

    #6 is actually an extension of Parkinson’s Law. http://en.wikipedia.org/wiki/Parkinson’s_law

    #17 is covered in the Mythical Man Month. The author is serious.

    #13: I’ve learned to comment my code extensively. I pretend that in six months somebody will have to work on the code again, and that it might be me. If it isn’t me, I’ll have to stop whatever I AM working on to answer questions.

    It’s true often enough to continue to motivate me.

    I’ve gotten high praise for the quality of my commenting.

    #15 is just a corollary of #6.

    #19 is covered in Code Complete 2, in a fashion. He urges you to get your code working RIGHT before worrying about getting it working FAST. If you optimize bad code you’ll end up with fast, bad code, and you’ll just end up throwing away all the effort along with the optimized code.

    Sorry if I seem to be picking on this list, I’m really not. It’s a pretty good list and funny. It’s just that after 3 decades of programming I’ve learned most of these laws the hard way. :)

  25. Thursday Links Roundup #6 - Putting Blogs First Says:

    [...] 21 Laws of Computer Programming - Unwritten ‘Laws’ of programming. [...]

  26. » 21 Laws of Computer Programming | oscarstech.com Says:

    [...] visit this link to see the rest. [...]

Leave a Reply