Page 1 of 2
How many lines of code per day?
Posted: Mon Mar 28, 2011 11:53 am
by rdonnay
I have been asked to give an opinion related to software development in rebuttal to an "expert" who claims that the industry standard for software development is 10 lines of code per day.
In my opinion, if I were capable of producing an average of 10 lines of code per day, considering an 8 hour day, I would never finish any projects.
What say you all about this?
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 12:23 pm
by BruceN
That doesn't make any sense to me. I just spent 20 minutes writing a small routine to read from an INI file (email settings), display the data so it can be edited, then save things back to the ini file. It is about 40 lines of (easy nd quick) coding. A no-nothing half assed progammer like me can get several hundred lines done in a day (depending on how complex).
Perhaps he meant to say 10 functions/procedures/base classes, or whatever - not lines. That might make more sense.
just A thought...
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 12:44 pm
by Tom
I just compared to builds of my major app, one from today and one from march 1st (28 days). The difference is 3,700 lines of code, no cut & paste (and some code deleted aswell!). That makes about 130 lines a day, weekends counted. And I had a week off inbetween - I finished my 6th novel, and wrote 150 pages in six days.

Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 1:20 pm
by bwolfsohn
I believe standards such as these are for lower level languages and larger level companies where they are including testing, debugging, "quality assurance", etc..
None of which, obviously, apply to any of us..

:
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 1:22 pm
by GeneB
Private sector or government?
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 2:14 pm
by rdonnay
The expert is saying that this is the "industry standard", but the only industry I could imagine accepting this as a standard is NASA.
He is using this argument in a lawsuit trying to show the value in the software.
To counter his argument I wrote a program in less than 1 hour that I used to calculate the total number of lines of code in the eXpress++ libraries.
The program has 72 lines of code. That seems about right to me, because I figure that I average around 500 lines of code per day when writing simple applications.
Based on his "industry standard", it should have taken me 100.11 years to write eXpress++. This is considering working every day, 8 hours per day with no vacations. During that 100+ years I would also have no other time to work on any other projects or to provide tech support, sales support or write any sample code.
It appears that eXpress++ is worth much more than I ever thought.
No wonder I am aging faster than everyone else.
I appreciate the feedback on this and will probably use any info you give me in my counter arguments.
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 4:01 pm
by GeneB
I calculated that over the last two years the conversion to Express I am working on is netting me 8 cents an hour per customer.
I was going to ask for 10 cents but they told me no one is getting a 25% raise these days.
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 4:26 pm
by BruceN
Roger:
I've often wondered how many lines of code there are in our app. Years ago I did a DIR on all the prg's and 'estimated' the number of characters per line to get a SWAG (scientific wild ass guess) estimate.
Could you post your line counter?
thanks,
bruce
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 4:50 pm
by rdonnay
I calculated that over the last two years the conversion to Express I am working on is netting me 8 cents an hour per customer.
I was going to ask for 10 cents but they told me no one is getting a 25% raise these days.
I apply different standards to conversion projects because they tend to require major structural changes to code and they often lead to lots more rework and also more of a learning curve. When I am working on conversions, my productivity rate probably drops to about 200 lines per day, mostly because I am working with existing code that may be convuluted.
Re: How many lines of code per day?
Posted: Mon Mar 28, 2011 4:51 pm
by rdonnay
Could you post your line counter?
Here it is:
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], GetOptions, cDir, aDir[0], oBrowse, nTotalLines := 0, ;
nCodeLines := 0, cExt
cDir := Space(50)
cExt := Space(4)
@ 0,0 DCSAY 'Enter directory containing Source files' SAYSIZE 0
@ 1,0 DCGET cDir
@ 2,0 DCSAY 'Enter File Extension'
@ 3,0 DCGET cExt
@ 5,0 DCBROWSE oBrowse DATA aDir SIZE 50,12 FONT '10.Lucida Console' HEADLINES 2 FIT
DCBROWSECOL ELEMENT 1 HEADER 'File;Name' WIDTH 20 PARENT oBrowse FOOTER Chr(255)
DCBROWSECOL ELEMENT 2 HEADER 'File;Size' WIDTH 10 PARENT oBrowse FOOTER Chr(255)
DCBROWSECOL ELEMENT 11 HEADER 'Total;Lines' WIDTH 10 PARENT oBrowse PICTURE '999999' ;
FOOTER {||Alltrim(Str(nTotalLines))}
DCBROWSECOL ELEMENT 12 HEADER 'Code;Lines' WIDTH 10 PARENT oBrowse PICTURE '999999' ;
FOOTER {||Alltrim(Str(nCodeLines))}
@17,0 DCPUSHBUTTON CAPTION 'Calculate' SIZE 10 ;
ACTION {||Calculate(oBrowse,cDir,cExt,@nTotalLines,@nCodeLines), DC_GetRefresh(GetList)}
DCGETOPTIONS SAYBOTTOM TABSTOP
DCREAD GUI FIT TITLE 'Calculate Lines of Code' SETAPPWINDOW OPTIONS GetOptions
* --------
PROC appsys ; return
* --------
STATIC FUNCTION Calculate( oBrowse, cDir, cExt, nTotalLines, nCodeLines )
LOCAL i, nHandle, cFileName, cLine, aDir
nTotalLines := 0
nCodeLines := 0
cDir := Alltrim(cDir)
cExt := Alltrim(cExt)
aDir := Directory( cDir + '\*' + cExt)
oBrowse:dataSource := aDir
FOR i := 1 TO Len(aDir)
ASize(aDir[i],12)
NEXT
FOR i := 1 TO Len(aDir)
aDir[i,11] := 0
aDir[i,12] := 0
cFileName := cDir + '\' + aDir[i,1]
nHandle := DC_TxtOpen(cFileName)
DO WHILE !DC_TxtEof(nHandle)
cLine := DC_Txtline(nHandle)
aDir[i,11]++
nTotalLines++
IF !Empty(cLine)
aDir[i,12]++
nCodeLines++
ENDIF
DC_TxtSkip(nHandle,1)
ENDDO
DC_TxtClose(nHandle)
oBrowse:arrayElement := i
oBrowse:refreshAll()
NEXT
RETURN nil