32
1 Private and Confidential Private and Confidential June 7, 2022 Private and Confidential Fisheye, Crucible and the wonders of Code Reviews Thank you Atlassian! Created by Michael Lossos Points.com July 2011 Private & Confidential

Points.com fisheye crucible code reviews 2011

Embed Size (px)

DESCRIPTION

Points.com Fisheye Crucible Code Reviews 2011

Citation preview

Page 1: Points.com fisheye crucible code reviews 2011

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

Page 2: Points.com fisheye crucible code reviews 2011

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

Page 3: Points.com fisheye crucible code reviews 2011

3

Why code reviews?

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

Page 4: Points.com fisheye crucible code reviews 2011

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.

Page 5: Points.com fisheye crucible code reviews 2011

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

Page 6: Points.com fisheye crucible code reviews 2011

6

What's Fisheye for?

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

oBrowsing / viewingoComparisonoSearchoMonitoring (activity stream)

Page 7: Points.com fisheye crucible code reviews 2011

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   ;)

Page 8: Points.com fisheye crucible code reviews 2011

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?

Page 9: Points.com fisheye crucible code reviews 2011

9

Fisheye commit graph (1)

Page 10: Points.com fisheye crucible code reviews 2011

10

Fisheye commit graph (2)

Copy changeset numbers.

Page 11: Points.com fisheye crucible code reviews 2011

11

Fisheye answers (2)

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

Page 12: Points.com fisheye crucible code reviews 2011

12

Fisheye commit graph (3): reviews

Page 13: Points.com fisheye crucible code reviews 2011

13

Fisheye answers (3)

• Who made that change? o line by line blame

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

Page 14: Points.com fisheye crucible code reviews 2011

14

Fisheye/Crucible file diff: blame by line

Page 15: Points.com fisheye crucible code reviews 2011

15

Fisheye answers (4)

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

Page 16: Points.com fisheye crucible code reviews 2011

16

Fisheye answers (5)

Where's that code? • QuickNav bar

o CamelCase filename wildcard matching 

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

Page 17: Points.com fisheye crucible code reviews 2011

17

Fisheye answers (5)

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

Page 18: Points.com fisheye crucible code reviews 2011

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

Page 19: Points.com fisheye crucible code reviews 2011

19

Crucible: creating reviews (2)

Page 20: Points.com fisheye crucible code reviews 2011

20

Crucible: creating reviews (3)

Page 21: Points.com fisheye crucible code reviews 2011

21

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

Page 22: Points.com fisheye crucible code reviews 2011

22

Crucible: creating reviews (5)

Page 23: Points.com fisheye crucible code reviews 2011

23

Crucible: navigating reviews (0)

Page 24: Points.com fisheye crucible code reviews 2011

24

Crucible: navigating reviews (1)

Comments, creating defects.

Page 25: Points.com fisheye crucible code reviews 2011

25

Crucible: navigating reviews (2)

Flipping through comments, filters. 

Page 26: Points.com fisheye crucible code reviews 2011

26

Crucible: navigating reviews (3)

Side by side diffs, unified diffs, context.

Page 27: Points.com fisheye crucible code reviews 2011

27

Crucible: navigating reviews (4)

• Files marked as reviewed.

• Progress meter => done. 

• Mark complete, summary.

Page 28: Points.com fisheye crucible code reviews 2011

28

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

Page 29: Points.com fisheye crucible code reviews 2011

29

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

Page 30: Points.com fisheye crucible code reviews 2011

30

Getting Started

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

Page 31: Points.com fisheye crucible code reviews 2011

31

Slightly More Advanced Stuff

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

Page 32: Points.com fisheye crucible code reviews 2011

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