code quality refers to
the degree to which software meets certain criteria and standards that make it maintanable readable, reliable, and secure
Advantages Inspections
reduces defect rates
complements testing
identifies code smells
provides additional benefits
Pros Testing
can, at least partly, be automated
can consistently repeat several actions
fast and high volume
Pros Code review
can be used on all types of documents, not just code
can see the complete picture, not only a spot check
can uses all information in the team
can be innovative and inductive
Cons Testing
is only a spot check
can only be used for code
may need several stubs and drivers
Cons code revrie
is difficult to use on compley dynamic situations
unreliable (people can get tired)
slow and low volume
unstructured: ad hoc reading
reads the code without following a set process or using any specific tools
semi structured: checklist based reading
sample checklist for requirement review
requirement specification shall be testable
Requirement specifications shall not conflic with other requirements specifications
Conditional requirements specifications shall cover all cases
Numerical values in requirements specificatons shall include physical units if applicable
sample checklist for code review javascript
code structure and organization
code functionality
code security
code compatibility
code documentation
Best practice of checklist
should be periodically revides
should be concise and fit on one page
should not be too general
should not be used for conventions which are better checked or enforced with software tools
Software reading techniques
unstructures: ad hoc reading
semi-structured: checklist-based reading
structures or systematic reading
defect based reading
perspective based reading
Template for perspective based reading
introduction
explain stakeholders interests
Intruction
how to read and extract informations
Questions
for reviewers to answer by following the instructions
Benefits of perspective based reading
focused
particular converage of part of the document
detailed
instruction and questions
adaptable
to particular sofware artifacts
tailorable
to organizational and project setting
effective factors affecting code review
individual expertise and training
most important factor
amount of materials
not to attempt to inspect too many materials in one cycle
e.g. less than 125 lines of code per hour
teamsize
inspector may not find significantly more defects than 2 inspectors
4 or 2 usually find more defects than 1
process and tool support
with good tool support, inspection meeting may not be necessary
Zuletzt geändertvor 2 Jahren