PDA

View Full Version : Your biggest project: how many lines have you written?



happyclown
04-20-2009, 05:00 AM
Ok, first some ground rules:

================================================== ========

1. The code must have been written by YOU.

2. Only code that have been written counts. Code that is managed by you does not count.

3. The code must have already been written. Even if your current project will eventually be your biggest, if you've so far written less code than another project, then the number of lines from the other project(where the code has already been written) counts.

4. If you are working/have worked in colaboration with other people, then the number of lines of code that you have written counts.

================================================== ========

Whoever has written the most lines in any project wins forum bragging rights for 2009. :D

Myself, my biggest project to date has been 174 lines. Took me about 2 months, but dayum, what a marvelous, thoroughly enjoyable experience!

Let the games begin! :D

CornedBee
04-20-2009, 05:06 AM
Eh, I voted before reading the exact rules.

My current project is some 7000 lines, I think. I don't really keep track of LoCs, though. I think I wrote something with about 10000 lines too.

happyclown
04-20-2009, 05:07 AM
Corned Bee, could you please change the thread heading to either mention reading the rules first, or to include "how many lines did YOU write"?

Thanks. :)


Done - CornedBee

matsp
04-20-2009, 05:13 AM
My first ever professional project ended up a few more than 20000 lines. I choose 30000 lines, as I have since written a few project (on my own) that was larger than that - I'm not sure the exact size tho.

I have worked on several projects that have millions of lines in them, but not much of that was my code.

--
Mats

laserlight
04-20-2009, 05:43 AM
2. Only code that have been written counts.
Heheheh...

My best code is written with the delete key.

Sebastiani
04-20-2009, 07:44 AM
Indeed. :D

brewbuck
04-20-2009, 10:40 AM
It has to be in the hundreds of thousands. On a single project, maybe several tens of thousands.. Not sure.

Doing a global line count on all *.c, *.cpp, *.h files in my personal source tree gives 284,667.

bithub
04-20-2009, 11:20 AM
I just did a line count on my current project, and it is 885017 lines. About 100K-200K of those are mine.

cpjust
04-20-2009, 11:37 AM
At least 30,000 lines (including a lot of doxygen documentation lines) over about 2.5 years.

dwks
04-20-2009, 11:41 AM
Some of my projects have been 14,000 lines and 8,000 lines and that sort of range. I don't usually concentrate on a single project for more than a year.


I just did a line count on my current project, and it is 885017 lines. About 100K-200K of those are mine.
Wow, that's a lot of code! What project is this if I may ask?

Daved
04-20-2009, 12:23 PM
Another developer just put our estimated line count at 5.3 million lines. I'm guessing I've written at least 1% of that, so I'm going to vote for the last option. I'm too lazy to see if I rival some of the other big numbers here by myself.

bithub
04-20-2009, 02:20 PM
Wow, that's a lot of code! What project is this if I may ask?Think of it as an enterprise level TIVO.

SlyMaelstrom
04-20-2009, 02:52 PM
Honestly, I'd struggle to say that I've written 500,000 lines of code in my entire life, let alone on a single project. I might just be greatly miscalculating, though.

I'm the only programmer on my current project for work and it currently weights in at a measly 6500 lines. That said, it's VB with SQL server, and of course, much of VB is actually spent designing proper interfaces in a non-coding environment.

cyberfish
04-20-2009, 03:03 PM
About 6000 lines if I don't consider projects written before I knew how to use loops...

I have done a lot of programming contest type programs, though, to prepare for a programming contest (University of Waterloo's high school contest) that I was so close to getting perfect but made a stupid mistake in one problem... that costed me my entrance to the stage 2 of the contest, where winners get to go to the IOI (International Olympiad in Informatics) :(. I think I ranked something like 25th internationally in Canada (3rd in my province I believe), and they only took 20... so I only got an honourable mention. They are all very short programs (~100 lines), but VERY mind-twisting, and some can take a few days to do.

anon
04-20-2009, 03:27 PM
It appears that my current project (a Wordpad clone) is the largest: 40+ headers, 40+ source files and about 6000+ lines.

Yarin
04-20-2009, 04:05 PM
My largest project (a library) barely topped 20k. Other than that, eveything I've written was been under 10k. (Other than a 11k soupped-up text editor that is :D)

Over 95% of my projects are always under just a couple thousand for the most part.

I'm a programmer with a comfortable amount of experience... but a little ways from even being proffesionally suitible.

SlyMaelstrom
04-20-2009, 05:34 PM
I'm a programmer with a comfortable amount of experience... but a little ways from even being proffesionally suitible.I'd say that there are plenty of great professional programmers that have never written a project that exceeded 10,000 lines simply because their line of programming does not call for it.

happyclown
04-20-2009, 05:52 PM
I just did a line count on my current project, and it is 885017 lines. About 100K-200K of those are mine.

Might be a bit too early to call, but even with 100K, you've probably earned forum bragging rights 2009. :D

bithub
04-20-2009, 07:48 PM
Might be a bit too early to call, but even with 100K, you've probably earned forum bragging rights 2009.Considering the code has been spread out over 3 years (and counting), it's not that impressive. Plus I'm willing to bet a good portion of that code is comments :)

SlyMaelstrom
04-20-2009, 08:00 PM
Considering the code has been spread out over 3 years (and counting), it's not that impressive. Plus I'm willing to bet a good portion of that code is comments :)It's also worth mentioning that on large projects, one's usage of the K&R brace/indenting style vs the KNF style could greatly change the amount of "lines" the project has.

brewbuck
04-20-2009, 08:09 PM
It's also worth mentioning that on large projects, one's usage of the K&R brace/indenting style vs the KNF style could greatly change the amount of "lines" the project has.

That's why I like to count semicolons instead...

Masterx
04-20-2009, 08:28 PM
more than 7500 lines of codes , it toke me 3 month to write the first version and it was hardly 1500 of lines , well it didnt even compile at all!because of poor coding style , i convinced my self to abandon it and start from scratch and well the experience i got during this 3 month made me write 7500 of lines in just 2 weeks(knowing those ways leading to failure,helped me alot to know why i didnt succeeded and how to go about the project) .
the project was a simulator !

VirtualAce
04-20-2009, 08:36 PM
For one project my counter is reading over 50K lines of code. Total lines of code is a bit deceptive since I've lost a lot of code due to reinstalls of Windows, hardware upgrades, and drive deaths. Right now my current code base is sitting at about 400K lines of code.

Again this is deceptive since it is including comments in the count. However line counts really do not mean much to me in the grand scheme of things.

brewbuck
04-20-2009, 08:40 PM
Again this is deceptive since it is including comments in the count. However line counts really do not mean much to me in the grand scheme of things.

I track my LOC not for bragging rights, but because I'm trying to MINIMIZE it. If LOC is spiking, but feature richness is lagging, then it's a good time to consider refactoring.

brewbuck
04-20-2009, 08:41 PM
I like the nice bell shape of the results chart, with the spikes at the ends. This either means that C board tends to attract a lot of newbies as well as a lot of super-seasoned coders, or the people at the high end are exaggerating their numbers...

VirtualAce
04-20-2009, 08:49 PM
I like the nice bell shape of the results chart, with the spikes at the ends. This either means that C board tends to attract a lot of newbies as well as a lot of super-seasoned coders, or the people at the high end are exaggerating their numbers...

Or it could mean that the regulars are very sick individuals who not only code for a living but then go home and code some more....
It is my estimation that any simple 2D or 3D game project complete with an editor either in C# or C++ using MFC or pure Win32 would certainly surpass the 30K mark specified in this poll.
To hit the 100K mark you would really have to have a huge project and I doubt seriously it would all be coded by one person.

But again...K-loc's mean nothing to me.

laserlight
04-20-2009, 09:12 PM
That's why I like to count semicolons instead...
From now on I'm not going to write while loops any more since for loops increase my productivity! :)

SlyMaelstrom
04-20-2009, 09:16 PM
From now on I'm not going to write while loops any more since for loops increase my productivity! :)Yeah, we really have to be specific about semi-colons... I mean what about in string-literals?


int main(void) {
char muahahaha[] = ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;";

return 0;
}

bithub
04-20-2009, 11:21 PM
Yeah, we really have to be specific about semi-colons... I mean what about in string-literals?


int main(void) {
char muahahaha[] = ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;";

return 0;
}That looks like a productive day to me. Enough to make any software engineering manager proud!

cyberfish
04-21-2009, 12:05 AM
//count to 10

/* - NOT productive!
for (int i = 1; i <= 10; ++i) {
std::cout << i << std::endl;
}
*/

std::cout << 1 << std::endl;
std::cout << 2 << std::endl;
std::cout << 3 << std::endl;
std::cout << 4 << std::endl;
std::cout << 5 << std::endl;
std::cout << 6 << std::endl;
std::cout << 7 << std::endl;
std::cout << 8 << std::endl;
std::cout << 9 << std::endl;
std::cout << 10 << std::endl;
//much better :)

laserlight
04-21-2009, 12:11 AM
Sorry cyberfish, that is still not good enough. It should be:

std::cout << 1;;;;;;;;;
std::cout << std::endl;
std::cout << 2;;;;;;;;;
std::cout << std::endl;
std::cout << 3;;;;;;;;;
std::cout << std::endl;
std::cout << 4;;;;;;;;;
std::cout << std::endl;
std::cout << 5;;;;;;;;;
std::cout << std::endl;
std::cout << 6;;;;;;;;;
std::cout << std::endl;
std::cout << 7;;;;;;;;;
std::cout << std::endl;
std::cout << 8;;;;;;;;;
std::cout << std::endl;
std::cout << 9;;;;;;;;;
std::cout << std::endl;
std::cout << 10;;;;;;;;
std::cout << std::endl;

cyberfish
04-21-2009, 12:15 AM
wow, a solid rectangle, too!

happyclown
04-21-2009, 03:30 AM
However line counts really do not mean much to me in the grand scheme of things.

Just as a matter of interest, do employers give any weight to LoCs?

Would a programmer include LoCs on their resumes to show involvement/participation in projects?

Looks like < 200 lines is making a late surge. ;)

grumpy
04-21-2009, 04:34 AM
Just as a matter of interest, do employers give any weight to LoCs?

Some do. Seasoned programmers will tend to look elsewhere for employment ..... lines of code is a very poor measure of programmer productivity.


Would a programmer include LoCs on their resumes to show involvement/participation in projects?

Only the inexperienced ones.

Snafuist
04-21-2009, 07:57 AM
Programmers measuring progress in LOC are like airplane engineers measuring progress in weight. When I was even more unexperienced than right now, I did some ~10k LOC projects which I would easily do in maybe 1000 lines today, while increasing readability and performance by several orders of magnitude.

To this respect, LOC is just a measure of this: LOC.

Greets,
Philip

brewbuck
04-21-2009, 08:08 AM
Programmers measuring progress in LOC are like airplane engineers measuring progress in weight. When I was even more unexperienced than right now, I did some ~10k LOC projects which I would easily do in maybe 1000 lines today, while increasing readability and performance by several orders of magnitude.

Which is exactly the reason I like to keep track of it. It's not, "Whoa, look how heavy my airplane is," it's more like "Whoa, look how heavy my airplane is, something's wrong."

SlyMaelstrom
04-21-2009, 08:53 AM
Programmers measuring progress in LOC are like airplane engineers measuring progress in weight. When I was even more unexperienced than right now, I did some ~10k LOC projects which I would easily do in maybe 1000 lines today, while increasing readability and performance by several orders of magnitude.
Which is exactly the reason I like to keep track of it. It's not, "Whoa, look how heavy my airplane is," it's more like "Whoa, look how heavy my airplane is, something's wrong."I disagree with this... I see no analogy of airplane weight and lines of code as simply lines of code does not necessarily have a negative or positive impact on a compiled application. I never look at my lines of code and say "Whoa, this is too big... I could probably make it perform better if I reduce the number of lines." That's what I monitor memory and CPU usage for. I would say a better analogy to lines of code would perhaps be wiring for an electrical engineer. You can make the same circuit will 20 neatly organized wires or 30 messy, tangled wires... they may perform identically, but in the end, the difference is how easy it is to upgrade and maintain. That's why lines of code matter... because some day in the future, I might want to go back and look at this and actually know what's going on.

bithub
04-21-2009, 10:25 AM
I don't look at LoC as any sort of measurement either way. If I start dictating my design decisions based on how many lines of code it generates, my code quality would go downhill pretty fast. Pretty much any well written code can be rewritten to its detriment using more or less lines.

abachler
04-21-2009, 06:40 PM
1.3 million lines. It's an AI application that tests combinations of varous AI methods to find optimal processing sequences.

cpjust
04-21-2009, 08:41 PM
1.3 million lines. It's an AI application that tests combinations of varous AI methods to find optimal processing sequences.

Holy crap! Was that all your code or the whole team? How long did it take to write all that?

brewbuck
04-21-2009, 08:58 PM
I don't look at LoC as any sort of measurement either way. If I start dictating my design decisions based on how many lines of code it generates, my code quality would go downhill pretty fast. Pretty much any well written code can be rewritten to its detriment using more or less lines.

There are quite a few reasons why, all other things being equal, fewer lines is better.

1. Sample-based profilers are more accurate when the program image is smaller, since a sample covers a larger percentage of the total code space.

2. More lines written means more lines that must be tested. If you are shooting for extremely high coverage numbers (90% or more) one of the easiest ways to get there is to start removing/refactoring code.

3. Fewer lines lead (in general) to faster compile cycles

I'm not saying that you should make your code more obscure just to reduce the line count. But between two equally clear, equally efficient solutions, I will always choose the shorter one.

During testing, when it turns out some entire module is not being used, my first question isn't "How can we improve the tests to hit this module better?" My first question is "Can we delete this module?"

GReaper
04-29-2009, 02:08 AM
The biggest project i've written is approx. 4000 lines. It took me a month to build it!

abachler
04-29-2009, 04:39 AM
Holy crap! Was that all your code or the whole team? How long did it take to write all that?

It's all mine. It has taken about 10 years. I add new methods when I find them or think of them, its a work in progress. It's generally pretty good at finding a probably approximately correct configuration given enough runtime.

Snafuist
04-29-2009, 05:15 AM
It's generally pretty good at finding a probably approximately correct configuration given enough runtime.

Sounds like a bad implementation of a brute force algorithm ;-)

Greets,
Philip

zacs7
04-29-2009, 07:30 AM
1.3 million lines. It's an AI application that tests combinations of varous AI methods to find optimal processing sequences.

Is it designed at all? Or just implement as you think of it? If it's the latter, it'd be rather ... interesting.

What's it written in by the way?