How many lines of code?

[quote]A 2001 study of Red Hat Linux 7.1 found that this distribution contained 30 million source lines of code. Using the Constructive Cost Model, the study estimated that this distribution required about eight thousand man-years of development time. According to the study, if all this software had been developed by conventional proprietary means, it would have cost about 1.08 billion dollars (year 2000 U.S. dollars) to develop in the United States.[20]

Most of the code (71%) was written in the C programming language, but many other languages were used, including C++, Lisp, assembly language, Perl, Fortran, Python and various shell scripting languages. Slightly over half of all lines of code were licensed under the GPL. The Linux kernel itself was 2.4 million lines of code, or 8% of the total.[20]

In a later study, the same analysis was performed for Debian GNU/Linux version 2.2.[21] This distribution contained over fifty-five million source lines of code, and the study estimated that it would have cost 1.9 billion dollars (year 2000 U.S. dollars) to develop by conventional means[/quote]

I was reading wikipedia and I wondered, how haiku does compare to these numbers? How many lines of code are written for haiku? With howmany developers?

Maybe a nice number to display on the home :wink:

Get the answers here:

Also, another interesting twist is whether the figures take into account the many changes that have occurred over the years. :slight_smile:

Ohloh has problems syncing with projects on, so that info is a little out of date. It was last updated 22 May 2007 19:01 UTC.

It’d be interesting to see how much Haiku’s “cost” has gone up since then. I would guess a lot.

What is very misleading about such a thing for a cost/time standpoint is the observation by those that have developed software for a long time, is that sometimes the most productive days are those where you’ve removed lines of code, and sometimes massive amounts of it. This often exists as things are built, where there’s a lot of duplication, and the rule “There can be only one” is applied violently, or perhaps an original way (often prototype) is found to be horribly ugly, and later experience/realization shows someone, “D’OH! It’s much simpler to accomplish this way!” and they rewrite it completely.

A common situation where there’s a lot of “reuse” of code that’s simple and fast to enter involves GUI code: there’s only so many ways to display and control a certain number of windows/views and update them, and there’s often a lot of copy-paste that happens there, as well as that often being tool-generated code.

The net result: the most useful thing you can measure by counting lines of code of a system is roughly how long it will build, and how (relatively) easy it is for developers to learn the system, which is, as hinted at above, greatly dependent upon how complex the code is. After all, which would be harder to understand: 1 million lines of structured C code, or the same number of lines (not sure you can measure it this way) of brainfsck, which has exactly 8 keywords/instructions, with whitespace being entirely optional, or even any character sequence to mark the end of a key word? :slight_smile: