Fun, fun, fun. But first … the code review Preparation Process.

20
Fun, fun, fun

Transcript of Fun, fun, fun. But first … the code review Preparation Process.

Page 1: Fun, fun, fun. But first … the code review Preparation Process.

Fun, fun, fun

Page 2: Fun, fun, fun. But first … the code review Preparation Process.

But first … the code review

• Preparation

• Process

Page 3: 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

Page 4: Fun, fun, fun. But first … the code review Preparation Process.

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

Page 5: Fun, fun, fun. But first … the code review Preparation Process.

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

Page 6: Fun, fun, fun. But first … the code review Preparation Process.

Dates

• Author/moderator: when will the work materials be ready?

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

Page 8: 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

Page 9: Fun, fun, fun. But first … the code review Preparation Process.

Review package

• Intro

• Agenda: The order materials will be reviewed and who is responsible for what

• Criteria (checklist)

Page 10: Fun, fun, fun. But first … the code review Preparation Process.

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.

Page 11: Fun, fun, fun. But first … the code review Preparation Process.

Style

• Code appearance: indentation, alignment, whitespace, tabs

• Naming: appropriate choice of names

• Consistency: same style throughout

Page 12: 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

Page 13: Fun, fun, fun. But first … the code review Preparation Process.

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

Page 14: Fun, fun, fun. But first … the code review Preparation Process.

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

Page 15: Fun, fun, fun. But first … the code review Preparation Process.

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

Page 16: Fun, fun, fun. But first … the code review Preparation Process.

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

Page 17: Fun, fun, fun. But first … the code review Preparation Process.

Preparation

• LOTS

• We’ll use class time Wed. for you to get ready

Page 18: Fun, fun, fun. But first … the code review Preparation Process.

But today

• fun, fun, fun

• count off: 0,1…

• group by k mod 4

Page 19: Fun, fun, fun. But first … the code review Preparation Process.

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

Page 20: Fun, fun, fun. But first … the code review Preparation Process.

Team meetings

• Discuss & prioritize the recommendations

• Note: you are not expected to implement these (though they may be implemented over the summer)