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 1 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

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

    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!

    "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

    R H M S 4 Replies 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

      J Offline
      J Offline
      Joan M
      wrote on last edited by
      #4

      42

      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

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #5

        Another interesting question would be: "how many lines of code does a developer delete (life time)?".

        M 1 Reply Last reply
        0
        • C CPallini

          Another interesting question would be: "how many lines of code does a developer delete (life time)?".

          M Offline
          M Offline
          musefan
          wrote on last edited by
          #6

          None... that's what comment blocks are for! :-D

          C 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

            M Offline
            M Offline
            maze3
            wrote on last edited by
            #7

            What of the velocity of lines of code written over time. Early on, you might write lots of lines of code. say 1000 lines. push to release. sum = 1000 But 200 of which is bad. So rewrite those. RELEASE! sum = 1200 Then you refactor. cutting out 400 lines. Release is now 600 lines. RELEASE! sum = 1200 + 300 (not 400 as rewrote some multi lines as singular lines) = 1500 Project 2. Very Similar to Project 1. But know you know mistakes. And some extra feature. Same amount of time. 600 lines. RELEASE. sum= 2100 Year 1. 1500 lines. Year 2. 600 lines. Then you build a library of reusable stubs, which you reuse. Released lines of new code I would say goes down. Maybe some increases when figuring out a new language. Oh, but released lines of code would tend to increase. Because that library of support code you use to reduce the amount of new lines you need to write, will increase and bloated to cover the odd and weird corner cases it needs to satisfy.

            M 1 Reply Last reply
            0
            • M maze3

              What of the velocity of lines of code written over time. Early on, you might write lots of lines of code. say 1000 lines. push to release. sum = 1000 But 200 of which is bad. So rewrite those. RELEASE! sum = 1200 Then you refactor. cutting out 400 lines. Release is now 600 lines. RELEASE! sum = 1200 + 300 (not 400 as rewrote some multi lines as singular lines) = 1500 Project 2. Very Similar to Project 1. But know you know mistakes. And some extra feature. Same amount of time. 600 lines. RELEASE. sum= 2100 Year 1. 1500 lines. Year 2. 600 lines. Then you build a library of reusable stubs, which you reuse. Released lines of new code I would say goes down. Maybe some increases when figuring out a new language. Oh, but released lines of code would tend to increase. Because that library of support code you use to reduce the amount of new lines you need to write, will increase and bloated to cover the odd and weird corner cases it needs to satisfy.

              M Offline
              M Offline
              musefan
              wrote on last edited by
              #8

              sum = impossible to know how many It's a silly question to be honest. With your examples, plus any IDE (or other tools) auto generating code, where do you even begin to start counting... (well, I guess technically you start counting at 1)

              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

                M Offline
                M Offline
                Maximilien
                wrote on last edited by
                #9

                stupid metric. I don't write effective (wrong word here) line of code that often, most of the time it is generic boilerplate code to make those those effective line of code work.

                I'd rather be phishing!

                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

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #10

                  write lines of code??? why? post question to CP/SO, wait for replies (check for flames on newbie answers) cut paste ZERO lines of code written.

                  Message Signature (Click to edit ->)

                  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

                    Richard DeemingR Offline
                    Richard DeemingR Offline
                    Richard Deeming
                    wrote on last edited by
                    #11

                    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

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

                    P F 2 Replies 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?

                      P Offline
                      P Offline
                      Power Puff Boy
                      wrote on last edited by
                      #12

                      Not an answer to the question, just a thought... Image you could estimate the lines of code an average developer writes in a lifetime and you could also estimate the lines of code you have already written. Then you could calculate the lines of code you would need to write until you die.

                      BREAKING FAKE NEWS: Trump told the truth!

                      M 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

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

                        That's awesome! I rather suspect that Lee Child, Bernard Cornwell and a fair few others have used up all of theirs by now but their novels keep coming on a daily basis, so I guess they must be using voice recognition software.

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

                        M 1 Reply Last reply
                        0
                        • P Power Puff Boy

                          Not an answer to the question, just a thought... Image you could estimate the lines of code an average developer writes in a lifetime and you could also estimate the lines of code you have already written. Then you could calculate the lines of code you would need to write until you die.

                          BREAKING FAKE NEWS: Trump told the truth!

                          M Offline
                          M Offline
                          musefan
                          wrote on last edited by
                          #14

                          Power Puff Boy wrote:

                          Then you could calculate the lines of code you would need to write until you die.

                          Or perhaps you mean you could calculate how many more lines of code it will take until you drop dead... X|

                          1 Reply Last reply
                          0
                          • M musefan

                            None... that's what comment blocks are for! :-D

                            C Offline
                            C Offline
                            CPallini
                            wrote on last edited by
                            #15

                            That would make my code a colossal collection of comments. :laugh:

                            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!

                              R Offline
                              R Offline
                              raddevus
                              wrote on last edited by
                              #16

                              OriginalGriff wrote:

                              Are we talking "lines of code" or "original lines of code"?

                              Original? As you said, there's no original code now. Just the stuff we keep copying and pasting. I think all the copying started back in K&R C and then Petzold Programming Windows. After that, once it got onto the Internet it's all just copy code. All code can be directly traced back to those two sources. :laugh:

                              1 Reply Last reply
                              0
                              • P PeejayAdams

                                That's awesome! I rather suspect that Lee Child, Bernard Cornwell and a fair few others have used up all of theirs by now but their novels keep coming on a daily basis, so I guess they must be using voice recognition software.

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

                                M Offline
                                M Offline
                                MarkTJohnson
                                wrote on last edited by
                                #17

                                Reacher said nothing.

                                P 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

                                  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
                                          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