View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 1 - Jonathan Reitnauer

Abstract

In the article Comparing Observed Bug and Productivity Rates for Java and C++, Geoffrey Phipps takes an interesting look at what effect two different OO languages had on the number of bugs introduced into software projects and the relative impact those had on productivity. The experiment detailed in the paper used the Personal Software Process methodology to gather the relevant data. This is a technique developed to allow programmers to analyze their particular workflow and provide estimates of how complex their designs will be and how long they will take to implement.


Method and Process

The author’s experiment took place over the course of two development projects. One of these utilized C++, the other Java. The data gathered included defects and bugs per line of code and per hour of coding, time to fix defects/bugs, and productivity measured in lines of code per minute. For the purposes of the test a “defect” was defined to include any syntactical or logical errors detected and fixed by the programmer and a “bug” as any error detected during testing or deployment of the software.


Findings

The results in general indicated that Java had a clear advantage over C++ in that it resulted in fewer bugs and defects introduced. For C++ an average of 82 defects per thousand lines of code was observed. For Java, the average was 61. With bugs the difference was even more pronounced, with C++ exhibiting twice as many (16 to 8 per kLoc). Analysis of the time it took to fix bugs revealed that in many cases nearly twice as much time was needed to fix bugs in C++ as in Java. The article points out that this makes sense because often the most time consuming bugs deal with bad pointers and misallocated memory, which Java avoids. Particularly interesting was the fact that the subject for this experiment was a person who knew C++ well but was still learning Java. This would seem to indicate that a fully objective test (where the participant knew both languages equally well) would favor Java even more.


Application

It was clear from the article that the differences between Java and C++ certainly produce a measurable effect on programming style and productivity. The decision to use any particular language must of course account for all relevant factors however. Even if it were to be shown that one could program more effectively in Java, that would not make it necessarily better than C++. If performance was the primary goal in the development of a software product, the sacrifice of productivity for speed might be an acceptable tradeoff.

I found an interesting parallel in Luis Cruz’s discussion where he mentions how it is a positive thing that different languages are better suited for different tasks. With many different languages available to choose from, the programmer is better equipped to select one that will best fit the requirements and goals of any particular project.


Source

Comparing Observed Bug and Productivity Rates for Java and C++
by Geoffrey Phipps
Published in Software—Practice & Experience
April 1999 pp. 345 - 358
http://portal.acm.org/citation.cfm?id=311868.311872

Links to this Page