Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Back in college I remember a professor teaching the class one of the laws of computer science. He said something like "More code equals more bugs" and gave it a name (The Law Of Whatchamacallit) and attributed it to someone.

Does anyone know where this "law" comes from, who said it or what it's original verbiage is?

share|improve this question

migrated from stackoverflow.com Jan 31 '11 at 22:29

This question came from our site for professional and enthusiast programmers.

6  
Reminds me of, "A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away." -Antoine de Saint-Exupery –  Kirk Woll Jan 31 '11 at 22:29
4  
Reminds me of 'There is no code faster than no code' (Taligent's Guide to Designing Programs). –  Luke Woodward Jan 31 '11 at 22:35
    
Well, since you mentioned it here and no one knows what it's called, let's call it "Jeff's Law". –  FrustratedWithFormsDesigner Jan 31 '11 at 22:37
    
@Kirk, a similar quote from Arthur William Radford (of painting): "Half of art is knowing when to stop". Very appropriate in this context as well. –  Berin Loritsch Feb 1 '11 at 2:44
    
I like "Jeff's Law". Next comes the book deal. Who will help me find a publisher? :) –  Jeff Feb 1 '11 at 19:11

3 Answers 3

up vote 7 down vote accepted

In addition, a substantial number of the problems caused by buggy software, which occurs because vendors keep adding more and more features to their programs, which inevitably means more code and thus more bugs.

By Andrew Tannenbaum

share|improve this answer
2  
Links to Google searches aren't particularly useful. Can you extract the relevant information and post it in your answer. –  ChrisF Jan 31 '11 at 22:58
1  
@ChrisF it's the first result in the book search. It's copyrighted material, and I'd rather prefer not to quote textually. Thanks for your comment. –  belisarius Jan 31 '11 at 23:28
2  
I imagine fair use would cover a quote. –  Orbling Feb 1 '11 at 1:14
1  
You seem unwilling to make the edits so I did for you. –  Josh K Feb 1 '11 at 5:39
    
this sounds right. thanks! ive been trying to recollect this for years. –  Jeff Feb 1 '11 at 19:09

Boehm's book, Software Engineering Economics has it as a basic formula.

Effort = k * S ^ a

Where S is the Source Lines of Code.

And the power function, a was >= 1.0.

share|improve this answer

@belisarius: Well spotted with Tannenbaum.

@Jeff: If Tannenbaum doesn't ring a bell, your professor may possibly have mentioned Occam and the law of economy/succintness. (See Occam's Razor.)

@S.Lott: Dijkstra used to argue quite strongly against the use of lines of code as a measure of useful work. He basically said it maximises the wrong variable. Of course, Boehm attempts to model effort, and lines of code there should include lines of code deleted.

Edit:

I thought I'd add that Dijkstra also said "simplicity is prerequisite for reliability".

share|improve this answer
7  
Use "add comment" under answers to add comments instead of writing them in an answer. –  user1249 Jan 31 '11 at 22:56
1  
@Thorbjørn Ravn Andersen - unfortunately as a < 50 rep user he can't add comments. –  ChrisF Jan 31 '11 at 22:57
1  
@Thorbjørn: You need 50 rep to be able to leave comments. @Kevin: If you link your SO and Programmers accounts, you'll get 100 rep, instantly letting you leave comments. –  Anon. Jan 31 '11 at 22:58
1  
@Kevin - Programmers' is not a forum but a Question and Answer site. You are more than welcome to post an answer that has more information than provided by the current answers, but you shouldn't post comments as answers. If you check the FAQ you'll see that you need 50 reputation to be able to comment, but this is quite easy to achieve. –  ChrisF Jan 31 '11 at 23:00
1  
@Anon - you need > 200 rep on at least one site to get the bonus. Unfortunately Kevin only as 160 on SO at the moment. But you can re-associate your accounts at any time so when you do achieve 200 on one site you'll be able to get the bonus on all. –  ChrisF Jan 31 '11 at 23:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.