Tuesday, March 19, 2013

Like any other field, Software and Programming world too has some
interesting and famous rules, principles and laws, which programmers,
developers, managers and architects use often in conversations, meetings and
chats. These laws are either rules, principles, or famous words from great personalities of computer programming world. At the same time these laws are interesting, funny, worth knowing, and few of them are just
amazing to read. I have sharing things which is worth knowing and useful for not only Java programmer but also developers from other programming language e.g. we have seen 10 Object oriented design principles, which is not only useful for Java guys but also with any OOPS programmer. In this article, I am going to share my collection of 10
famous software and computer programming laws, I am sure you would have few more to add
into this list. Please share a computer programming rules, or a thought of wisdom, which is worth knowing among software professional.

10 Famous Computer Programming and Software Laws

1) Moore's law : "The
processing speed of computers will double every two years!"

Yeah, they are adding more cores to chips every year J

2) Amdahl's law : "If
your program is 10% sequential you can get a maximum 10x performance boost by parallelizing
your application"

This is one of best excuse, when a marketing guys suggest another cool
feature. What is yours? Just do it...

6) Knuth's optimization principle : "Premature optimization is the root of all evil"

Still true after so many years and has been re iterated by all authors,
including my favorite, Joshua Bloch in his book Effective Java.

7) Hofstadter's Law : "It
always takes longer than you expect, even when you take into account
Hofstadter's Law"

That's why you must have buffer before you give estimation, Agree?

8) Peter Principle : "In
a Hierarchy Every Employee Tends to Rise to His Level of Incompetence"

Did you read competence at end of sentence? Me too :) Any comments guys?

10) Norvig's Law : “Any
technology that surpasses 50% penetration will never double again (in any
number of months)”

That's all on this list of famous programming laws, rules and principles.
It's good to know these world famous words, can be used to show off bit, or
make an intelligent comment on meetings. By the way, let us know which one is
your favorite computer programming law?

I think the 4th law is stated wrongly here because it doesn't make sense. It should be something like this "The first 90% of the code takes 10% of the time. The remaining 10% takes the other 90% of the time" or "The first 10% of the code takes 90% of the time. The remaining 90% takes the other 10% of the time"....personally i have experience the second one :)

How about adding Demeter law, which states about reducing coupling between collaboration modules. E.g. if A.getB().getC().process(), then A needs to know about C, which creates unnecessary coupling between A and C. later if you want to introduce a new module between A and C, you need to modify lot of places. Instead, a module should know only about its immediate collaborator i.e. A.getB().process().

The Hardware/OS section is for serious and helpful discussions regarding your computer hardware and Operating System questions. If your post contributes nothing to the discussion and is just adding to your post count, DON'T POST IT. You'll generally be seeing an infraction in your PM inbox if you do.