Transcript
Page 1: You Live, You Learn, Then You Get Perforce Swarm

#

Nikhil VazeSenior Software Engineer

You Live, You Learn, Then You Get Perforce Swarm

Page 2: You Live, You Learn, Then You Get Perforce Swarm

#

Nikhil VazeSenior Software EngineerElectric Cloud

Nikhil Vaze is a Senior Software Engineer on the Electric Cloud engineering team. He is a full stack engineer and loves to hack on things. Nikhil holds a Bachelor of Science in Computer Engineering and Master of Science in Security Informatics from Johns Hopkins University.

(Speaker photo here)

Page 3: You Live, You Learn, Then You Get Perforce Swarm

#

• Case study from Electric Cloud, ElectricCommander Engineering– Our initial code review policy– How it evolved– Our current setup

• Spoiler Alert: We use Swarm

– Demo!

Talk Overview

Page 4: You Live, You Learn, Then You Get Perforce Swarm

#

• Code reviews are a Good Thing™– Spread knowledge around the team

• Senior members review new team members contributions• New team members speak up when something is not clear

Assumptions

– Catch problems earlier in the development cycle.

– Enforcement of code style and coding standards.

Page 5: You Live, You Learn, Then You Get Perforce Swarm

#

• Creator of Python describing code review policies• http://

java.dzone.com/articles/how-google-does-code-review• “Because the general rule with bugs is always: the sooner

you find them the better.”

For skeptics

• John Graham-Cumming’s view on code review• http://blog.cloudflare.com/making-code-better-with-reviews• “All our code goes through this type of process to improve

its quality and security, and it's an essential part of our PCI certification.”

Page 6: You Live, You Learn, Then You Get Perforce Swarm

#

You live: Our life before code review

Page 7: You Live, You Learn, Then You Get Perforce Swarm

#

Code reviews? I’m too busy!

Photo Credit: Unknown, found via @shaynecuffy

Page 8: You Live, You Learn, Then You Get Perforce Swarm

#

• All engineers were in one room, on the same schedule– Code reviews done informally by calling someone over

to your desk

Code reviews were ad hoc

• Since the team was small, this worked to a point.

Page 9: You Live, You Learn, Then You Get Perforce Swarm

#

• When we forgot to ask someone to come to our desk…– “I wish I had asked for your guidance when I coded this

up two weeks ago.”– “I saw your commit, did you think of xyz condition?”– “How was this code checked in??”

Led to some ‘forehead slapping’

Page 10: You Live, You Learn, Then You Get Perforce Swarm

#

You learn part 1: How and why we rolled out formal code review

Page 11: You Live, You Learn, Then You Get Perforce Swarm

#

• Company grew, we started hiring people globally– Suddenly our beloved development practices that

worked so well started showing problems

Formal process for code review

• Standardized on another tool (Swarm was not yet released)– Documented it on the wiki

• And then we…

Page 12: You Live, You Learn, Then You Get Perforce Swarm

#

Celebrate! We have code review!

Page 13: You Live, You Learn, Then You Get Perforce Swarm

#

• How does someone create a review?

Not so fast…

Page 14: You Live, You Learn, Then You Get Perforce Swarm

#

• …kind of painful. Need your dig out your good luck charm to successfully create a review

Code review good for you but

• On the other hand, some teams loved the tool we chose and had no complaints

• Some people p4 shelved and shot an IM for the review process

Page 15: You Live, You Learn, Then You Get Perforce Swarm

#

You learn part 2: How we learned about Swarm

Page 16: You Live, You Learn, Then You Get Perforce Swarm

#

• Swarm Hackathon– It’s on a boat!

• Let’s have some fun

How did we find out about Swarm?

Page 17: You Live, You Learn, Then You Get Perforce Swarm

#

• A group of people form teams and work for a constrained amount of time on a small project.– Usually there is a theme uniting all projects– Usually outside of work hours– Sometimes there are prizes

What is a hackathon?

Page 18: You Live, You Learn, Then You Get Perforce Swarm

#

• We did pretty well and EC-Swarm was born!

Result:

Page 19: You Live, You Learn, Then You Get Perforce Swarm

#

Then you get Perforce Swarm

Page 20: You Live, You Learn, Then You Get Perforce Swarm

#

• We were using it anyway to perform reviews. If there was only a tool …

p4 shelve was our friend

Page 21: You Live, You Learn, Then You Get Perforce Swarm

#

• Versioned code reviews– Reviewers can make suggestions and then ask the

author to reshelve the files to review them again.

Enter Perforce Swarm

• Ability to commit code from the Swarm UI. – Geographically distributed teams can hand off code and

commit on each others behalf

• Ability to combine test output with the code review

Page 22: You Live, You Learn, Then You Get Perforce Swarm

#

Demo!

Page 23: You Live, You Learn, Then You Get Perforce Swarm

#

• You will still have bugs in code that has been reviewed

Code review lessons learned

• Consistent use and discipline of code review have caught errors

• Treat code reviews as high priority because they can be become a bottleneck– Respond to them quickly, ideally within your workday

• Be constructive

Page 24: You Live, You Learn, Then You Get Perforce Swarm

#

Use Swarm!

Code review lessons learned (cont)

(And ElectricCommander ^_^ )

Page 25: You Live, You Learn, Then You Get Perforce Swarm

##

Thank you!Nikhil Vaze@therealnikhil


Top Related