The story of tools, process and cajoling that we've done to improve quality code—both automated and cultural changes we've done. A recent project (Mr. Clean) automates code quality tasks in Atlassian Stash.
2. CLEAN ALL THE THINGS!
ENCOURAGING CLEAN CODE IN BIG TEAMS
Dave Rochwerger, Engineering Director, Agent Platform
@catchdave
ZILLOW | TRULIA | STREETEASY | HOTPADS
3. ZILLOW | TRULIA | STREETEASY | HOTPADS
Zillow Group
• Culture is paramount
• Many teams, many offices
(SF office > 200 engineers)
• Up to 100 engineers contribute to a repository
• Many products, release cycles & techs
8. ZILLOW | TRULIA | STREETEASY | HOTPADS
2014: The Bad
• Too many bugs
• Highly coupled, low communication teams
• Preventable mistakes (code quality & releasing)
• Inconsistent testing knowledge & usage
9. ZILLOW | TRULIA | STREETEASY | HOTPADS
2014: The Good
• Company-wide training
• Code quality guidelines
• IDE plugins
• Git hooks
• Post-merge CI jobs
11. ZILLOW | TRULIA | STREETEASY | HOTPADS
Mr. Clean
Encouraging high code quality
12. ZILLOW | TRULIA | STREETEASY | HOTPADS
Mr. Clean Goals
1. Push defect detection as early as possible
2. Make it difficult to contribute bad code
3. Make it easy to contribute good code
• Automate away easy things
• Code review focus should be subjective
Design' Coding' QA' Post/release'
Effort'
18. ZILLOW | TRULIA | STREETEASY | HOTPADS
Approach
• Lots of testing
• Kept goals in sight
• Iterate, iterate, iterate
• Garner constant feedback
• Stealth deployment (nothing like testing in prod)
• Communicate, communicate, communicate
19. ZILLOW | TRULIA | STREETEASY | HOTPADS
Results (so far)
• 15,000 PRs examined since May
• Bugs were found on day 1
• Test suites 100% usable
• Many “saved my life” anecdotes
23. ZILLOW | TRULIA | STREETEASY | HOTPADS
Take-aways
• Clean code is important
• Clean code is harder in large teams
• Fostering the right culture is key
• Spread the word about your great work!