Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. How many lines-of-code does a developer write (life time)?

How many lines-of-code does a developer write (life time)?

Scheduled Pinned Locked Moved The Lounge
androidcomtutorialquestiondiscussion
46 Posts 29 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Mike Prof Chuck

    I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

    || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

    A Offline
    A Offline
    Amarnath S
    wrote on last edited by
    #18

    I've heard that about thirty years back (when C was more dominant), some managers used to have tools to count the number of semicolons, each semicolon signifying a line as productivity tools. So, some developers used to have lines as ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; which is as many lines of code.

    H 1 Reply Last reply
    0
    • M Mike Prof Chuck

      I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

      || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #19

      let's see. I've written about 10,000 lines this week (strangely enough, I've been counting, and working on a single project so it's easy) gosh. im my life? I've been coding for about 32 years I type faster these days, and have a lot of time to do it these days. and I can crank out what, 520,000 lines a year if I apply myself. *32 years = 16,640,000 lines of code. we'll halve it. 8,320,000 so far. i've probably got another 10 million in me.

      When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

      1 Reply Last reply
      0
      • M musefan

        My boss says a good programmer is the one who uses the least lines of code... so I have made a personal rule of never using line breaks. So that means, one line per application. And I am sure we all know that an application is never really complete. (Customer never happy, customer want more and more.) So that means, in 10 years, I am still yet to finish my first line of code... hmmm... how many decimal places would you like the answer to?

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #20

        lol

        When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

        1 Reply Last reply
        0
        • A Amarnath S

          I've heard that about thirty years back (when C was more dominant), some managers used to have tools to count the number of semicolons, each semicolon signifying a line as productivity tools. So, some developers used to have lines as ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; which is as many lines of code.

          H Offline
          H Offline
          honey the codewitch
          wrote on last edited by
          #21

          for loops counts as 3 lines. glad i barely use linq. LOL

          When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            Are we talking "lines of code" or "original lines of code"? Because I'm pretty sure most of the modern stuff is just copy'n'patse from SO, QA, the back of a cereal packet ...

            Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

            H Offline
            H Offline
            honey the codewitch
            wrote on last edited by
            #22

            i've got a whole routine i cut and pasted from stackoverflow in my project. (it just prints an ascii tree of some data, but still THE SHAME!)

            When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

            1 Reply Last reply
            0
            • M Mike Prof Chuck

              I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

              || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

              S Offline
              S Offline
              Slacker007
              wrote on last edited by
              #23

              120,325,116 lines of code....no less, no more. duh. easy question, next?! :-D

              1 Reply Last reply
              0
              • Richard DeemingR Richard Deeming

                How about keystrokes? :) Keys Left - You have a finite number of keystrokes left in your hands before you die. How many is that?[^]


                "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                F Offline
                F Offline
                Forogar
                wrote on last edited by
                #24

                Apparently I still have 34 novels left. I'd better get started... "It was a dark and stormy night..." :java:

                - I would love to change the world, but they won’t give me the source code.

                1 Reply Last reply
                0
                • M MarkTJohnson

                  Reacher said nothing.

                  P Offline
                  P Offline
                  PeejayAdams
                  wrote on last edited by
                  #25

                  Reacher said nothing. He could tell from the grease stain on the safety-catch that the Glock XP3-15 had been fired three times, yet he had only heard two shots. The smell from the muzzle indicated that the first shot had been fired 42 minutes and 17 seconds prior to the first. Given that the truck had been heading east at an average of 45 MPH, he knew for sure that this was the weapon that had killed Jackson in the warehouse in Topeka, the gun being held at an angle of about 15.6 degrees so that the shell would have severed Jackson's cerebral cortex instantly. The FBI forensic team duly resigned as they felt so crushingly unnecessary ... (I actually really liked the couple of Reacher books I read, but how many do we actually need?)

                  Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

                  1 Reply Last reply
                  0
                  • M musefan

                    My boss says a good programmer is the one who uses the least lines of code... so I have made a personal rule of never using line breaks. So that means, one line per application. And I am sure we all know that an application is never really complete. (Customer never happy, customer want more and more.) So that means, in 10 years, I am still yet to finish my first line of code... hmmm... how many decimal places would you like the answer to?

                    K Offline
                    K Offline
                    kalberts
                    wrote on last edited by
                    #26

                    The goal of every APL programmer is to write the program on a single line. With APL, it is somewhat more realistic than in most other languages, like "The game of life" (from the Wikipedia article on APL): life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} Thirty years ago, I did a little APL programming - but please don't ask me to explain this program. Give me at least three months to decipher it!

                    1 Reply Last reply
                    0
                    • M Mike Prof Chuck

                      I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

                      || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

                      K Offline
                      K Offline
                      kmoorevs
                      wrote on last edited by
                      #27

                      I'm finding that as the years go by, I'm writing less and less new code. That is to say, I encounter fewer situations that I haven't already dealt with. Being lazy, this leads to either copy/pasta and probably some customization, or better the creation of a reusable utility function. Also, the IDEs, particularly intellisense are so much better these days than when I started...this code was generated by a tool. :laugh: That said, a rough estimate would be around 1.8M in 20 years, around 90K/year average, but as stated, the majority would have been written in the first half of that time frame.

                      "Go forth into the source" - Neal Morse

                      1 Reply Last reply
                      0
                      • M musefan

                        My boss says a good programmer is the one who uses the least lines of code... so I have made a personal rule of never using line breaks. So that means, one line per application. And I am sure we all know that an application is never really complete. (Customer never happy, customer want more and more.) So that means, in 10 years, I am still yet to finish my first line of code... hmmm... how many decimal places would you like the answer to?

                        R Offline
                        R Offline
                        realJSOP
                        wrote on last edited by
                        #28

                        Your boss is an idiot, and you can tell him I said so.

                        S 1 Reply Last reply
                        0
                        • M Mike Prof Chuck

                          I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

                          || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

                          K Offline
                          K Offline
                          kalberts
                          wrote on last edited by
                          #29

                          When the VAX supermini was every programmer's dream, DEC published statistics showing that the average production volume for those developers writing the microcode for the 780 (the firs one in the VAX series) was 250 (micro)instructions a year. Everybody knows that you do not leave microcode writing to the novices - those programmers were among the very best that DEC had. Yet it took them, on the average, a full day's work to figure out a single instruction. Since the 780 was the first crop, I guess lots of the effort went into competence building, learning the tools etc. Maybe it even included some tool development. I don't know how DEC did the counting, only that the total number of microcode instructions produced divided by the number of microcode programmers returned about 250 instructions/year per programmer.

                          1 Reply Last reply
                          0
                          • R realJSOP

                            Your boss is an idiot, and you can tell him I said so.

                            S Offline
                            S Offline
                            Slacker007
                            wrote on last edited by
                            #30

                            this

                            1 Reply Last reply
                            0
                            • M Mike Prof Chuck

                              I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

                              || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

                              Mike HankeyM Offline
                              Mike HankeyM Offline
                              Mike Hankey
                              wrote on last edited by
                              #31

                              Approximately 1,243,867, but only 12 without bugs.

                              Technician 1. A person that fixes stuff you can't. 2. One who does precision guesswork based on unreliable data provided by those of questionable knowledge. JaxCoder.com

                              1 Reply Last reply
                              0
                              • M Mike Prof Chuck

                                I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

                                || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

                                D Offline
                                D Offline
                                dandy72
                                wrote on last edited by
                                #32

                                "Lines of code" is a rather meaningless metric, since you can rewrite a line many, many times. And what constitutes a "rewrite of a line" anyway, if a single line then gets broken down into multiple lines (or vice-versa) after some refactoring?

                                1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  Are we talking "lines of code" or "original lines of code"? Because I'm pretty sure most of the modern stuff is just copy'n'patse from SO, QA, the back of a cereal packet ...

                                  Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                  M Offline
                                  M Offline
                                  Mycroft Holmes
                                  wrote on last edited by
                                  #33

                                  Now there's a feat, cut and pasting from a cereal packet. I understand the quality may reflect that as a source but getting the cardboard into into the computer via the screen would be a real trick.

                                  Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

                                  OriginalGriffO 1 Reply Last reply
                                  0
                                  • M Mycroft Holmes

                                    Now there's a feat, cut and pasting from a cereal packet. I understand the quality may reflect that as a source but getting the cardboard into into the computer via the screen would be a real trick.

                                    Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

                                    OriginalGriffO Offline
                                    OriginalGriffO Offline
                                    OriginalGriff
                                    wrote on last edited by
                                    #34

                                    Nah, all you have to do is glue it to the scroll bar so it moves up and down with the rest of the code. Pritt Stick will do it if you smear it on the pixels carefully and use a big enough monitor. Boeing use this all the time for their flight control software.

                                    Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                    1 Reply Last reply
                                    0
                                    • M Mike Prof Chuck

                                      I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

                                      || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

                                      R Offline
                                      R Offline
                                      Rene Balvert
                                      wrote on last edited by
                                      #35

                                      Wouldn't it be more interesting how many keystrokes you typed? if (i==1) vs var result = MyWonderfullData.Where(x => x.FullNameWithoutSpaces).Select().OrderBy().Etc().Etc() makes quite a difference :)

                                      1 Reply Last reply
                                      0
                                      • M Mike Prof Chuck

                                        I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

                                        || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

                                        D Offline
                                        D Offline
                                        dshillito
                                        wrote on last edited by
                                        #36

                                        My whole career was spent programming. My first full-time job after university was in 1972, aged 21. I retired in 2017, aged 66. So I worked for around 45 years. I used to count lines of code at various points and my estimate was that I created around 30,000 lines of debugged production code per year. In the early days it was assembly code. Later it was Pascal, C, C++, Java, VB, C#, Objective C, etc. I think the line count remained the same. I was just more productive in the more recent technologies. So whereas my 30000 lines of assembler code for a PDP11 might have occupied 64KB and was the only code running in the machine (no operating system), my final applications occupied tens or hundreds of megabytes, especially with all of the libraries they brought in. So if I did 30,000 LOC per year for 45 years I must have produced well over one million LOC in my career. And thinking back on the last 2 decades I would say that at least 300,000 of those lines are still in production: 1 desktop app, several Android apps, 1 IOS app and a good proportion of a SAAS webserver-based app. I do not think I ever wrote 10000 lines in a day, even on my most productive day. I guess I often did 1000 or more, especially when it involves a lot of copy/paste/edit. But that was balanced by other days where the emphasis was on meetings, planning, testing, debugging etc. I find it hard to believe that anyone personally (i.e without machine aid) created 10 million or more LOC in a career. E.g. 45 years of 40 hour weeks and ignoring holidays is only 336 million seconds so 10 million LOC would mean creating one line every 33.6 seconds.

                                        1 Reply Last reply
                                        0
                                        • M Mike Prof Chuck

                                          I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?" Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all... Did you ever think about your life-time lines output? Can you roughly count back, from the beginning? Are you over 1 million? 10 million? how many per year? I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.

                                          || You know nothing, Jon Snow. || My Android Label (mbar Software) || My Android Apps in Play Store

                                          U Offline
                                          U Offline
                                          User 11783308
                                          wrote on last edited by
                                          #37

                                          All of these different methods are simply a volume metric and are roughly correlated. But, consider that for a blank link you have to hit the enter key. For a comment, you actually have to type it. For code you also have to type it. For both code and comments you have to think about it and since the comments are about the code, that is relevant. Documentation outside of code also counts in the same way, but probably stripping off the formatting is reasonable. So, simply take the size in bytes of all of the source files. Perhaps it would be worth while to compress each one and then total the size. That would tend to reduce the effect of spaces / tabs and repeated variable names and the length of variable names. Compressing everything together would result in too much reduction in size due to similarities across programs that don't really reflect much. I have found that, in practice, a simple volume metric is a very good predictor of performance and and time required to complete a project.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups