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:
- Any given program, once deployed, is already obsolete.
- It is easier to change the specification to fit the program than vice versa.
- If a program is useful, it will have to be changed.
- If a program is useless, it will have to be documented.
- Only ten percent of the code in any given program will ever execute.
- Software expands to consume all available resources.
- Any non-trivial program contains at least one error.
- 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.
- Not until a program has been in production for at least six months will its most harmful error be discovered.
- Undetectable errors are infinite in variety, in contrast to detectable errors, which by definition are limited.
- The effort required to correct an error increases exponentially with time.
- Program complexity grows until it exceeds the capabilities of the programmer who must maintain it.
- Any code of your own that you haven’t looked at in months might as well have been written by someone else.
- Inside every small program is a large program struggling to get out.
- The sooner you start coding a program, the longer it will take.
- A carelessly planned project takes three times longer to complete than expected; a carefully planned project takes only twice as long.
- Adding programmers to a late project makes it later.
- A program is never less than 90% complete, and never more than 95% complete.
- If you automate a mess, you get an automated mess.
- Build a program that even a fool can use, and only a fool will want to use it.
- Users truly don’t know what they want in a program until they use it.
Article published on June 17, 2008
If you like this article, please share it: |
June 17th, 2008 at 2:50 pm
#16 is ambiguous: is it twice as long as expected, or twice as long as the carelessly planned project?
June 17th, 2008 at 3:03 pm
[…] 21 Laws of Computer Programming – DevTopics Humoristic list with an undertone of reality […]
June 17th, 2008 at 6:03 pm
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. 😉
June 19th, 2008 at 1:45 am
Too true! Thanks for the list.
June 19th, 2008 at 8:52 am
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
June 19th, 2008 at 9:05 am
Having a bad day, tim?
June 19th, 2008 at 9:36 am
all true…
June 22nd, 2008 at 6:52 pm
Murphy s law applied to programming!
June 23rd, 2008 at 3:22 am
[…] 21 laws of computer programming […]
June 23rd, 2008 at 3:50 am
[…] Taken from: https://www.devtopics.com/21-laws-of-computer-programming/ […]
June 23rd, 2008 at 11:55 pm
@tim
They’re not interpretations. Any programmer knows that these are all true, sadly.
June 24th, 2008 at 7:51 am
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”
June 25th, 2008 at 1:57 pm
“#17 Adding programmers to a late project makes it later.”
LOL
June 26th, 2008 at 9:26 am
It’s good to read these things coming from someone else. I ran into many of these problems and I just thought I sucked.
June 28th, 2008 at 3:35 pm
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!!!
June 29th, 2008 at 10:41 am
nice useful list.
June 29th, 2008 at 5:18 pm
[…] el blog “DevTopics“, he encontrado estas 21 leyes de la programación, que ciertamente muchos desarrolladores de […]
June 30th, 2008 at 10:30 am
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
July 1st, 2008 at 8:18 am
really nice
July 2nd, 2008 at 10:34 pm
Haha, thanks, that made me laugh… and cry at the same time.
July 4th, 2008 at 4:23 am
Wow. Good to know since I plan to get into programming.
July 21st, 2008 at 9:38 pm
not bad. I like the part about the obsolete statement, very satirical.
Check this out for learning programming languages:
http://www.codesplunk.com
July 23rd, 2008 at 7:10 pm
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.
July 24th, 2008 at 11:38 am
#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. 🙂
August 7th, 2008 at 2:35 am
[…] 21 Laws of Computer Programming – Unwritten ‘Laws’ of programming. […]
August 13th, 2008 at 1:37 pm
[…] visit this link to see the rest. […]
October 28th, 2008 at 1:18 am
89 Ways for You to Become the Coolest Programmer in the World…
Since there are dozens of posts on becoming a better developer, but no single post with all the advice you need, perhaps, you’ll find this short guide useful.
1. Learn the Skills You Need
Learn the programming basics
“The goal of this guide is to b…
February 2nd, 2009 at 2:49 pm
[…] begin with: The 21 Laws of Computer Programming. These laws aren’t hilarious, they will raise a smile or a small chuckle but after that they […]
March 5th, 2009 at 9:10 am
What are the laws which apply to people who use computers at home?
March 14th, 2009 at 3:56 am
You are a Project Manager in a software company that develops customized software products. You are required to deliver an accounting software for a well known organization of the country. One of the subordinates of your team has recently resigned from the job and had joined one of your competitors. You have heard from others that the person who resigned from your team is developing a generic software product which has the same features of the accounting software product that your company is presently developing. It seems that the person who resigned had stolen the source code from your company and is using it in his new workplace.
You are required to act on the suggestions listed below. Marks will be allocated as indicated.
Write down the problems that might occur in the above scenario
May 4th, 2009 at 1:33 pm
ha! good list!
June 9th, 2009 at 3:28 am
Amusing list, but I’m disturbed by the lack of attribution. I’ve seen most of these before, #17 is Brook’s Law, etc. #11 is a bombastic restatement of a commonplace principle – the later you fix a bug the more it costs – but I doubt the “exponentially” could be justified.
August 14th, 2009 at 9:23 am
[…] Laws of Technology Humor, PC Add comments We’ve discussed before the “21 Laws of Computer Programming.” Now PC World has come up with “35 Unwritten Laws of Technology.” Here are some […]
August 25th, 2009 at 5:42 pm
[…] 21 Laws of Computer Programming http://www.devtopics.com/21-laws-of-computer-programming – view page – cached #DevTopics RSS Feed DevTopics » 21 Laws of Computer Programming Comments Feed DevTopics Hello, World Install WordPress on GoDaddy Shared Hosting One Billion PCs — From the page […]
November 11th, 2009 at 10:37 am
I agree with most, except for #5: “Only ten percent of the code in any given program will ever execute.”
If this is so, and it can be measured easily, than not only the code has flaws, but the coder as well. I agree that _some_ code may never run, but is there for “completeness”, but if 90% of your code is not used than you have serious project planning and implementation issues at hand 😉
December 4th, 2009 at 8:24 pm
LOL, I love this list, I especially believe #21. Great list.
December 8th, 2009 at 12:52 pm
LOL How true
December 15th, 2009 at 5:09 pm
#8 Is simply beautiful. I’ll never know how a customer manages to do that with only presence !
January 14th, 2010 at 1:47 pm
I’d love to see a project manager’s face while reading these laws!!!
January 15th, 2010 at 8:52 pm
What are the laws which apply to people who use computers at home?
February 15th, 2010 at 1:36 pm
Thanks these lines r good to explain the computer laws.
March 5th, 2010 at 5:24 am
Hi..
This is good concept
May 26th, 2010 at 2:49 am
I love this list, I especially believe #21. Great list.
June 17th, 2010 at 12:01 pm
[…] el blog "DevTopics", he encontrado estas 21 leyes de la programación, que ciertamente muchos […]
October 5th, 2010 at 9:23 pm
not every one is fit for me, but still thanks.
October 5th, 2010 at 10:34 pm
[…] 任何程序一旦部署即显陈旧。 修改需求规范来适应程序比反过来做更容易。 一个程序如果很有用,那它注定要被改掉。 一个程序如果没用,那它一定会有很好的文档。 任何程序里都仅仅只有10%的代码会被执行到。 软件会一直膨胀到耗尽所有资源为止。 任何一个有点价值的程序里都会有至少一个bug。 原型完美的程度跟审视的人数成反比,反比值会随着涉及的资金数增大。 软件直到被变成产品运行至少6个月后,它最严重的问题才会被发现。 无法检测到的错误的形式无限多样,而能被检测到的正好相反,被定义了的十分有限。 修复一个错误所需要投入的努力会随着时间成指数级增加。 软件的复杂度会一直增加,直到超出维护这个程序的人的承受能力。 任何自己的程序,几个月不看,形同其他人写的。 任何一个小程序里面都有一个巨大的程序蠢蠢欲出。 编码开始的越早,花费的时间越长。 一个粗心的项目计划会让你多花3倍的时间去完成;一个细心的项目计划只会让你多花2倍的时间。 往大型项目里添加人手会使项目更延迟。 一个程序至少会完成90%,但永远完成不了超过95%。 如果你想麻烦被自动处理掉,你得到的是自动产生的麻烦。 开发一个傻瓜都会使用的软件,只有傻瓜愿意使用它。 用户不会真正的知道要在软件里做些什么,除非使用过。 [英文出处]:21 Laws of Computer Programming […]
October 6th, 2010 at 2:00 am
[…] Original post is here. […]
October 7th, 2010 at 2:54 am
[…] Laws of Computer Programming [Citation] Posted on 2010-10-07 by Nocky Original: https://www.devtopics.com/21-laws-of-computer-programming/ ( They may be not all true laws, but all good suggestions worthing to be thinking about. […]
October 11th, 2010 at 4:17 am
[…] [英文出处]:21 Laws of Computer Programming 计算机 ← 给盲目兴奋的程序员们的建议 Leave a comment0 Comments. […]
October 22nd, 2010 at 1:51 am
Amusing list, but I’m disturbed by the lack of attribution. I’ve seen most of these before, #17 is Brook’s Law, etc. #11 is a bombastic restatement of a commonplace principle – the later you fix a bug the more it costs – but I doubt the “exponentially” could be justified.
November 5th, 2010 at 3:52 pm
[…] [英文出处]:21 Laws of Computer Programming [译文出处]:外刊IT评论 […]
December 27th, 2010 at 4:14 am
[…] [英文出处]:21 Laws of Computer Programming This entry was posted in Software Engineering. Bookmark the permalink. ← SQLServer中xxxx用户登录失败的解决方法 成为一名优秀程序员所需要知道的那些事 → LikeBe the first to like this post. […]
January 25th, 2011 at 10:51 am
[…] for the update jdoughs. I always consult this law whenever I make updates or implement something new __________________ Trade Expert icq 437 […]
January 26th, 2011 at 8:36 am
[…] van de praktijkwetten die software-ontwikkelaars hebben geformuleerd, gaan over de merkwaardige neiging van programmatuur […]
February 2nd, 2011 at 1:34 am
[…] 原文:21 Laws of Computer Programming […]
February 12th, 2011 at 12:45 am
[…] [英文出处]:21 Laws of Computer Programming […]
August 24th, 2011 at 12:40 am
Designed for the bring up to date dough’s. I for all time discuss with this commandment on every occasion I compose update or execute amazing fresh.
August 24th, 2011 at 2:21 am
They’re not interpretation. whichever programmer know to facilitate these are all accurate, unhappily.