To count lines I used the wc command. Before you say what on earth is that, it's a DOS/CMD port of a standard Unix command that comes with every Unix since the year dot along with all sorts of cool tools. Stands for word count, counts words, lines and characters and prints a total across all files scanned. Goes along with grep, find, sed and all sorts of wonderful tools you might never have heard of.
wc -l *.pas In Unix you would go (from memory) wc -l `find . -name *.pas -print` Or find . -name *.pas -print | wc -l Feeding inputs and outputs of commands to each other, magnificent simple and elegant design. (In this context a good example of achieving the task with minimum lines of code - eg 1 line only!) In practice the XP CMD shell does not do redirection as thoroughly as unix, so it took more than one command line to get the total. John -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Mueller Sent: Sunday, 30 April 2006 7:05 p.m. To: 'NZ Borland Developers Group - Delphi List' Subject: RE: [DUG] Productivity Pretty much agree with the others that lines of code isn't a good way to measure your productivity ... but I just couldn't resist and had to check how many lines of code I actually wrote. I am getting a linecount of 441'062 in all my own *.pas files. Feels like a lot .. but if you calculate 5 seconds to actually write a line of code then this turns out to be only a bit over 25 straight days of non-stop programming(no debugging/testing time included) ... which I guess is ok - looks like I didn't waste too much of my life on programming after all ;-) Regards, Stefan ps: some simple program to get the count of lines is attached. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Bird Sent: Saturday, 29 April 2006 11:59 a.m. To: 'NZ Borland Developers Group - Delphi List' Subject: [DUG] Productivity How do others measure programmers productivity? In my first year seriously doing Delphi (learning Delphi and programming around 1/4 of my working days) I have written around 25,000 lines of .PAS files in about 15 programs - are there any standard measures of productivity? John _______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi __________ NOD32 1.1461 (20060329) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com _______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
