Points.com fisheye crucible code reviews 2011

Preview:

DESCRIPTION

Points.com Fisheye Crucible Code Reviews 2011

Citation preview

1

Private and ConfidentialPrivate and Confidential

April 10, 2023

Private and Confidential

Fisheye, Crucibleand the wonders of 

Code Reviews

Thank you Atlassian!

Created by Michael LossosPoints.com

July 2011

Private & Confidential

2

Private and ConfidentialPrivate and Confidential

Agenda

• Why code reviews?• Code review tips• What's Fisheye for?• What's Crucible for?• Fisheye answers• Crucible workflows

3

Why code reviews?

• Catch bugs and design flaws early.• Help teammates learn.• Enforce coding standards, consistency.• Ensure architecture alignment. • Review tests. 

4

When do code reviews?

• Early and Often.• Daily.• Theme: small commits, incremental changes,

frequent small reviews.• This is less work...

o Than fixing buggy bug bugs.o Than fatty reviews.o Than big bang commits.

5

Code reviews: what to look for

• Design or logic errors.• Missing parameter / pre-condition checks.• Bad/missing exception handling.• Incorrect log levels (error -> info).• Useless log messages (not enough context).• Long methods (> 20 - 50 lines of code).• Potential side effects.• Missing comments/docs on interfaces.

More at: https://mwiki.points.com/wiki/Code_Reviews

6

What's Fisheye for?

• Fisheye aka FE• ViewVC replacement.• Source code:

oBrowsing / viewingoComparisonoSearchoMonitoring (activity stream)

7

What's Crucible for?

• Crucible aka CRU*• Code reviews.

oPre and post commit.• Collaboration.

oComments in reviews.oNotifications.

• Release branch code checks.

    *FishEye + Crucible = FECRU   ;)

8

Fisheye answers (1)

• What changes are in this release? o commit graph, hover on dots to ctrl+c changeset#

• Were these commits merged between branches?

9

Fisheye commit graph (1)

10

Fisheye commit graph (2)

Copy changeset numbers.

11

Fisheye answers (2)

• What commits associated with a JIRA issue?• What code reviews are there for this code?

12

Fisheye commit graph (3): reviews

13

Fisheye answers (3)

• Who made that change? o line by line blame

• When was that change introduced? o start date for bugs

14

Fisheye/Crucible file diff: blame by line

15

Fisheye answers (4)

Where's that code? • Search, browse, by filename

16

Fisheye answers (5)

Where's that code? • QuickNav bar

o CamelCase filename wildcard matching 

o e.g. BI => BuyImpl => BuyServiceImpl

17

Fisheye answers (5)

• How can I share a link to this file in FE?• How can I filter changesets in a diff?

18

Crucible: creating reviews (1)

• Anyone creates a review *o Committer usually creates review

• Add reviewerso Notifications

• Link to JIRA• Finding changes: 

o Browseo Search: author/branch

*Anyone with a login + license

19

Crucible: creating reviews (2)

20

Crucible: creating reviews (3)

21

Crucible: creating reviews (4)By author, date, etc.

22

Crucible: creating reviews (5)

23

Crucible: navigating reviews (0)

24

Crucible: navigating reviews (1)

Comments, creating defects.

25

Crucible: navigating reviews (2)

Flipping through comments, filters. 

26

Crucible: navigating reviews (3)

Side by side diffs, unified diffs, context.

27

Crucible: navigating reviews (4)

• Files marked as reviewed.

• Progress meter => done. 

• Mark complete, summary.

28

Happy Linking: Fisheye <=> Crucible <=> JIRA

29

Happy Linking: Fisheye <=> Crucible <=> JIRA (2)

30

Getting Started

• Who to contact• Licenses • Unified usernames• Our Crucible/Fisheye

31

Slightly More Advanced Stuff

• Pre-commit CRs: Snippets• Pre-commit CRs: Eclipse IDE connector.• EyeQL

32

Links to more info

• Better code and what to look for in code reviews:o Effective Java by Josh Bloch

http://my.safaribooksonline.com/book/programming/java/9780137150021?bookview=overview

o Code Complete by Steve McConnell http://my.safaribooksonline.com/book/software-engineering-and-development/0735619670?bookview=overview

• Fisheye & Crucible links:o http://summit.atlassian.com/archives/code-and-build/developer-tools-state-of-uniono http://www.atlassian.com/software/fisheye/tour/o http://confluence.atlassian.com/display/FISHEYE/FishEye+User%27s+Guideo http://blogs.atlassian.com/devtools/2011/07/developer-tools-state-union--summit-2011.htmlo http://www.atlassian.com/software/crucible/tour/o http://confluence.atlassian.com/display/CRUCIBLE/Crucible+User%27s+Guide 

Recommended