LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-06-2010, 10:43 AM   #1
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Rep: Reputation: 40
how much do you code on average?


Hello programmers , nerds and whatnot

i have been lately pondering how huge software has become i.e millions of lines of code like the linux kernel in contrast to how much any given programmer could/does write in average...

so the question goes out to all programmers regardless of your language(s) ,

how many lines of code do you write in a given time period (in a year , month , week ..etc)


cheers
 
Old 07-06-2010, 11:09 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,082

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Quote:
Originally Posted by entz View Post
Hello programmers , nerds and whatnot
i have been lately pondering how huge software has become i.e millions of lines of code like the linux kernel in contrast to how much any given programmer could/does write in average...

so the question goes out to all programmers regardless of your language(s) , how many lines of code do you write in a given time period (in a year , month , week ..etc)
Kind of like asking "how high is up"?? No one is going to be able to even give a ballpark answer, as EVERYTHING about it can be summed up with "it depends". Got a new project? If so, is it a total rewrite, or an upgrade to what's there? Different platform, same, or supporting new platform(s)? Changing languages during this upgrade? How much can you reuse? Etc., etc.....

I've done totally new pages for my system, with just the addition of a few lines of code. Then I've also had to rewrite entire modules, since upgrades rendered the old ones a bad choice to use...so those 'few lines' turned into thousands.
 
Old 07-06-2010, 07:08 PM   #3
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by TB0ne View Post
Kind of like asking "how high is up"?? No one is going to be able to even give a ballpark answer, as EVERYTHING about it can be summed up with "it depends". Got a new project? If so, is it a total rewrite, or an upgrade to what's there? Different platform, same, or supporting new platform(s)? Changing languages during this upgrade? How much can you reuse? Etc., etc.....

I've done totally new pages for my system, with just the addition of a few lines of code. Then I've also had to rewrite entire modules, since upgrades rendered the old ones a bad choice to use...so those 'few lines' turned into thousands.
well to express myself more correctly , i meant

how many lines of code all in all ?

for instance , i've been personally working on a different variety of projects from AI , web design/programming to lots of other stuff.

all that put together in let's say the year of 2009 i've written about 3k-5k lines of code , this also includes lines that have been rewritten

so how about you?

cheers

Last edited by entz; 07-06-2010 at 07:10 PM.
 
Old 07-07-2010, 07:35 AM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
It is hard to estimate, but maybe 1000-2000 per year, but it depends, this includes not only adding new lines, but also changing lines. Mostly bash, and maybe some hacking in C.
 
Old 07-07-2010, 09:06 AM   #5
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by H_TeXMeX_H View Post
It is hard to estimate, but maybe 1000-2000 per year, but it depends, this includes not only adding new lines, but also changing lines. Mostly bash, and maybe some hacking in C.
aha , interesting
 
Old 07-07-2010, 09:32 AM   #6
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 16

Rep: Reputation: 233Reputation: 233Reputation: 233
It really depends on the project you're after, convenience of the environment and editor, and speed in typing and maneuvering of shortcut keys. Mind speed also.

Add: Motivation + Enthusiasm
 
Old 07-07-2010, 12:57 PM   #7
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 272

Rep: Reputation: 30
I think you guys are over analyzing it. Based on the OP's response, it looks to me like he is asking:

In 2009, how many lines of code did you write? Or even, on average, approximately how many lines of code to you typically write in a week, month or year.

No need to bring in details about why it may be more one time than another. It isn't a scientific survey, he's just looking for a guess.

For me, I don't work as a programmer. I do a lot of BASH scripting, though. I probably only coded about 500 lines of code in 2009.
 
Old 07-07-2010, 01:58 PM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Five lines of 'stable, working code' a day -averaged yearly.
 
Old 07-08-2010, 07:09 AM   #9
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 16

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by Fritz_Monroe View Post
I think you guys are over analyzing it. Based on the OP's response, it looks to me like he is asking:

In 2009, how many lines of code did you write? Or even, on average, approximately how many lines of code to you typically write in a week, month or year.

...
Ok I don't really want to post this since it might sound overture but back in 2009 I probably wrote at least 10000. That is by combining the projects I've played around, minor scripts, etc. That might sound too much but on other programmers with many projects (e.g. those in SF.net), that number means nothing. Not that I intend to make many but you'll really never notice until you've already made them. Most avid developers will even have 100000 yearly without even knowing that they have done it.
 
Old 07-10-2010, 12:14 PM   #10
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by Fritz_Monroe View Post
I think you guys are over analyzing it. Based on the OP's response, it looks to me like he is asking:

In 2009, how many lines of code did you write? Or even, on average, approximately how many lines of code to you typically write in a week, month or year.

No need to bring in details about why it may be more one time than another. It isn't a scientific survey, he's just looking for a guess.

For me, I don't work as a programmer. I do a lot of BASH scripting, though. I probably only coded about 500 lines of code in 2009.
well that's a superb explanation of the actual (vague?) question plus a model answer to it (as it fits the question like a lid does a pot )

Quote:
Originally Posted by gnashley;
Five lines of 'stable, working code' a day -averaged yearly.
hehe
i guess the best thing a programmer can do is to write lines that are only necessary in order to increase its quality.

complete the following sentence :

Quote:
write 5 lines of code a day .......
Quote:
Originally Posted by konsolebox;
Ok I don't really want to post this since it might sound overture but back in 2009 I probably wrote at least 10000. That is by combining the projects I've played around, minor scripts, etc. That might sound too much but on other programmers with many projects (e.g. those in SF.net), that number means nothing. Not that I intend to make many but you'll really never notice until you've already made them. Most avid developers will even have 100000 yearly without even knowing that they have done it.
well you should only count the lines that you've added or edited yourself and not the total lines of code in a project you worked on !
btw , deprecated lines also do count , so for instance if you wrote a function that was later removed from the code then that counts as well even if it no longer exists in the project.

cheers
 
Old 07-11-2010, 03:25 AM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
No, only lines of stable bug-free code count. The figure I stated is based on that criteria and is what has been suggested by others as being the average output of programmers. I thought it was low, but when I added up the lines of code of my main project divided by the years I've worked on it, the answer was quite close to that.
 
Old 07-11-2010, 06:54 AM   #12
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 16

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by entz View Post
well you should only count the lines that you've added or edited yourself and not the total lines of code in a project you worked on !
not to boast but actually.. i made all of them by my own.. from scratch

http://sf.net/users/konsolebox

and that does not include the projects i make for personal sake at home.
Quote:
btw , deprecated lines also do count , so for instance if you wrote a function that was later removed from the code then that counts as well even if it no longer exists in the project.
i didn't count deprecated lines.. i wonder....
 
Old 07-11-2010, 08:53 AM   #13
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by konsolebox View Post
not to boast but actually.. i made all of them by my own.. from scratch

http://sf.net/users/konsolebox

and that does not include the projects i make for personal sake at home.
i didn't count deprecated lines.. i wonder....
well , in that case i've to lie flat on the ground and surrender LOL

anybody who wants to top that record of 10,000 lines per year?

btw , i see you're ultra fond with shell scripts , how come ?
in your position i'd write something in php for the command-line terminal , just put in #!/usr/bin/php

cheers
 
Old 07-12-2010, 08:02 AM   #14
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 16

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by entz View Post
well , in that case i've to lie flat on the ground and surrender LOL

anybody who wants to top that record of 10,000 lines per year?
I'll bet that there should be many. Lets say an average working developer finishes a stable project per month and by average each project takes at least 3000 lines. 3000's still small for a complete project. For a year that could be 24000. And we still haven't included the patches for finished projects.
Quote:
btw , i see you're ultra fond with shell scripts , how come ?
in your position i'd write something in php for the command-line terminal , just put in #!/usr/bin/php

cheers
Cheers as well. Perhaps it's just that I find it easier to accomplish tasks using shellscripts. Before I'm only used to creating simple scripts for simple tasks,.. but then I started playing around with a simple looping script that plays my favorite songs. Later on the script grew better and became serious and that's how I ended up with my projects. If I intend to create more serious projects like AIs (those like OpenKore), perhaps I'll use Perl or Ruby. So far though, I don't have any plan about creating one yet.
 
Old 07-12-2010, 12:10 PM   #15
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,314

Rep: Reputation: 175Reputation: 175
crikey! I am such a nerd

Code:
$ find ~/w ~/lib ~/include -type f -ctime -365  \( -name \*.sh -o  -name [Mm]akefile -o  -name \*.tk -o -name \*.tcl  -name \*.[ch] -o -name \*.?pp -o -name \*.pl \)|                            
> xargs cat | wc -l | commify
   39,467
ohmigod, i forgot to remove blank lines
Code:
$ find ~/w ~/lib ~/include -type f -ctime -365  \( -name \*.sh -o  -name [Mm]akefile -o  -name \*.tk -o -name \*.tcl  -name \*.[ch] -o -name \*.?pp -o -name \*.pl \)|^Jxargs cat|grep .  | wc -l | commify
   33,055
remove duplicates!!
Code:
$ find ~/w ~/lib ~/include -type f -ctime -365  \( -name \*.sh -o  -name [Mm]akefile -o  -name \*.tk -o -name \*.tcl  -name \*.[ch] -o -name \*.?pp -o -name \*.pl \)|^Jxargs cat|grep .|sort -u  | wc -l | c >
   18,335

Last edited by bigearsbilly; 07-12-2010 at 12:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help me in my load average black-code Linux - Server 3 04-08-2009 02:17 PM
Recursive average cdog Programming 22 03-19-2006 05:39 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 02:37 AM
load average? ampex189 Linux - Newbie 2 03-06-2005 08:17 PM
Average load Cyth Linux - General 1 01-22-2002 04:33 PM


All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration