Thread: How many lines have you ever written in a day?

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    103

    How many lines have you ever written in a day?

    Exactly what the title says. Post here! The maximum I've done (in a day) is probably 470 lines of code.

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I don't think I ever counted.

    But I once had 6 bugs in just 1 line.
    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.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    I think a teacher once made me write 350 lines of something as punishment. No other teacher had such old fashioned ideas though

    Anyway, I too never counted, and it depends on whether you count edits to existing lines of code.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Poincare View Post
    Exactly what the title says. Post here! The maximum I've done (in a day) is probably 470 lines of code.
    Those probably weren't the most qualitative lines ever made either.

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I've never counted. I've written about 3 or 4 DLLs in one day and each had about 500 to 1000 lines in them. However, that isn't saying much after you factor in skipped lines, comments, etc.

  6. #6
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    "Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates

  7. #7
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    When I get paid by the line (and not the hour/day) I will start to take notice of the amount of lines I write.

    I have spent nearly 2 months looking for a bug, which required just moving two lines to fix.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by laserlight View Post
    I think a teacher once made me write 350 lines of something as punishment. No other teacher had such old fashioned ideas though
    And I learned my parents are old fashioned from this thread...

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    How can you compare the copy/paste of say GUI boilerplate code with say the implementation of quicksort?
    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.

  10. #10
    Registered User
    Join Date
    Aug 2010
    Location
    England
    Posts
    90
    If you program regularly, you will always be cutting and pasting from bits that are almost the same as you want new.

    On that basis, 470 lines seems very small, so perhaps you should add a constraint on cutting and pasting.

    Also style.

    Being a dinosaur I use lots of lines, big tabs

    main()
    {
    /*
    Bit of text
    */
    Code:
    if( test )
            {
              // Indent again
            }
    else
            {
              // More code
             }
    }
    You can use up lots of lines this way. How about defining by actual code - excluding brackets, comments?

  11. #11
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    In a normal session where I'm not interrupted (i.e. I'm working from home ) I usually do about 1500. At the max, maybe 3000.

    EDIT: I need to add that that's only when I get the wonderful opportunity to write new code. As anybody can tell you, your day-to-day kind of coding is mostly maintenance and not like that.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  12. #12
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    I regularly write 1000 a day in assembler for recreates,
    Mainframe assembler programmer by trade. C coder when I can.

  13. #13
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by User Name: View Post
    "Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
    "Measuring truthfulness of a fact by a quote of Bill Gates is like measuring an aircraft's weight with a ruler." - Me


    That said, I never measured it either. I think about 2k max, though I am one of the lucky few who rarely had to do such brain-numbing work that it took no thought at all. Because if you actually have to think about what you code, the number goes down quite a lot (in fact, I've spent several days without writing a single line of code, thinking of algorithms).

  14. #14

    Join Date
    May 2005
    Posts
    1,042
    1/100000000th of a line because everything I've ever written is on a single line
    I'm not immature, I'm refined in the opposite direction.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Print out first N lines
    By YoYayYo in forum C Programming
    Replies: 1
    Last Post: 02-21-2008, 12:58 AM
  2. Lines of code per day.
    By abachler in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 10-26-2007, 09:20 AM
  3. Line Counting
    By 00Sven in forum C Programming
    Replies: 26
    Last Post: 04-02-2006, 08:59 PM
  4. cant get code to work
    By duffy in forum C Programming
    Replies: 13
    Last Post: 10-20-2002, 05:23 AM
  5. Printing weekday
    By sworc66 in forum C Programming
    Replies: 12
    Last Post: 09-13-2002, 07:03 AM