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. Lines of code...

Lines of code...

Scheduled Pinned Locked Moved The Lounge
c++comquestion
39 Posts 25 Posters 0 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.
  • O Oz Solomon

    I guess the main point of my original post was misunderstood. This was not a "I wrote more lines than you" post, nor was it "I write more lines/day than you" post. I simply meant to convey my amazement at the fact that people like you and I could have written such a huge amount of code. > also rewriting code is not counted! ... which is why rewriting does count - you wrote both the original and the rewrite (again - I'm not talking about metrics you need to give to the boss at the end of the release). -Oz --- Grab WndTabs from http://www.wndtabs.com to make your VC++ experience that much more comfortable...

    C Offline
    C Offline
    CodeGuy
    wrote on last edited by
    #16

    Oz, how the heck do you estimate both original and rewrite? CodeGuy The WTL newsgroup: 890 members and growing ... http://groups.yahoo.com/group/wtl

    1 Reply Last reply
    0
    • T Tim Smith

      Boy, that is really hard to say. But a 1,000,000? Even the best programmers only produce 100 lines of working code a day. (From a study many years ago. The average was 5 lines of working code a day.) That comes out to 26,000 lines of working code a year given 5 days a week, 52 weeks a year. Would take 38 years for the best of us to product 1,000,000 lines of code. Tim Smith Descartes Systems Sciences, Inc.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #17

      It's my opinion that anyone who produces an average of five lines of code a day deserves to be paid in banana dollars. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

      G T S 3 Replies Last reply
      0
      • C Christian Graus

        It's my opinion that anyone who produces an average of five lines of code a day deserves to be paid in banana dollars. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

        G Offline
        G Offline
        George
        wrote on last edited by
        #18

        I will agree with that, althought it depends on the job. I was working once for a huge company (about 160,000 staff in total and 3,000 developers world wide) and to comply with ISO 9001 standards the procedure was in place that would effectively make you writing 5 lines of code per week, but at the same time you would write few pages about those lines - what they do etc...

        C 1 Reply Last reply
        0
        • G George

          I will agree with that, althought it depends on the job. I was working once for a huge company (about 160,000 staff in total and 3,000 developers world wide) and to comply with ISO 9001 standards the procedure was in place that would effectively make you writing 5 lines of code per week, but at the same time you would write few pages about those lines - what they do etc...

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #19

          I look for ISO 9001 signs at potential employers offices, and run. As you'd know, ISO guarentees nothing about quality except consistency, and does that by generating wads of useless paperwork. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

          1 Reply Last reply
          0
          • O Oz Solomon

            How do you know Troy - did you have their source code? ;) -Oz --- Grab WndTabs from http://www.wndtabs.com to make your VC++ experience that much more comfortable...

            A Offline
            A Offline
            Andrew Peace
            wrote on last edited by
            #20

            Yes, I wondered that when I first read the post too.....:) > Andrew     "Do you like my mask, it raises the dead...!"     -- Buffy (season 3, Giles)

            1 Reply Last reply
            0
            • C Christian Graus

              It's my opinion that anyone who produces an average of five lines of code a day deserves to be paid in banana dollars. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

              T Offline
              T Offline
              Tim Smith
              wrote on last edited by
              #21

              What the study found is that the difference between the best of the best and the worst of the worst was HUGE. I have met programmers who can't write a line of WORKING code to save themselves. Tim Smith Descartes Systems Sciences, Inc.

              C 1 Reply Last reply
              0
              • T Tim Smith

                What the study found is that the difference between the best of the best and the worst of the worst was HUGE. I have met programmers who can't write a line of WORKING code to save themselves. Tim Smith Descartes Systems Sciences, Inc.

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #22

                I guess the question is one of metrics - lines of code are not really an indicator. For example, if Jim writes a compression algorithm in 20 lines of code and in the same time Bob's algorithm has 200 lines, assuming Bob's isn't better in terms of performance, who did the better job ? Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

                1 Reply Last reply
                0
                • O Oz Solomon

                  How many lines of code have you guys written so far in your life? I'm estimating I've written about 1 million lines :eek:. That might not seem a lot to people who have been at this since the sixties ;) but I still think that its a lot. -Oz --- Grab WndTabs from http://www.wndtabs.com to make your VC++ experience that much more comfortable...

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

                  No idea, couldn't guess. Depends on the project, been on some absolute shit projects where my staying awake was a big win let alone coding. Others I have a mile a minute as I have just clicked with what has to be done and was interested at the same time. Also now I only get to code on my own time, nothing here at work, all development done in the good ol' US of A. Michael Martin Pegasystems Pty Ltd Australia martm@pegasystems.com +61 413-004-018 "Don't belong. Never join. Think for yourself. Peace" - Victor Stone

                  L 1 Reply Last reply
                  0
                  • T Tim Smith

                    Boy, that is really hard to say. But a 1,000,000? Even the best programmers only produce 100 lines of working code a day. (From a study many years ago. The average was 5 lines of working code a day.) That comes out to 26,000 lines of working code a year given 5 days a week, 52 weeks a year. Would take 38 years for the best of us to product 1,000,000 lines of code. Tim Smith Descartes Systems Sciences, Inc.

                    N Offline
                    N Offline
                    Not Active
                    wrote on last edited by
                    #24

                    The average was 5 lines of working code a day Who said it had to work?:)

                    1 Reply Last reply
                    0
                    • T Tim Smith

                      Boy, that is really hard to say. But a 1,000,000? Even the best programmers only produce 100 lines of working code a day. (From a study many years ago. The average was 5 lines of working code a day.) That comes out to 26,000 lines of working code a year given 5 days a week, 52 weeks a year. Would take 38 years for the best of us to product 1,000,000 lines of code. Tim Smith Descartes Systems Sciences, Inc.

                      N Offline
                      N Offline
                      NormDroid
                      wrote on last edited by
                      #25

                      Tim In the early stages of the project, creating classes, functions stubs, you tend to generate tons of code. As the functions are implemented the code output slacks off, by the end of the project - bug fixes etc. you probably end up with 10-20 lines of code a day.

                      1 Reply Last reply
                      0
                      • O Oz Solomon

                        How many lines of code have you guys written so far in your life? I'm estimating I've written about 1 million lines :eek:. That might not seem a lot to people who have been at this since the sixties ;) but I still think that its a lot. -Oz --- Grab WndTabs from http://www.wndtabs.com to make your VC++ experience that much more comfortable...

                        O Offline
                        O Offline
                        ORi x
                        wrote on last edited by
                        #26

                        Some time ago, I programmed an application for a small company and my employer asked me to use a lot of lines of code because if not, that company would think it didn't worth what they pay for it (we gave them the source code), they just wanted to open the project and see thousands of lines so it's the most commented project I've ever programmed, every line had it's comment ! If ( a == b ) { //this is an if } else { //this is an else } ORi:)

                        1 Reply Last reply
                        0
                        • L Lost User

                          No idea, couldn't guess. Depends on the project, been on some absolute shit projects where my staying awake was a big win let alone coding. Others I have a mile a minute as I have just clicked with what has to be done and was interested at the same time. Also now I only get to code on my own time, nothing here at work, all development done in the good ol' US of A. Michael Martin Pegasystems Pty Ltd Australia martm@pegasystems.com +61 413-004-018 "Don't belong. Never join. Think for yourself. Peace" - Victor Stone

                          L Offline
                          L Offline
                          Le Ridder Noir
                          wrote on last edited by
                          #27

                          My collegue writes a lot more code than me, so if we were paid for each line should I work like him. >:confused: Some code of him:

                          BOOL CMyClass::getDirRoot(char* sDirRootPath)
                          {
                          BOOL bRet = TRUE;
                          CString sDirRootPath_tmp = getenv("Root");
                          CString sMsg = "\nRoot = "+ sDirRootPath_tmp;

                          #ifdef _DEBUG
                          acutPrintf(sMsg);
                          #else
                          #endif

                          if (sDirRootPath\_tmp.GetLength () <= 0)
                          {
                          	sMsg = "No Root set";
                          	AfxMessageBox(sMsg,MB\_OK);
                          	bRet = FALSE;
                          }
                          
                          sprintf(sDirRootPath,"%s",sDirRootPath\_tmp);
                          return bRet;
                          

                          }

                          BOOL CMyClass::getDirRoot(CString& sDirRootPath)
                          {
                          BOOL bRet = TRUE;
                          CString sDirRootPath_tmp = getenv("Root");
                          CString sMsg = "\nRoot = "+ sDirRootPath_tmp;

                          #ifdef _DEBUG
                          acutPrintf(sMsg);
                          #else
                          #endif

                          if (sDirRootPath\_tmp.GetLength () <= 0)
                          {
                          	sMsg = "No Root set";
                          	AfxMessageBox(sMsg,MB\_OK);
                          	bRet = FALSE;
                          }
                          
                          sDirRootPath             = sDirRootPath\_tmp;
                          return bRet;
                          

                          }

                          Le Ridder Noir

                          Considderd to be the worlds fastest knoppenbonker.
                          one year of working experience with the worlds fastest copie paster(about 2000 lines a minute).
                          And experience with the one and only NewEra Guru and Crystal Ace.

                          L 1 Reply Last reply
                          0
                          • N Nemanja Trifunovic

                            if ( a == b ) cout << a ; How many lines of code are there? ;P ;P ;P I vote pro drink :beer:

                            U Offline
                            U Offline
                            Uwe Keim
                            wrote on last edited by
                            #28

                            You could do it more: Instead of

                            if ( a == b )
                            cout << a;

                            (2 lines) you could do

                            if
                            (
                            a

                            b
                            )
                            {
                            cout
                            <<
                            a
                            ;
                            }

                            12 lines. Thats an improvement of 600 percent (let alone the comments that I've forgotten) :-). -- See me: www.magerquark.de Want a job? www.zeta-software.de/jobs

                            A 1 Reply Last reply
                            0
                            • U Uwe Keim

                              You could do it more: Instead of

                              if ( a == b )
                              cout << a;

                              (2 lines) you could do

                              if
                              (
                              a

                              b
                              )
                              {
                              cout
                              <<
                              a
                              ;
                              }

                              12 lines. Thats an improvement of 600 percent (let alone the comments that I've forgotten) :-). -- See me: www.magerquark.de Want a job? www.zeta-software.de/jobs

                              A Offline
                              A Offline
                              Anders Molin
                              wrote on last edited by
                              #29

                              or, to make it really bad...

                              i\
                              f
                              (
                              a
                              =\

                              b
                              )
                              {
                              c\
                              o\
                              u\
                              t
                              <\
                              <
                              a
                              ;
                              }

                              It also makes it nearly impossible to debug :rolleyes: - Anders Money talks, but all mine ever says is "Goodbye!"

                              1 Reply Last reply
                              0
                              • T Tim Smith

                                Well, trust me, I didn't take the message as a "Mine is bigger than yours" message. Tim Smith Descartes Systems Sciences, Inc.

                                J Offline
                                J Offline
                                James Pullicino
                                wrote on last edited by
                                #30

                                I hope that we're still talking about lines of code here... :-O (2b || !2b)

                                1 Reply Last reply
                                0
                                • L Le Ridder Noir

                                  My collegue writes a lot more code than me, so if we were paid for each line should I work like him. >:confused: Some code of him:

                                  BOOL CMyClass::getDirRoot(char* sDirRootPath)
                                  {
                                  BOOL bRet = TRUE;
                                  CString sDirRootPath_tmp = getenv("Root");
                                  CString sMsg = "\nRoot = "+ sDirRootPath_tmp;

                                  #ifdef _DEBUG
                                  acutPrintf(sMsg);
                                  #else
                                  #endif

                                  if (sDirRootPath\_tmp.GetLength () <= 0)
                                  {
                                  	sMsg = "No Root set";
                                  	AfxMessageBox(sMsg,MB\_OK);
                                  	bRet = FALSE;
                                  }
                                  
                                  sprintf(sDirRootPath,"%s",sDirRootPath\_tmp);
                                  return bRet;
                                  

                                  }

                                  BOOL CMyClass::getDirRoot(CString& sDirRootPath)
                                  {
                                  BOOL bRet = TRUE;
                                  CString sDirRootPath_tmp = getenv("Root");
                                  CString sMsg = "\nRoot = "+ sDirRootPath_tmp;

                                  #ifdef _DEBUG
                                  acutPrintf(sMsg);
                                  #else
                                  #endif

                                  if (sDirRootPath\_tmp.GetLength () <= 0)
                                  {
                                  	sMsg = "No Root set";
                                  	AfxMessageBox(sMsg,MB\_OK);
                                  	bRet = FALSE;
                                  }
                                  
                                  sDirRootPath             = sDirRootPath\_tmp;
                                  return bRet;
                                  

                                  }

                                  Le Ridder Noir

                                  Considderd to be the worlds fastest knoppenbonker.
                                  one year of working experience with the worlds fastest copie paster(about 2000 lines a minute).
                                  And experience with the one and only NewEra Guru and Crystal Ace.

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

                                  OK I have to ask it. what is a knoppenbonker? Michael Martin Pegasystems Pty Ltd Australia martm@pegasystems.com +61 413-004-018 "Don't belong. Never join. Think for yourself. Peace" - Victor Stone

                                  L 1 Reply Last reply
                                  0
                                  • T Tim Smith

                                    Boy, that is really hard to say. But a 1,000,000? Even the best programmers only produce 100 lines of working code a day. (From a study many years ago. The average was 5 lines of working code a day.) That comes out to 26,000 lines of working code a year given 5 days a week, 52 weeks a year. Would take 38 years for the best of us to product 1,000,000 lines of code. Tim Smith Descartes Systems Sciences, Inc.

                                    P Offline
                                    P Offline
                                    peterchen
                                    wrote on last edited by
                                    #32

                                    He was asking for lines of code, not "working lines of code"....

                                    T 1 Reply Last reply
                                    0
                                    • P peterchen

                                      He was asking for lines of code, not "working lines of code"....

                                      T Offline
                                      T Offline
                                      Tim Smith
                                      wrote on last edited by
                                      #33

                                      I don't consider 'non-working' lines of code to actually be lines of code. They are lines of garbage. Tim Smith Descartes Systems Sciences, Inc.

                                      P 1 Reply Last reply
                                      0
                                      • L Lost User

                                        OK I have to ask it. what is a knoppenbonker? Michael Martin Pegasystems Pty Ltd Australia martm@pegasystems.com +61 413-004-018 "Don't belong. Never join. Think for yourself. Peace" - Victor Stone

                                        L Offline
                                        L Offline
                                        Le Ridder Noir
                                        wrote on last edited by
                                        #34

                                        knoppenbonker == key presser **Le Ridder Noir

                                        Considderd to be the worlds fastest knoppenbonker.
                                        one year of working experience with the worlds fastest copie paster(about 2000 lines a minute).
                                        And experience with the one and only NewEra Guru and Crystal Ace.**

                                        1 Reply Last reply
                                        0
                                        • C Christian Graus

                                          It's my opinion that anyone who produces an average of five lines of code a day deserves to be paid in banana dollars. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

                                          S Offline
                                          S Offline
                                          Steven Mitcham
                                          wrote on last edited by
                                          #35

                                          When you are writing you're own code it's easy to maintain a high level of productivity. However, in the system I'm working on now, I have to insert code into a working system. Since there are sections of the code that no one has looked at in 6 years, It sometimes takes me three or four days of effort to find a one line bug or insert a 20 line enhancement. That's where the low LOC/day figures come from. In addition I am in a CMM Level 3 shop so all of the documentation and procedure documents take a big cut into that. Along with Design and Code Reviews. 20 LOC/day is an awesome spread for me, it usually only happens when I've got a fairly new section of functionality with minimal impacts to the rest of the codebase. When religion and politics help drive the same cart, they tend to drive faster and faster until it is too late to stop when they see the cliff ahead -- Frank Herbert.

                                          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