Loading ...
Sorry, an error occurred while loading the content.

[CMMi Process Improvement] Re: Difference between Code review and Unit Testing

Expand Messages
  • pmicoop
    Ed We consider this practice of having the developers combing code to find defects as embedded into the coding phase itself. Indeed we expect the developers
    Message 1 of 25 , Apr 30 7:08 PM
    • 0 Attachment
      Ed

      We consider this practice of having the developers combing code to find defects as embedded into the coding phase itself. Indeed we expect the developers doing that even before checking in their code and we reinforce doing this in peers.

      However I understand some authors consider this as a distinct practice. It makes sense to my though

      Thanks for the links, good stuff

      Ricardo


      --- In cmmi_process_improvement@yahoogroups.com, "EDWARD F WELLER III" <edwardfwelleriii@...> wrote:
      >
      > Ricardo
      >
      > A code review can and should be much more than checking for standards adherence. The primary purpose is to find defects. All too many standards violations do not cause failures - so the net gain is only in maintenance of code that may not work.
      >
      > Tools have their place in static code analysis, but as many/most are not aware of the design, cannot tell if code that meets the coding standards and language constructs will do what the design (and requirements) state
      >
      > See www.processimpact.com<http://www.processimpact.com/> , http://tarpit.rmc.ca/shepard/492/papers/weller_1993_inspection_IEEE_Software_s5038.pdf<http://tarpit.rmc.ca/shepard/492/papers/weller_1993_inspection_IEEE_Software_s5038.pdf>, and https://goldpractice.thedacs.com/practices/fi/index.php<https://goldpractice.thedacs.com/practices/fi/index.php>
      >
      > Ed
      > ----- Original Message -----
      > From: pmicoop<mailto:ricardo@...>
      > To: cmmi_process_improvement@yahoogroups.com<mailto:cmmi_process_improvement@yahoogroups.com>
      > Sent: Wednesday, April 27, 2011 9:41 AM
      > Subject: [CMMi Process Improvement] Re: Difference between Code review and Unit Testing
      >
      >
      >
      > Praj
      >
      > A code review is a walk throug your source code to check if you are compliant with your corporation's agreeded coding standards.
      >
      > When corporations adopt coding standards it makes the programmers' life easier. Specially when you have multiple programmers working together in the same project. And code maintenance is much safer.
      >
      > I usually recommend the adoption of tools to perform code review.
      >
      > Unit test however is just porforming tests on the smallest testable pieces of your program. For example you can run unit tests that test the various methods of a class or object. Usually it's done by the programmers themselves, not by the testers.
      >
      > Best!
      >
      > --- In cmmi_process_improvement@yahoogroups.com<mailto:cmmi_process_improvement%40yahoogroups.com>, prajakta joshi <praj7in@> wrote:
      > >
      > > Dear Experts
      > >
      > > My team has to write a Code Review process for our organization and I am currently confused on the following points:
      > >
      > > - The objective of performing Code reviews is not clear to my team
      > > - Difference between Code review and Unit testing is not clear.
      > > - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
      > > - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?
      > >
      > > Please provide your help and expert advise on the above, since I am currently confused.
      > >
      > > Thanks in advance.
      > >
      > > Praj
      > >
      >
    • Murali Chemuturi
      Praj CMMI model presupposes a minimum background in software development, software quality assurance, and software project management as prerequisites as well
      Message 2 of 25 , Apr 30 8:04 PM
      • 0 Attachment
        Praj
         
        CMMI model presupposes  a minimum background in software development, software quality assurance, and software project management as prerequisites as well as experience in those areas from the implementers. It also presupposes that CMMI model implementation is championed by the top management which provides resources (qualified human resources, monetary resources, time resources and equipment resources) to take the initiative forward. This forum too, as its name (CMMI Process Improvement) suggests, presupposes such background. From your question, I assume that you are trying to spearhead implementation of CMMI model in your organization perhaps with a view to achieving the coveted appraisal.
         
        Unit testing and peer review are the first level software quality assurance activities. If you are not a software engineer, as you stated, you may not know what these are. But how about your team (you mentioned it in your query) members? Are they,  also, not software engineers?
         
        If none of you are software engineers but are still able to develop software and successfully deliver to clients, then you need to take a course in software quality assurance. You can perhaps ask your technical head to conduct such training program, if budget is not available to hire a professional. That will give you a grounding in the fundamentals of software quality assurance. Self study helps when the subject is familiar and fundamentals are mastered. Then much of CMMI model document become easier to understand.
         
        Questions stem from lack of knowledge, misunderstanding or ambiguity in the material. We must make sure that we do not suffer from a lack of knowledge. You can ask questions to clarify misunderstanding or the ambiguity. I hope that you know that it is inappropriate to ask a PG level question in a kindergarten class and a kindergarten level question in a PG class. Books do certainly help, as I read many books and learned quite a bit. Seminars, tutorials and workshops also helps. So do SPIN meetings and CSI, IEEE meetings. In my book on software quality assurance, I dealt these (verification & validation) topics to about a 100 pages and I could not add more pages because there is a maximum page limit set by the publisher. While your questions is short, the answer needs to fill pages.
         
        Software development has grown beyond mere programming and defining a process to conform to models like ISO or CMMI is definitely not a child’s play.
         
        My suggestions to you -
         
        1. Take a training program in software quality assurance and software project management
        2. Take a training program on Introduction to CMMI
        3. Buy some good books on software development management
        Hope this helps you.
        Best wishes for your success

        Murali Chemuturi
        www.chemuturi.com
        91-40-27220771
        91-0-98850-19461
        USA-347-394-3138
        Author of books - Software Estimation Best Practices, Tools and Techniques, Mastering software project management, and
        Mastering Software Quality Assurance Best Practices Tools and Techniques published by J.Ross Publishing F, USA

         
        Sent: Thursday, April 28, 2011 2:16 PM
        Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing
         
         

        Dear All
         
        Thanks for your response to my questions, however silly they might be. But unfortunately I am not a Software engineer and even after reading google and different books on SE the Engineers in my organization were not clear on the implementation part.
         
        Books and google tell you only theory, but people who are implementing for the first time usually have several questions. I would in fact in future think twice before asking even a single question in this forum since it became an entire issue across the country.
         
        So for gaining knowledge on practical implementation I asked for your advice. Maybe I was unable to frame my questions in a very tactful way so as to them not sounding silly.
         
        We have so much material and presentations on the internet on CMMI model, so then why do we need trainings and why do we have queries, since we can get all answers there.

        Regards
         
        Praj
         

         
         
        Dear Experts

        My team has to write a Code Review process for our organization and I am currently confused on the following points:

        - The objective of performing Code reviews is not clear to my team
        - Difference between Code review and Unit testing is not clear.
        - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
        - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

        Please provide your help and expert advise on the above, since I am currently confused.

        Thanks in advance.

        Praj


      • Thomas Vaidyan
        Hi, For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc In unit testing i will be checking
        Message 3 of 25 , May 5, 2011
        • 0 Attachment
          Hi,

          For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

          In unit testing i will be checking that am i able to input these details.

          In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

          In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

          Regards
          Thomas



          On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
           

          Dear Experts

          My team has to write a Code Review process for our organization and I am currently confused on the following points:

          - The objective of performing Code reviews is not clear to my team
          - Difference between Code review and Unit testing is not clear.
          - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
          - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

          Please provide your help and expert advise on the above, since I am currently confused.

          Thanks in advance.

          Praj


        • EDWARD F WELLER III
          Thomas The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the
          Message 4 of 25 , May 5, 2011
          • 0 Attachment
            Thomas
             
            The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the real worth disappears
            This distinction is made clear by the definition of Major and Minor defect in the Fagan papers on Inspections as well as the books written on inspections.
             
            ----- Original Message -----
            Sent: Thursday, May 05, 2011 3:12 AM
            Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

             

            Hi,

            For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

            In unit testing i will be checking that am i able to input these details.

            In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

            In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

            Regards
            Thomas



            On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
             

            Dear Experts

            My team has to write a Code Review process for our organization and I am currently confused on the following points:

            - The objective of performing Code reviews is not clear to my team
            - Difference between Code review and Unit testing is not clear.
            - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
            - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

            Please provide your help and expert advise on the above, since I am currently confused.

            Thanks in advance.

            Praj


          • Thomas Vaidyan
            Hi Edward, Thanks for correcting me. What type of bugs are found from code review and what type are from unit testing? Regards Thomas On Thu, May 5, 2011 at
            Message 5 of 25 , May 10, 2011
            • 0 Attachment
              Hi Edward,

              Thanks for correcting me. What type of bugs are found from code review and what type are from unit testing?



              Regards
              Thomas

              On Thu, May 5, 2011 at 7:38 PM, EDWARD F WELLER III <edwardfwelleriii@...> wrote:
               

              Thomas
               
              The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the real worth disappears
              This distinction is made clear by the definition of Major and Minor defect in the Fagan papers on Inspections as well as the books written on inspections.
               
              ----- Original Message -----
              Sent: Thursday, May 05, 2011 3:12 AM
              Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

               

              Hi,

              For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

              In unit testing i will be checking that am i able to input these details.

              In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

              In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

              Regards
              Thomas



              On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
               

              Dear Experts

              My team has to write a Code Review process for our organization and I am currently confused on the following points:

              - The objective of performing Code reviews is not clear to my team
              - Difference between Code review and Unit testing is not clear.
              - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
              - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

              Please provide your help and expert advise on the above, since I am currently confused.

              Thanks in advance.

              Praj



            • Jeff Dalton
              Thomas, Any type of bugs CAN be found in code review. But in my own experience, code reviews are much more about code style, standards, and logic. It s
              Message 6 of 25 , May 10, 2011
              • 0 Attachment
                Thomas,

                Any type of bugs CAN be found in code review.  But in my own experience, code reviews are much more about code style, standards, and logic.  It's difficult to find actual bugs in the code by just looking at it.

                Unit tests can find actual "bugs" (incorrect code or logic) but are not useful at identifying styling, standards, or architectural problems.  YMMV.

                Jeff

                Jeff Dalton
                President, Broadsword

                Certified SCAMPI Lead Appraiser
                Certified CMMI Instructor
                Certified CMMI for Practitioners Instructor
                Scrum Master

                Office: 248.341.3367
                Fax:      248.341.3672
                `

                Read Jeff's writings at http://askTheCMMIAppraiser.com

                Follow Jeff's Tweets: CMMIAppraiser



                From: Thomas Vaidyan <thomas.sqa@...>
                Reply-To: <cmmi_process_improvement@yahoogroups.com>
                Date: Tue, 10 May 2011 16:38:01 +0530
                To: <cmmi_process_improvement@yahoogroups.com>
                Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                 

                Hi Edward,

                Thanks for correcting me. What type of bugs are found from code review and what type are from unit testing?



                Regards
                Thomas

                On Thu, May 5, 2011 at 7:38 PM, EDWARD F WELLER III <edwardfwelleriii@...> wrote:
                 

                Thomas
                 
                The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the real worth disappears
                This distinction is made clear by the definition of Major and Minor defect in the Fagan papers on Inspections as well as the books written on inspections.
                 
                ----- Original Message -----
                Sent: Thursday, May 05, 2011 3:12 AM
                Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                 

                Hi,

                For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

                In unit testing i will be checking that am i able to input these details.

                In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

                In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

                Regards
                Thomas



                On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
                 

                Dear Experts

                My team has to write a Code Review process for our organization and I am currently confused on the following points:

                - The objective of performing Code reviews is not clear to my team
                - Difference between Code review and Unit testing is not clear.
                - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                Please provide your help and expert advise on the above, since I am currently confused.

                Thanks in advance.

                Praj



              • EDWARD F WELLER III
                see my earlier response with suggested reading Ed ... From: Thomas Vaidyan To:
                Message 7 of 25 , May 10, 2011
                • 0 Attachment
                  see my earlier response with suggested reading
                   
                  Ed
                  ----- Original Message -----
                  Sent: Tuesday, May 10, 2011 4:08 AM
                  Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                   

                  Hi Edward,

                  Thanks for correcting me. What type of bugs are found from code review and what type are from unit testing?



                  Regards
                  Thomas

                  On Thu, May 5, 2011 at 7:38 PM, EDWARD F WELLER III <edwardfwelleriii@...> wrote:
                   

                  Thomas
                   
                  The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the real worth disappears
                  This distinction is made clear by the definition of Major and Minor defect in the Fagan papers on Inspections as well as the books written on inspections.
                   
                  ----- Original Message -----
                  Sent: Thursday, May 05, 2011 3:12 AM
                  Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                   

                  Hi,

                  For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

                  In unit testing i will be checking that am i able to input these details.

                  In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

                  In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

                  Regards
                  Thomas



                  On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
                   

                  Dear Experts

                  My team has to write a Code Review process for our organization and I am currently confused on the following points:

                  - The objective of performing Code reviews is not clear to my team
                  - Difference between Code review and Unit testing is not clear.
                  - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                  - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                  Please provide your help and expert advise on the above, since I am currently confused.

                  Thanks in advance.

                  Praj



                • EDWARD F WELLER III
                  Jeff YMMV - my experience was just the opposite - we concentrated on finding faults in logic, incorrect interpretation of design, errors in interfaces and data
                  Message 8 of 25 , May 10, 2011
                  • 0 Attachment
                    Jeff
                     
                    YMMV - my experience was just the opposite - we concentrated on finding faults in logic, incorrect interpretation of design, errors in interfaces and data structure, etc and found anywhere from 10-22 major defects per 1000 LOC. We found that 8-12% of our fixes were incorrect (one or more defects per fix). This was in mainframe operating system code.
                     
                    Later, as reported by Norm Brown, on the Iridium Project inspections found about 80% of the defects injected during development, leaving 20% to be found in test.
                     
                    I have also seen inspections poorly implemented and virtually useless in finding defects. In fact, a u-chart of defect density showed that any defect detection was a 3-Sigma outlier. Radice in his book argues that this should be the case if the defect injection rate/personal review are working properly, but in this case the end-to-end process was chaotic.
                    Ed
                     
                    Ed
                    ----- Original Message -----
                    Sent: Tuesday, May 10, 2011 7:12 AM
                    Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                     

                    Thomas,

                    Any type of bugs CAN be found in code review.  But in my own experience, code reviews are much more about code style, standards, and logic.  It's difficult to find actual bugs in the code by just looking at it.

                    Unit tests can find actual "bugs" (incorrect code or logic) but are not useful at identifying styling, standards, or architectural problems.  YMMV.

                    Jeff

                    Jeff Dalton
                    President, Broadsword

                    Certified SCAMPI Lead Appraiser
                    Certified CMMI Instructor
                    Certified CMMI for Practitioners Instructor
                    Scrum Master

                    Office: 248.341.3367
                    Fax:      248.341.3672
                    `

                    Read Jeff's writings at http://askTheCMMIAppraiser.com

                    Follow Jeff's Tweets: CMMIAppraiser



                    From: Thomas Vaidyan <thomas.sqa@...>
                    Reply-To: <cmmi_process_improvement@yahoogroups.com>
                    Date: Tue, 10 May 2011 16:38:01 +0530
                    To: <cmmi_process_improvement@yahoogroups.com>
                    Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                     

                    Hi Edward,

                    Thanks for correcting me. What type of bugs are found from code review and what type are from unit testing?



                    Regards
                    Thomas

                    On Thu, May 5, 2011 at 7:38 PM, EDWARD F WELLER III <edwardfwelleriii@...> wrote:
                     

                    Thomas
                     
                    The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the real worth disappears
                    This distinction is made clear by the definition of Major and Minor defect in the Fagan papers on Inspections as well as the books written on inspections.
                     
                    ----- Original Message -----
                    Sent: Thursday, May 05, 2011 3:12 AM
                    Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                     

                    Hi,

                    For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

                    In unit testing i will be checking that am i able to input these details.

                    In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

                    In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

                    Regards
                    Thomas



                    On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
                     

                    Dear Experts

                    My team has to write a Code Review process for our organization and I am currently confused on the following points:

                    - The objective of performing Code reviews is not clear to my team
                    - Difference between Code review and Unit testing is not clear.
                    - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                    - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                    Please provide your help and expert advise on the above, since I am currently confused.

                    Thanks in advance.

                    Praj



                  • Jeff Dalton
                    Interesting - every culture is different! Jeff Jeff Dalton Broadsword 248.709.4775 Sent from my Verizon Wireless BlackBerry ... From: EDWARD F WELLER III
                    Message 9 of 25 , May 10, 2011
                    • 0 Attachment
                      Interesting - every culture is different!

                      Jeff

                      Jeff Dalton
                      Broadsword
                      248.709.4775

                      Sent from my Verizon Wireless BlackBerry


                      From: "EDWARD F WELLER III" <edwardfwelleriii@...>
                      Sender: cmmi_process_improvement@yahoogroups.com
                      Date: Tue, 10 May 2011 15:04:13 -0700
                      To: <cmmi_process_improvement@yahoogroups.com>
                      ReplyTo: cmmi_process_improvement@yahoogroups.com
                      Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                       

                      Jeff
                       
                      YMMV - my experience was just the opposite - we concentrated on finding faults in logic, incorrect interpretation of design, errors in interfaces and data structure, etc and found anywhere from 10-22 major defects per 1000 LOC. We found that 8-12% of our fixes were incorrect (one or more defects per fix). This was in mainframe operating system code.
                       
                      Later, as reported by Norm Brown, on the Iridium Project inspections found about 80% of the defects injected during development, leaving 20% to be found in test.
                       
                      I have also seen inspections poorly implemented and virtually useless in finding defects. In fact, a u-chart of defect density showed that any defect detection was a 3-Sigma outlier. Radice in his book argues that this should be the case if the defect injection rate/personal review are working properly, but in this case the end-to-end process was chaotic.
                      Ed
                       
                      Ed
                      ----- Original Message -----
                      Sent: Tuesday, May 10, 2011 7:12 AM
                      Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                       

                      Thomas,

                      Any type of bugs CAN be found in code review.  But in my own experience, code reviews are much more about code style, standards, and logic.  It's difficult to find actual bugs in the code by just looking at it.

                      Unit tests can find actual "bugs" (incorrect code or logic) but are not useful at identifying styling, standards, or architectural problems.  YMMV.

                      Jeff

                      Jeff Dalton
                      President, Broadsword

                      Certified SCAMPI Lead Appraiser
                      Certified CMMI Instructor
                      Certified CMMI for Practitioners Instructor
                      Scrum Master

                      Office: 248.341.3367
                      Fax:      248.341.3672
                      `

                      Read Jeff's writings at http://askTheCMMIAppraiser.com

                      Follow Jeff's Tweets: CMMIAppraiser



                      From: Thomas Vaidyan <thomas.sqa@...>
                      Reply-To: <cmmi_process_improvement@yahoogroups.com>
                      Date: Tue, 10 May 2011 16:38:01 +0530
                      To: <cmmi_process_improvement@yahoogroups.com>
                      Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                       

                      Hi Edward,

                      Thanks for correcting me. What type of bugs are found from code review and what type are from unit testing?



                      Regards
                      Thomas

                      On Thu, May 5, 2011 at 7:38 PM, EDWARD F WELLER III <edwardfwelleriii@...> wrote:
                       

                      Thomas
                       
                      The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the real worth disappears
                      This distinction is made clear by the definition of Major and Minor defect in the Fagan papers on Inspections as well as the books written on inspections.
                       
                      ----- Original Message -----
                      Sent: Thursday, May 05, 2011 3:12 AM
                      Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                       

                      Hi,

                      For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

                      In unit testing i will be checking that am i able to input these details.

                      In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

                      In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

                      Regards
                      Thomas



                      On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
                       

                      Dear Experts

                      My team has to write a Code Review process for our organization and I am currently confused on the following points:

                      - The objective of performing Code reviews is not clear to my team
                      - Difference between Code review and Unit testing is not clear.
                      - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                      - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                      Please provide your help and expert advise on the above, since I am currently confused.

                      Thanks in advance.

                      Praj



                    • KUMAR RAHUL
                      Dear Thomas, The code reviews are not meant to just find the standard violations. There are problems which are not a standard violation and yet cannot be found
                      Message 10 of 25 , May 11, 2011
                      • 0 Attachment
                        Dear Thomas,
                         
                        The code reviews are not meant to just find the standard violations. There are problems which are not a standard violation and yet cannot be found by performing unit testing.
                         
                        Take an example of application which should retrieve some information from database after authenticating the user. This can be done in two ways (I am sure there will be more efficient ways available than the two mentioned below):
                        • Authenticate the user through database query and return back to the application with appropriate message. Make a second hit at the database to retrieve the information sought by the user.
                        • Authenticate the user through a database query and fetch the information sought by the user. Just one hit at the database.
                        While both of these work well, there will be a more cost involved in first case compared to the later. Will you be able to find it through unit testing? The purpose of code review is also to understand how one has implemented such logics, which at times in not a standard violation but a faulty design issue.
                         
                        Regards
                        Rahul
                         
                        On Tue, May 10, 2011 at 7:50 PM, EDWARD F WELLER III <edwardfwelleriii@...> wrote:
                         

                        see my earlier response with suggested reading
                         
                        Ed
                        ----- Original Message -----
                        Sent: Tuesday, May 10, 2011 4:08 AM
                        Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                         

                        Hi Edward,

                        Thanks for correcting me. What type of bugs are found from code review and what type are from unit testing?



                        Regards
                        Thomas

                        On Thu, May 5, 2011 at 7:38 PM, EDWARD F WELLER III <edwardfwelleriii@...> wrote:
                         

                        Thomas
                         
                        The primary purpose of code reviews as stated by Fagan and others is to find defects. Once reviews become only searches for standards violations the real worth disappears
                        This distinction is made clear by the definition of Major and Minor defect in the Fagan papers on Inspections as well as the books written on inspections.
                         
                        ----- Original Message -----
                        Sent: Thursday, May 05, 2011 3:12 AM
                        Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                         

                        Hi,

                        For example am having an application which has to fill the personal details of the user such as Name, Age, Email etc

                        In unit testing i will be checking that am i able to input these details.

                        In code review some one other than me will be checking the code which I have written has followed the standards defined by our company such as the naming conventions used, comments given, variable deceleration   etc.

                        In simple words unit testing ensures that the unit (functionality) developed is working fine or not; where as Code review ensures that the coding standards has been met or not.

                        Regards
                        Thomas



                        On Sat, Apr 23, 2011 at 6:13 PM, prajakta joshi <praj7in@...> wrote:
                         

                        Dear Experts

                        My team has to write a Code Review process for our organization and I am currently confused on the following points:

                        - The objective of performing Code reviews is not clear to my team
                        - Difference between Code review and Unit testing is not clear.
                        - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                        - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                        Please provide your help and expert advise on the above, since I am currently confused.

                        Thanks in advance.

                        Praj




                      • eileen immanuel
                        Hi Praj, - The objective of performing Code reviews is not clear to my team - Objective of performing code review is to find any problem in the code at the
                        Message 11 of 25 , May 12, 2011
                        • 0 Attachment
                          Hi Praj,
                           
                          - The objective of performing Code reviews is not clear to my team - Objective of performing code review is to find any problem in the code at the earliest. So that we can fix it.
                           
                          - Difference between Code review and Unit testing is not clear. Code review usually is a static review, meaning you only go through the code. But you usually dont execute it. 
                           
                           Unit Testing is where you write some code to test code.Eg. Junit is a unit testing framework for Java and Nunit for Dot net. Usually Unit testing will be done by the development team. And unit tests executed whenever a new build is generated or when we make any changes to the code, just to ensure that no functionality is broken.

                          - Do Code reviews have to be conducted by peers and cannot be done by developers themselves? A peer is any person in the same group. A peer in a development team is a developer. A peer in a testing team is a tester.  So, the code review for developer 1 can be done by developer 2. As in they can shuffle the code and review it among themselves. The lead developer can also do review (just to double check!!)
                           

                          - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                          The above answer will help you. Peer is a developer so..they dont need to study it. In case in ur company u have testers also who are closely working with development team..then they need to have the competency to review code and they may need to know a bit about functionality. But if its only ur development team that is working on development then, they dont need to learn anything else new.
                           
                           
                          Let me know if you have any more questions.

                          Regards,
                          Eileen
                          "Never look down on anybody unless you're helping him up."  ~Jesse Jackson

                           

                          From: Putcha V. Narasimham <putchavn@...>
                          To: "cmmi_process_improvement@yahoogroups.com" <cmmi_process_improvement@yahoogroups.com>
                          Sent: Sun, 24 April, 2011 2:26:24 PM
                          Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                           

                          Murali's observation is applicable to many organizations.
                           
                          It is well known in some Indian and Multinational IT companies (2000 to 2006) that "Quality Management" is the art of "Managing to get Quality Certification ---Not necessarily achieving Quality in Managing the Business / services / products".  
                           
                          I have put this to test in a few organizations where the top managements were willing to approve budget for Quality Certification / Assessment. At a fraction of the cost, I offered to establish QMS and conduct informal but rigorous audit / assessment for the guidance of top management.  I advised the managements to invite interested parties to conduct second party audit but not to get / advertise third party quality certification.  
                           
                          Needless to say---every management preferred third party certification.  Need we say what they DID NOT CARE ABOUT? 
                           
                          Home: 040 6666 9393 Mobile: 9866071582.          
                          Putcha V. Narasimham
                          The best anywhere must reach the needy everywhere
                          Knowledge Enabler Systems (Kenablersys)

                          From: Murali Chemuturi <murali_chemuturi@...>
                          To: cmmi_process_improvement@yahoogroups.com
                          Sent: Sunday, 24 April 2011 7:54 AM
                          Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                           
                          Hi Ed
                           
                          I appreciate your taking time to answer this question. It is beyond my imagination that companies could be successfully exporting software to USA without knowing the difference between unit testing and peer review.
                           
                          I have been consulting in Indian companies for sometime. I am not surprised at the queries coming out from them. In one company I found that the quality department is led by a person whose qualification was Bachelors in journalism! He never wrote a line of code nor any experience in QA leave alone SQA.  In another company, the quality department was led by a graduate in biological sciences. This guy too had no expertise whatsoever in software development. In both cases, the guys were of very junior designation. I am told that those guys got the job because they are relatives of some higher up in the organization.
                           
                          In another company, the managing director (owner) stated in a meeting that he doesn’t want any managers including project managers in his organization. And he wants CMMI level 5 appraisal!
                           
                          It appears to me that the below company needs training in the concepts of quality assurance first and Intro to CMMI next.
                           
                          All the best
                          Best wishes for your success

                          Murali Chemuturi
                          www.chemuturi.com
                          91-40-27220771
                          91-0-98850-19461
                          USA-347-394-3138
                          Author of books - Software Estimation Best Practices, Tools and Techniques, Mastering software project management, and
                          Mastering Software Quality Assurance Best Practices Tools and Techniques published by J.Ross Publishing F, USA

                           
                           
                          Sent: Saturday, April 23, 2011 11:43 PM
                          Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing
                           
                           
                          Praj,
                          a Google search on software inspections should be a good place to start. The coverage is much greater than we can provide here
                           
                          I would also suggest buying one of the books available on inspections - Amazon has a list
                           
                          To briefly answer your questions:
                           
                          "The objective of performing Code reviews is not clear to my team"
                          Early and less costly removal of defects - if this is not evident, believed, or understood by your team, then you have a lot of work to do to capture the real cost of defects found later in test to show this is true
                           
                          "Difference between Code review and Unit testing is not clear."
                          What have you done to explain the difference so far. Simply put, a review is static testing where the "mark 2 eyeball" and "Mark one computer" (human brain) evaluate code (or other work products) for correctness with the intention of finding defects. Unit testing (dynamic testing) is where you execute the code, observe failures, and attempt to find the defect by analysis of the symptoms observed
                           
                          "- Do Code reviews have to be conducted by peers and cannot be done by developers themselves?"
                          Other developers ARE the peers. What is your definition of peer?
                           
                          "- If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?"
                          if they do not understand what the code is supposed to do, how can they find defects? Perhaps this question is due to the misunderstanding of the term "peers"?
                           
                           
                           
                          ----- Original Message -----
                          Sent: Saturday, April 23, 2011 5:43 AM
                          Subject: [CMMi Process Improvement] Difference between Code review and Unit Testing
                           
                           
                          Dear Experts

                          My team has to write a Code Review process for our organization and I am currently confused on the following points:

                          - The objective of performing Code reviews is not clear to my team
                          - Difference between Code review and Unit testing is not clear.
                          - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                          - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                          Please provide your help and expert advise on the above, since I am currently confused.

                          Thanks in advance.

                          Praj


                        • prashant.swaroop@accenture.com
                          I know that this is an old post and quite a risky one also but I do agree with Ed and Murali on this. We should respect people time and experience rather than
                          Message 12 of 25 , Jul 29, 2011
                          • 0 Attachment

                            I know that this is an old post and quite a risky one also but I do agree with Ed and Murali on this. We should respect people time and experience rather than posting basic question in this forum. I have been following this forum for many years now and this is where you meet and get an “expert advice” but simply because it is free, does not mean that anyone can post anything. Please do research and take time to understand and even then if you have questions, we are there to help you.

                             

                            Basic Quality/Process questions should be refrained from.

                             

                            Regards

                            Prashant

                             

                            From: cmmi_process_improvement@yahoogroups.com [mailto:cmmi_process_improvement@yahoogroups.com] On Behalf Of EDWARD F WELLER III
                            Sent: Saturday, April 23, 2011 11:43 PM
                            To: cmmi_process_improvement@yahoogroups.com
                            Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                             

                             

                            Praj,

                            a Google search on software inspections should be a good place to start. The coverage is much greater than we can provide here

                             

                            I would also suggest buying one of the books available on inspections - Amazon has a list

                             

                            To briefly answer your questions:

                             

                            "The objective of performing Code reviews is not clear to my team"

                            Early and less costly removal of defects - if this is not evident, believed, or understood by your team, then you have a lot of work to do to capture the real cost of defects found later in test to show this is true

                             

                            "Difference between Code review and Unit testing is not clear."

                            What have you done to explain the difference so far. Simply put, a review is static testing where the "mark 2 eyeball" and "Mark one computer" (human brain) evaluate code (or other work products) for correctness with the intention of finding defects. Unit testing (dynamic testing) is where you execute the code, observe failures, and attempt to find the defect by analysis of the symptoms observed

                             

                            "- Do Code reviews have to be conducted by peers and cannot be done by developers themselves?"

                            Other developers ARE the peers. What is your definition of peer?

                             

                            "- If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?"
                            if they do not understand what the code is supposed to do, how can they find defects? Perhaps this question is due to the misunderstanding of the term "peers"?

                             

                             

                             

                            ----- Original Message -----

                            Sent: Saturday, April 23, 2011 5:43 AM

                            Subject: [CMMi Process Improvement] Difference between Code review and Unit Testing

                             

                             

                            Dear Experts

                            My team has to write a Code Review process for our organization and I am currently confused on the following points:

                            - The objective of performing Code reviews is not clear to my team
                            - Difference between Code review and Unit testing is not clear.
                            - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                            - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                            Please provide your help and expert advise on the above, since I am currently confused.

                            Thanks in advance.

                            Praj



                            This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
                          • Orhan Kalayci
                            I disagree that it was not a good question. I believe it was such a good question that thanks to this question some people including some experts of this group
                            Message 13 of 25 , Jul 30, 2011
                            • 0 Attachment
                              I disagree that it was not a good question. I believe it was such a good question that thanks to this question some people including some experts of this group have learned that code review is not limited to just checking naming convention and coding standard but during code review important coding (design) decisions can be reviewed and errors in those decisions can be found such as how data is retrieved from db and how transactions are handled. 

                              Just like cost of mistakes made in early phases of lifecycle is so high, similarly cost of misunderstandings in fundamental concepts or concepts related to spirit of cmmi (such as alternative practices, process areas vs processes, importance of not skipping levels, importance of stability of processes and other statistical fundamentals) is so high that we need to encourage people asking such fundamental questions.   

                              Cheers, 
                              Orhan 
                              Toronto

                              Sent from my iPhone

                              On 2011-07-29, at 8:30 AM, <prashant.swaroop@...> wrote:

                               

                              I know that this is an old post and quite a risky one also but I do agree with Ed and Murali on this. We should respect people time and experience rather than posting basic question in this forum. I have been following this forum for many years now and this is where you meet and get an “expert advice” but simply because it is free, does not mean that anyone can post anything. Please do research and take time to understand and even then if you have questions, we are there to help you.

                               

                              Basic Quality/Process questions should be refrained from.

                               

                              Regards

                              Prashant

                               

                              From: cmmi_process_improvement@yahoogroups.com [mailto:cmmi_process_improvement@yahoogroups.com] On Behalf Of EDWARD F WELLER III
                              Sent: Saturday, April 23, 2011 11:43 PM
                              To: cmmi_process_improvement@yahoogroups.com
                              Subject: Re: [CMMi Process Improvement] Difference between Code review and Unit Testing

                               

                               

                              Praj,

                              a Google search on software inspections should be a good place to start. The coverage is much greater than we can provide here

                               

                              I would also suggest buying one of the books available on inspections - Amazon has a list

                               

                              To briefly answer your questions:

                               

                              "The objective of performing Code reviews is not clear to my team"

                              Early and less costly removal of defects - if this is not evident, believed, or understood by your team, then you have a lot of work to do to capture the real cost of defects found later in test to show this is true

                               

                              "Difference between Code review and Unit testing is not clear."

                              What have you done to explain the difference so far. Simply put, a review is static testing where the "mark 2 eyeball" and "Mark one computer" (human brain) evaluate code (or other work products) for correctness with the intention of finding defects. Unit testing (dynamic testing) is where you execute the code, observe failures, and attempt to find the defect by analysis of the symptoms observed

                               

                              "- Do Code reviews have to be conducted by peers and cannot be done by developers themselves?"

                              Other developers ARE the peers. What is your definition of peer?

                               

                              "- If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?"
                              if they do not understand what the code is supposed to do, how can they find defects? Perhaps this question is due to the misunderstanding of the term "peers"?

                               

                               

                               

                              ----- Original Message -----

                              Sent: Saturday, April 23, 2011 5:43 AM

                              Subject: [CMMi Process Improvement] Difference between Code review and Unit Testing

                               

                               

                              Dear Experts

                              My team has to write a Code Review process for our organization and I am currently confused on the following points:

                              - The objective of performing Code reviews is not clear to my team
                              - Difference between Code review and Unit testing is not clear.
                              - Do Code reviews have to be conducted by peers and cannot be done by developers themselves?
                              - If code reviews are to be conducted by peers, then is it necessary for them to study the functionality first?

                              Please provide your help and expert advise on the above, since I am currently confused.

                              Thanks in advance.

                              Praj



                              This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.

                            • Your message has been successfully submitted and would be delivered to recipients shortly.