ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How many lines of code do YOU produce a day?

August 01, 2009 6:11pm

Subscribe [9]
  • #1 / Aug 01, 2009 6:11pm

    basementDUDE

    37 posts

    First of all, I work along! no co-worker :(
    I always wondering whether I am a noob or a average joe.
    How productive I am compare to other people.

    Therefore, please leave a quick reply saying how many lines of code(average) that you can write per day.

    me: about 400 - 450 lines per day
    if I need to write recursive function then its down to 100ish

  • #2 / Aug 01, 2009 10:08pm

    Tyler Diaz

    24 posts

    Roughly, 700-800 lines. Depending on the day and the code language (Here I suspect you are referring to PHP using CI but I also included CSS, XHTML, javascript, and Applescript)

  • #3 / Aug 02, 2009 11:57am

    rdjs

    33 posts

    I would suggest that that lines of code per day is not a good measurement of productivity. It is an interesting question though as it is a profession where measuring productivity is very difficult.

  • #4 / Aug 02, 2009 12:33pm

    CrimeCleaner

    10 posts

    I would have to agree with the previous reply that lines of code per day is not a great tool for measuring productivity, but its just a fun question.  When I wrote code regularly for a few years it took me a long time to get up to 400 lines per day.  I think overall I probably averaged a little more in my hay day, but 400-450 if pretty darn fast in my opinion…

  • #5 / Aug 02, 2009 2:46pm

    Shrike67

    16 posts

    Just for fun: http://whatpulse.org/  :lol:

    I do 13000 keys/day

  • #6 / Aug 02, 2009 4:34pm

    Stock Blog

    1 posts

    About 50 lines per day. The lower the number of coded lines you do to achieve your objective each day, the better coder you are with machine language as the exception. 😉

  • #7 / Aug 03, 2009 5:42am

    philm

    28 posts

    Not many recently!

    I’ve been creating dozens of front end visuals in Photoshop! hehe :lol:

  • #8 / Aug 03, 2009 6:52am

    Phil Sturgeon

    2889 posts

    Lines of code is a terrible measure of skill. In college we created a few text-based C++ command line scripts and one of the “best” in the class was boasting about his 1,500 line app which had 1 player, 2 player and AI player.

    I had a look at the source code, took a copy and by implementing functions, structures and removing shitloads of repeated code it was down to about 400!!

    I often find more lines of code means better quality and speed.

    Example:

    $array_total = count($array);
    for($i = 1; $i < $array_total; $i++)
    {
        // stuff
    }

    or…

    for($i = 1; $i < count($array); $i++) //stuff

    The first is not only considerably more efficient (count will run each time on the array in example 2) but it looks a great deal better.

    Some days I have produced 2,000 or 3,000 lines if I am writing up some crazy classes. Some days I will probably produce about 50-100 lines of code. Really depends ona lot of things and should not be used as a measure of skill or quality.

  • #9 / Aug 03, 2009 4:50pm

    Nick Husher

    364 posts

    It also depends on what kind of project you’re working on. It’s trivial to put out a few hundred lines of code a day when you’re writing boilerplate code and getting started with a project, but you’ll be hard-pressed to build with the same speed or ease when you’re diving into a 40,000 line enterprise-level project.

    Studies have shown that the average programmer in a production environment puts out about 10 lines of code per day. There are a few reasons for this: Large projects require research and an extensive working knowledge of a system before adding anything is possible; Programmers do a lot of things aside from programming—meetings, writing specs, testing, and research; Not all code written ends up making it into production.

    Generally, “lines of code” has been rejected as a measure of productivity. Unfortunately, there isn’t a good hard metric for producing quality code consistently to replace it. John Carmack famously rewrote the Quake graphics engine to use Open GL in a weekend, and I think we can all agree that’s impressive. Most can also agree that failing to implement a simple change in an application is either a byproduct of insufficient programmer skill or a fundamental flaw with the application stack.

  • #10 / Aug 04, 2009 7:28am

    Crimp

    320 posts

    I am most happy when I have had a day deleting lines of code. Trimming down through refactoring, hopefully without too many WTFs directed at yourself, is time well spent.

  • #11 / Aug 04, 2009 8:02am

    Phil Sturgeon

    2889 posts

    I am most happy when I have had a day deleting lines of code. Trimming down through refactoring, hopefully without too many WTFs directed at yourself, is time well spent.

    Ha im with you there. We have hundreds of thousands of lines of PHP code and hundreds of lines of JavaScript. My favourite ridiculous function of today is:

    function checkBrowser(){
        if(navigator.appName=="Netscape"){return "ns";}
        else if(navigator.appName=="Microsoft Internet Explorer"){return "ie";}
    }

    I have been itching to delete that all morning.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases