Fun, fun, fun. But first … the code review Preparation Process.
-
Upload
pierce-mills -
Category
Documents
-
view
218 -
download
4
Transcript of Fun, fun, fun. But first … the code review Preparation Process.
Fun, fun, fun
But first … the code review
• Preparation
• Process
Preparation
prepare work products
examine workproducts
prepare reviewpackage
ready forreview?
read package
study workproducts
prepare comments
schedule reviewsend out packages
Author Moderator Reviewers
YN
Work products
• Materials to be reviewed– use cases– class and sequence diagrams– code– test results– complexity risk analysis
• A proposed structure for the review– table of contents of work products– what will be reviewed and the order– what types of issues will be covered
roadmap to code
Structure for the review
• What will be reviewed and the order– Choose use cases/sequence diagrams that
“cover” the majority of (important) code.– Choose classes that are better reviewed
independently– Propose an order of materials so that all
important code is reviewed
Dates
• Author/moderator: when will the work materials be ready?
Preparation
prepare work products
examine workproducts
prepare reviewpackage
ready forreview?
read package
study workproducts
prepare comments
schedule reviewsend out packages
Author Moderator Reviewers
YN
Preparation
prepare work products
examine workproducts
prepare reviewpackage
ready forreview?
read package
study workproducts
prepare comments
schedule reviewsend out packages
Author Moderator Reviewers
YN
Review package
• Intro
• Agenda: The order materials will be reviewed and who is responsible for what
• Criteria (checklist)
Review - criteria
These need to be determined by the author and moderator depending on the situation. For a code review you might consider:
• Does the UML realize the use cases?• Does the code realize the UML?• Does the code reflect good and consistent style?• Is the code easy to understand? Is it simple but not
“clever”? Is it documented as needed?• Is the code efficient?• Is error handling adequate?• Are the underlying algorithm correct and correctly
implemented?• Do common errors occur? missing cases, off-by-one, etc.
Style
• Code appearance: indentation, alignment, whitespace, tabs
• Naming: appropriate choice of names
• Consistency: same style throughout
Preparation
prepare work products
examine workproducts
prepare reviewpackage
ready forreview?
read package
study workproducts
prepare comments
schedule reviewsend out packages
Author Moderator Reviewers
YN
Reviewer responsibility
• Each reviewer should have specific responsibility
• Review materials relevant to those responsibility – your job is to explain the code to the other reviewers
• Test executable
Review process
• Moderator– leads overall discussion– introduces other team members for their
portions
• Reporter – because we only have four reviewers, the reporter will be from the team being reviewed
Review process cont.
• Reviewers– Each member leads on their portion of the
code, explaining how the code works– When not leading, follow along, raise
questions, concerns, point out problems
• Author– Answers questions but is otherwise silent– Shouldn’t be many questions
Decisions
Problems• Problem needs to be fixed and results re-reviewed• Problem needs to be fixed but no re-review necessary
Review• Code does not pass – total re-review necessary• Code passes conditionally – some things need to be
fixed and re-reviewed• Code passes – may need some fixes but the reviewers
don’t need to see them again
Preparation
• LOTS
• We’ll use class time Wed. for you to get ready
But today
• fun, fun, fun
• count off: 0,1…
• group by k mod 4
Brainstorm
• 5 minutes:– what are really cool things you’ve seen in
games; i.e. people catching on fire in sims
• 10 minutes for team game:– >10 things they can do to enhance the fun
factor– record the suggestions for your team
Team meetings
• Discuss & prioritize the recommendations
• Note: you are not expected to implement these (though they may be implemented over the summer)