from Hacker News

Ask HN: As a developer, do you write 10k-20k lines of code a day?

by alphaomegacode on 8/7/23, 8:31 PM with 16 comments

Decided to get some stats for a team project we're working on and got this interesting estimate from Google's AI.

Here's an excerpt if you don't care to click the image link: "However, as a general rule of thumb, a senior developer can write between 10,000 and 20,000 lines of code per day."

https://imgur.com/a/mSYAq5k

As a developer for a couple decades now, not sure I agree with that estimate...not even close to it imo.

  • by stephenr on 8/7/23, 10:16 PM

    As a society we are doomed when people see obvious hallucinations from an ai chat bot and still feel the need to confirm that it's outside the realms of reality.

    It astonishes me how anyone reads a response like this and then decides to keep using said tool.

    This would be like if you went to a restaurant with a friend, with no other customers in it. You order a pork chop with greens.

    The waiter returns with a live wild boar, eating a head of cabbage, and you feel the need to ask your companion if it seems wrong.

  • by dragonwriter on 8/7/23, 8:50 PM

    > As a developer, do you write 10k-20k lines of code a day?

    No, nor would I consider it an improvement if I did.

    OTOH, I’ve had some very good days where I net removed 10K+ lines of duplicate, unnecessary, and streamlinable lines of code, and those were very happy days.

  • by h2odragon on 8/7/23, 8:39 PM

    I just put 18 days into a project which totals 558 lines of code. Good alpha that proves a couple ideas and now I'm ready to start over from scratch and try to design instead of accrete features, for the second iteration. this is "just me" work, not professional; but i don't consider that slow for original development.

    30+ years experience.

  • by sp332 on 8/7/23, 8:44 PM

    As an average, no. As a maximum, maybe. That's a line every 3 seconds for an antire 8-hour work day, so it would have to include copy and pasting or generated code.

    A more realistic average is 200-400 lines per month. Some sources collected at https://skeptics.stackexchange.com/questions/17224/do-profes...

  • by devonnull on 8/7/23, 10:23 PM

    Maybe you could write 10K or 20K lines of code a day. But would those lines of code be any good? I very much doubt it.

    If you're going for quality, the number will be less. Much, much less. Maybe 100 to 150 lines of code. On a good day.

    Just because a chatbot says it's possible doesn't mean it's possible.

  • by distortionfield on 8/7/23, 8:33 PM

    I’m a senior engineer, 7 years of experience, and no, no way in hell is that even ballpark my average daily rate, nor anyone that I know, including FAANG engineers. Even the select few I genuinely consider 10x engineers that I know don’t approach that rate of productivity.
  • by eschneider on 8/7/23, 8:44 PM

    Generating LOTS of LOC isn't too hard, but if you're looking for concise, efficient, correct code, it's not even a question of if that's high or low for a YEAR'S work, it's more that they're measuring the wrong thing.
  • by raverbashing on 8/7/23, 8:42 PM

    No, that's a completely unrealistic number

    100 lines, tops. On a very good day

    I think you can almost press the enter key 10k times per day (I mean, actually pressing, without using repetition) without any meaningful time for thinking what you're writing in a line

  • by dudul on 8/7/23, 10:19 PM

    I would be so suspicious of the quality produced by an engineer who types ~15k lines of code per day. Just type 500 and solve the actual business problem in a simple and concise manner thank you very much.
  • by x86_tux on 8/8/23, 10:00 PM

    Put another way, that estimate means "between 4.32 and 8.64 seconds per line, 24 hours a day, no breaks whatsoever", so... No.
  • by tornato7 on 8/7/23, 9:05 PM

    Last time I did a 24-hour all-nighter hackathon I wrote about 3K lines of code, but I would not recommend doing that daily.
  • by AnimalMuppet on 8/7/23, 8:56 PM

    Oh, Google's AI said that? Yeah. Yes, it's completely wrong. No, I can't bother to care.
  • by asyncallan on 8/7/23, 8:47 PM

    No, some days I do not write code. Actually, I don't remember the last time I wrote a lot of code.
  • by thesuperbigfrog on 8/7/23, 10:16 PM

    As a developer, you should write no more code than is needed.

    If the code is not needed, do not write it.

    = "No Code" or Nihilist Software Engineering =

    No code runs faster than no code.

    No code has fewer bugs than no code.

    No code uses less memory than no code.

    No code is easier to understand than no code.

    No code is the best way to have secure and reliable applications. Write nothing; deploy nowhere.

    One of my most productive days was throwing away 1,000 lines of code. -- Ken Thompson

    The cheapest, fastest, and most reliable components are those that aren’t there. -- Gordon Bell

    Deleted code is debugged code. -- Jeff Sickel

    Measuring programming progress by lines of code is like measuring aircraft building progress by weight. -- Bill Gates

    = Master Foo and the Ten Thousand Lines =

    Master Foo once said to a visiting programmer: “There is more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

    The programmer, who was very proud of his mastery of C, said: “How can this be? C is the language in which the very kernel of Unix is implemented!”

    Master Foo replied: “That is so. Nevertheless, there is more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

    The programmer grew distressed. “But through the C language we experience the enlightenment of the Patriarch Ritchie! We become as one with the operating system and the machine, reaping matchless performance!”

    Master Foo replied: “All that you say is true. But there is still more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

    The programmer scoffed at Master Foo and rose to depart. But Master Foo nodded to his student Nubi, who wrote a line of shell script on a nearby whiteboard, and said: “Master programmer, consider this pipeline. Implemented in pure C, would it not span ten thousand lines?”

    The programmer muttered through his beard, contemplating what Nubi had written. Finally he agreed that it was so.

    “And how many hours would you require to implement and debug that C program?” asked Nubi.

    “Many,” admitted the visiting programmer. “But only a fool would spend the time to do that when so many more worthy tasks await him.”

    “And who better understands the Unix-nature?” Master Foo asked. “Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?”

    Upon hearing this, the programmer was enlightened.

    Source: "The Art of Unix Programming" by Eric Raymond