Presentation is loading. Please wait.

Presentation is loading. Please wait.

Review your code and all your wildest dreams will come true (vote for Pedro)

Similar presentations


Presentation on theme: "Review your code and all your wildest dreams will come true (vote for Pedro)"— Presentation transcript:

1 http://smartbear.com Review your code and all your wildest dreams will come true (vote for Pedro)

2 http://smartbear.com Jason Cohen @ASmartBear StackOverflow Rep: 11,723. Booyah.

3 http://smartbear.com smartbear.com

4 http://smartbear.com Code Collaborator codecollaborator.com

5 http://smartbear.com Peer Code Review != Suck

6 http://smartbear.com

7 Act I What’s the Point?

8 http://smartbear.com Requirements Design Architecture Discussion Review

9 http://smartbear.com Requirements Design Architecture Code Discussion Review (void)0 Where most of the bugs come from

10 http://smartbear.com

11 COUNT(editors) > COUNT(writers)

12 http://smartbear.com 9 errors/page

13 http://smartbear.com Spell Czech: Good, butt knot enough

14 http://smartbear.com Common Sense

15 http://smartbear.com The Experiment

16 http://smartbear.com Rule of Bug: Earlier == Cheaper What if we had Peer Review? ? ? ?

17 http://smartbear.com $152k, down from $368k 32, down from 194

18 http://smartbear.com It’s made of people

19 http://smartbear.com The Ego Effect

20 http://smartbear.com Team building

21 http://smartbear.com

22

23

24 Team building, for reals

25 http://smartbear.com

26 Go faster!

27 http://smartbear.com

28 “The problem is, they suck.”

29 http://smartbear.com “Those guys are pretty cool.”

30 http://smartbear.com Specifications Meetings Talking about code

31 http://smartbear.com if(“integrate”.equals( s )) if( 0 == ptr )

32 http://smartbear.com 1 is the loneliest number 250,000 lines of code Safety net Bus number  2

33 http://smartbear.com I’m thiiiiinking of a number…

34 http://smartbear.com if ( youLikeItSoMuch() ) { marryIt(); }

35 http://smartbear.com Hapless Developer Reviewers Version Control

36 http://smartbear.com Peer Code Review != Suck

37 http://smartbear.com Lots of techniques Look over shoulder Auto-email from version control after check-in Walk-through meeting Formal inspection Pair programming Buy a Code Review Tool!

38 http://smartbear.com Act II Techniques

39 http://smartbear.com Over-the-Shoulder Easy, Free Interruption No info Walk-through

40 http://smartbear.com Pair Programming No tools or workflow Deep thought Big time commitment No info Too close

41 http://smartbear.com Email Easy, Free No interruption, remote Conversation-tracking No info No end

42 http://smartbear.com Formal Inspections Michael Fagan, IBM, 1976

43 http://smartbear.com The 7% Rule (with apologies to Eileen)

44 http://smartbear.com Tool-Assisted Review

45 http://smartbear.com Typical review process

46 http://smartbear.com Hapless Developer Reviewers Version Control Identify Changes Package/Deliver Organize Communication Track Defects Audit Trail Reports Audit Trail Reports Automatic Metrics

47 http://smartbear.com Tools Code CollaboratorCommercial CrucibleCommercial Review BoardOpen-Source MondrianInternal

48 http://smartbear.com Act II Best Practices How to not waste time

49 http://smartbear.com Cisco® MeetingPlace® Case Study 3,200,000 lines of code 2,500 reviews 50 developers 10 months San Diego, Bangalore, Budapest s

50 http://smartbear.com CodeReviewBook.com

51 http://smartbear.com 60-90 minutes max Time (minutes) Defects Found

52 http://smartbear.com Go slow: 200-500 LOC/hour

53 http://smartbear.com Not too much: 200-400 LOC

54 http://smartbear.com Author Preparation is ??? Good!

55 http://smartbear.com Meetings

56 http://smartbear.com Meetings are required. —Michael Fagan, ‘76

57 http://smartbear.com 1. Planning2. Intro3. Reading4. Inspect5. Rework6. Verify7. Complete8. Improve Fagan Phases = Meeting

58 http://smartbear.com Meetings are required. —Gilb, Fagan, Wiegers

59 http://smartbear.com You didn’t check for null. —The Phantom Inspector

60 http://smartbear.com Are meetings worth it? —Lawrence Votta, ‘93

61 http://smartbear.com 4%

62 http://smartbear.com Checklists

63 http://smartbear.com Checklist for Checklists 7  2 (George Miller, ’52) No obvious stuff Nothing that can be automated Stuff that’s easy to forget EXAMPLE: Errors handled properly everywhere in method

64 http://smartbear.com (Re)building a checklist The Week of Pain

65 http://smartbear.com Act III Just do it.

66 http://smartbear.com Selected Code Stable branch Core module Top 10 scariest files

67 http://smartbear.com Unit tests only

68 http://smartbear.com During feature-freeze

69 http://smartbear.com You know what to do, and you know when to do it.

70 http://smartbear.com Gotta Wanna

71 http://smartbear.com Jason Cohen jason@asmartbear.com http://blog.ASmartBear.com Twit: @asmartbear Code Collaborator http://codecollab.com (Visit our table on your way out!)


Download ppt "Review your code and all your wildest dreams will come true (vote for Pedro)"

Similar presentations


Ads by Google