How many lines of code shall one write per day at the maximum

This is a discussion on How many lines of code shall one write per day at the maximum within the Tech Board forums, part of the Community Boards category; How many lines of code shall one write per day at the maximum ?...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Location
    ijug.net
    Posts
    1

    How many lines of code shall one write per day at the maximum

    How many lines of code shall one write per day at the maximum ?

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by ijug.net View Post
    How many lines of code shall one write per day at the maximum ?
    Lines of code per day is an irrelevant measure of performance.

    A lazy programmer will write 10 lines of code while a productive programmer writes 100.

    A highly skilled programmer will write 10 lines of code that do the same as 100 written by an inept programmer.

    An inept highly productive programmer will write a 10,000 lines of code, while a lazy but highly intelligent programmer will write 100 lines of code that does the same thing.

    So unless your workforce is completely devoid of skilled programmers, the use of the lines of code per day metric is grounds for downsizing the manager.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    ((Random hijacking split from really important and useful thread))
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Quote Originally Posted by Salem View Post
    ((Random hijacking split from really important and useful thread))
    Those exist?
    bit∙hub [bit-huhb] n. A source and destination for information.

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,655
    I think Abachler pretty much summed it up. But if you're just talking raw statistics, it really just depends. My most productive days can work out to up to 1000. My record is probably something like 10,000. Of course, I always break up long lines for readability, so once again, line counts really aren't the best indicator of productivity.

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,423
    Does changing a line count as writing a new one? Theoretically, one could modify existing code, or remove lines of code all day long, thus in effect producing 0 lines of code!
    So I'm tempted to say that 0 lines of code is the best quote to hit per day!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    And there's also...

    Anyone writing 0 lines of code because they spent the whole day debugging or testing should be sacked. While anyone writing 10,000 lines of code in one day because they refactored their classes with an automation tool should be promoted to project manager.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Sebastiani View Post
    My record is probably something like 10,000.
    That's (more than) 200 pages. How many arms do you have? I don't even like having to read that much in 24hrs.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by Elysia View Post
    Does changing a line count as writing a new one? Theoretically, one could modify existing code, or remove lines of code all day long, thus in effect producing 0 lines of code!
    So I'm tempted to say that 0 lines of code is the best quote to hit per day!
    Also theres formatting.

    Code:
    int main()
    {
       cout << "Howdy Erf!!!";
    
       return 0;
    }
    6 lines

    Code:
    int main(){
       return printf("Helo Byd\n");
       }
    3 lines.

    So is the guy that inserts frivolous whitespace twice as productive?


    Quote Originally Posted by Sebastiani View Post
    My record is probably something like 10,000.
    I wrote a program that wrote 1 million lines of code in 5 minutes, does that count?
    Last edited by abachler; 09-15-2009 at 02:22 PM.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  10. #10
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,655
    That's (more than) 200 pages. How many arms do you have? I don't even like having to read that much in 24hrs.
    It was one of those marathon sessions - a constant flow of coffee and a slice or two of toast every couple of hours and I can write code pretty much non-stop (with a few short naps in between to keep me fresh), if necessary.

    Incidentally, I'm not a very fast (nor accurate) typist, either. People have actually complained about my typing style - I mostly use my two middle fingers, and so to get up to a good speed I sort of pound on the keys quite rapidly, which can be a pretty noisy.

    Anyway, I actually enjoy writing code, which helps (although I can certainly reach total burnout if I'm not careful - if that happens, it can be days before I get back to it).

  11. #11
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,655
    Quote Originally Posted by abachler View Post
    Also theres formatting.

    Code:
    int main()
    {
       cout << "Howdy Erf!!!";
    
       return 0;
    }
    6 lines

    Code:
    int main(){
       return printf("Helo Byd\n");
       }
    3 lines.

    So is the guy that inserts frivolous whitespace twice as productive?
    Well, exactly. I might take a function that most would put on two lines for the declaration, and break it up like this:

    Code:
    template 
    < 
        typename Foo, 
        typename Bar, 
        typename Baz, 
        typename Qux    
    >
    void process
    ( 
        Foo const& foo, 
        Bar* bar, 
        Baz& baz, 
        Qux qux
    );
    ...which is like 15 lines! So, yeah, obviously, as you said, not the most relevant measure of performance.

  12. #12
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Sebastiani View Post
    Anyway, I actually enjoy writing code, which helps
    Kook. I thot this was "Cmasochists.com"



    I am doing gtk stuff again and the friggin API drives me nuts. "They" evidently do not believe in even the slightest possible form of abbreviation:
    Code:
    gtk_container_set_border_width(GTK_CONTAINER(frame),PAD);
    *num=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin));
    95% of the calls require the macro cast, too, since the pointers are all declared of one type (GtkWidget) but the actual function calls always apply to a "more specific" type.
    Code:
    gtk_abstract_thing_aspect_variant_create_element_round_data_float(GTK_THING_OTHER_MATCH(myx));
    I guess I can see why but holy mother of god...write a 1000 lines of this in a day.
    Last edited by MK27; 09-15-2009 at 03:11 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  13. #13
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,655
    Quote Originally Posted by MK27 View Post
    Kook. I thot this was "Cmasochists.com"
    Heh. Well, you might be suprised to find out that there are plenty of good programmers out there that don't actually enjoy the process very much (being more concerned with the end result, I suppose). To me though, writing code is very much an art form - sort of like composing music or poetry, and as such, I find it to be quite a therapeutic experience. Almost like taking a relaxing bubble-bath...if you could imagine one where your eyes get sort of glazed over, of course.

    I am doing gtk stuff again and the friggin API drives me nuts. "They" evidently do not believe in even the slightest possible form of abbreviation:
    Code:

    gtk_container_set_border_width(GTK_CONTAINER(frame ),PAD);
    *num=gtk_spin_button_get_value_as_int(GTK_SPIN_BUT TON(spin));

    95% of the calls require the macro cast, too, since the pointers are all declared of one type (GtkWidget) but the actual function calls always apply to a "more specific" type.
    Code:

    gtk_abstract_thing_aspect_variant_create_element_r ound_data_float(GTK_THING_OTHER_MATCH(myx));

    I guess I can see why but holy mother of god...write a 1000 lines of this in a day.
    I don't know. Personally, I find that abbreviations can be difficult to remember, and so almost always opt to use more "long-winded" names.

    Of course, you could always define a typedef or a wrapper macro if it really bothers you.
    Last edited by Sebastiani; 09-15-2009 at 03:24 PM.

  14. #14
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300

    Talking

    Quote Originally Posted by Sebastiani View Post
    To me though, writing code is very much an art form - sort of like composing music or poetry,
    I used to write, like to the extend that I had a self-published book, and used to go perform at open mics and stuff like that. When I first started programming, it totally reminded me of poetry, not so much (but partially) because of the concrete arrangement of the "words", but mostly because it is so compressed and is not bound by a simple repeating structural cycle (like the prose sentence), at the same time as being very precise. The compression and the precision create a compound "high level" realm in which the code actually has a meaning. And of course the magic of it.

    I don't really regard it so much like poetry anymore, but I totally believe that it hits that spot in me sufficiently -- I no longer have much interest in writing, and I don't feel at all sad about that, because while the product is very different, the activity still seems similar without being so "draining".

    I generally prefer reading poetry to listening to it and like people like bp nichol and ee cummings...

    Quote Originally Posted by Sebastiani
    Of course, you could always define a typedef or a wrapper macro if it really bothers you.
    There are literally hundreds of these functions and the only thing they have in common is they start with gtk_ -- but I guess you're right, it would probably take an afternoon to come up with something.
    Last edited by MK27; 09-15-2009 at 03:39 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  15. #15
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,655
    I used to write, like to the extend that I had a self-published book, and used to go perform at open mics and stuff like that.
    I'm not suprised, actually. You really are a natural when it comes to writing, honestly. And come to think of it, I would even buy your book.

    I don't really regard it so much like poetry anymore, but I totally believe that it hits that spot in me sufficiently -- I no longer have much interest in writing, and I don't feel at all sad about that, because while the product is very different, the activity still seems similar without being so "draining".

    I generally prefer reading poetry to listening to it and like people like bp nichol and ee cummings...
    I hate to admit it, but I never got to know much poetry. I think it has a lot to do with being dyslexic, though (something I still struggle with) rather than a general disinterest. Maybe I should revisit some of the classics and see if there is something there that I can relate to.

    I generally prefer reading poetry to listening to it and like people like bp nichol and ee cummings...
    As a kid I actually attended quite a few poetry readings (not suprising, considering that my parents were a bunch of hippies), and my overall impression was that of extreme pretentiousness. Nothing wrong with a heartfelt delivery, of course, but when you've got this guy wearing a beret or something and belting prose in a jazz-like tempo, it get's pretty annoying, IMO.

    There are literally hundreds of these functions and the only thing they have in common is they start with gtk_ -- but I guess you're right, it would probably take an afternoon to come up with something.
    Hey, at least you don't have a hundred or so function with names like gtk_abs_thg_asp_var_creat_elem_rnd_dat_flt!

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to write save code?
    By sept in forum C++ Programming
    Replies: 6
    Last Post: 09-18-2007, 07:25 AM
  2. How to write source code documentation?
    By loobian in forum C++ Programming
    Replies: 2
    Last Post: 06-07-2005, 11:49 AM
  3. how to write code about delete process?
    By cc246 in forum C++ Programming
    Replies: 2
    Last Post: 04-15-2003, 08:23 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 03:28 AM
  5. Simplified code
    By soonerfan in forum C Programming
    Replies: 2
    Last Post: 12-05-2001, 02:50 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21