high-octane dev teams: three things you can do to improve code quality
DESCRIPTION
Bugs suck. But we know they are inevitable. Finding bugs fast and dealing with them early results in higher quality code. This session explores the practical approaches to improving code quality with automated testing, continuous integration and effective code review.Atlassian Speaker: Brendan HumphreysCustomer Speaker: Rik Tamm-Daniels of AttivioKey Takeaways: * Overviews of key concepts and how to get started * Walk-throughs and configuration tips for Clover, Bamboo and Crucible * Stories from the trenchesTRANSCRIPT
![Page 1: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/1.jpg)
High OctaneDev Teams
Brendan Humphreys
![Page 2: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/2.jpg)
High Octane? Concepts / History Four rules of code review Rik Tamm-Daniels, Attivio, Inc.
![Page 3: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/3.jpg)
High Octane?
![Page 4: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/4.jpg)
![Page 5: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/5.jpg)
![Page 6: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/6.jpg)
Machines vs Humans
![Page 7: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/7.jpg)
![Page 8: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/8.jpg)
![Page 9: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/9.jpg)
![Page 10: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/10.jpg)
Smarter Tools
• Checkstyle, Lint, PMD
• Findbugs
• Clover
![Page 11: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/11.jpg)
Continuous Feedback
![Page 12: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/12.jpg)
![Page 13: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/13.jpg)
![Page 14: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/14.jpg)
Feedback and Audience
![Page 15: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/15.jpg)
![Page 16: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/16.jpg)
![Page 17: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/17.jpg)
1998
![Page 18: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/18.jpg)
![Page 19: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/19.jpg)
![Page 20: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/20.jpg)
![Page 21: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/21.jpg)
2007
![Page 22: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/22.jpg)
Adoption in Atlassian
![Page 23: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/23.jpg)
#1:Strive for Ego-Free Reviews
![Page 24: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/24.jpg)
#1: Ego-Free Reviews
![Page 25: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/25.jpg)
#1: Ego-Free Reviews
• No personal Pronouns
![Page 26: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/26.jpg)
#1: Ego-Free Reviews
• No personal Pronouns
• No point scoring
![Page 27: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/27.jpg)
#1: Ego-Free Reviews
• No personal Pronouns
• No point scoring
• Moderator to police
![Page 28: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/28.jpg)
#2:Don’t be a Pedant
![Page 29: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/29.jpg)
#2: Don’t be a Pedant
![Page 30: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/30.jpg)
#2: Don’t be a Pedant
• Use tools to enforce coding style, catch common errors
![Page 31: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/31.jpg)
#2: Don’t be a Pedant
• Use tools to enforce coding style, catch common errors
• Look for the forrest, not the trees
![Page 32: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/32.jpg)
#3: Find Problems,
Not Solutions
![Page 33: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/33.jpg)
#3: Find Problems, Not Solutions
![Page 34: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/34.jpg)
#3: Find Problems, Not Solutions
• Except for trivial fixes
![Page 35: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/35.jpg)
#3: Find Problems, Not Solutions
• Except for trivial fixes
• Pair program instead
![Page 36: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/36.jpg)
#4: Embrace Feedback
![Page 37: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/37.jpg)
•Especially if you are a junior developer
•You will learn to love it!
#4: Embrace Feedback
![Page 38: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/38.jpg)
Agile Quality: High-Octane Style
Rik Tamm-Daniels VP, Engineering June 1st, 2009
![Page 39: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/39.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Located in Newton, MA • Founded August 2007 • 45+ Employees • What we do: Unified Information Access
About Attivio
![Page 40: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/40.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Attivioʼs Active Intelligence Engine – Unified Information Access Platform – Query Unstructured and Structured Information with the
Precision of SQL and the Fuzziness of Search • Shipped Product (OEM and Direct)
– Maintenance Release Window at the end of each sprint – Minor Release every 3-4 months – Major Releases Every 12-18 months
• Product Specs: – 100% Java – 200 MB Install – 200K Lines of Code (8000+ automated tests)
What are we building?
![Page 41: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/41.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Our Team – 15 Engineers (10 very senior) – Expertise in
Enterprise Search, Data Warehousing, ETL, Linguistics, Data Mining
• Our Process – Agile Development
• 4 week Sprints: 3 weeks of design/code/document/test and 1 week of “Reflection”
– Agile QA
What makes Attivio High-Octane?
![Page 42: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/42.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Atlassian Tools installed on Day 1 – Bamboo – JIRA – Confluence – Fisheye – Clover – First Bamboo build was Green!
Attivio and Atlassian: How it all began
![Page 43: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/43.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Evolutionary Process – Sprint-by-sprint incremental process changes
• Reliance on Tools – Process Tools: JIRA, Confluence, Clover, Bamboo,
Fisheye – Dev Tools: SVN, Ant, Eclipse, JMeter
• Comprehensive Quality Strategy
Our Process
![Page 44: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/44.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Maintaining “Releaseability” of code – Ensure unit tests are built concurrently with code – Have a “light” Release Process – Getting green builds
• Where does QA fit in? – Options
• QA “follows” development by one sprint • Use a traditional QA waterfall model step • Our Model: a QA sprint before each release
• What do QA Engineers do? – Our model: Expert team for critical testing hotspots, critical
performance tests, higher-level system testing
Agile Quality Challenges
![Page 45: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/45.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• We focus on three metrics of Code Quality: – How much code is tested and how often? – How quickly can we detect defects? – How quickly can we resolve defects?
• We address these with: – Continuous Integration – Code Coverage – Unified Testing
Agile + Quality
![Page 46: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/46.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• We use Bamboo for Continuous Integration, Nightly Builds and System Test Builds – Continuous Builds run on each check-in – Nightly Builds of each Branch are scheduled and
staggered – System Test Builds depend upon Nightly Builds
• All Bamboo Agents run on VMWare Virtual Machines
Continuous Integration - Build Process
![Page 47: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/47.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
Linuxx64VM
DefaultAgent
Linuxx64VM
Con,nuousTrunkBuild
FullNightlyBuild
Linuxx64VM
OldVersionCon,nuous
Linuxx64VM
QAInstall/SystemTests
Linuxx86VM
FullNightlyBuild
Windowsx86VM
CodeCheck
FullNightlyBuild
Windowsx64VM
FullNightlyBuild
Solarisx64VM
FullNightlyBuild
Build Agent Configuration BuildAgent
BuildType
![Page 48: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/48.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
Branching Methodology
Source:Collabnet
![Page 49: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/49.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• We use the Unstable Branching Strategy – Fits with the agile methodology better that the Agile
Branching strategy • No need to deal with too many branches • Since our modules are already self contained we are
continually integrating all modules right in trunk • Less merging more branching • Ready to release code at any time without merging or
branching – In large part because of our test coverage – Having system, integration, smoke and performance testing as
part of our daily activity
Branching Methodology
![Page 50: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/50.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• High Coverage numbers have produced low-defect releases
• We ship with better than 80% coverage for ALL Releases
• 80% based on industry best practices • Clover produces reports for our core and add-on
modules • Integration Points: GUnit (grails), Selenium/
JUnit, Fluint (Flex)
Code Coverage
![Page 51: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/51.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Run separately from other builds to reduce build times
• Produces Code Coverage Artifacts – Clover – Cobertura – Findbugs
• We donʼt use Bambooʼs integrated Clover Report because it doesnʼt ft our build directory structure (each module built separately)
Code Coverage Build
![Page 52: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/52.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
Code Coverage Build Artifacts
![Page 53: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/53.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Unified Testing Defined: – Common Infrastructure (Execution, Reporting)
• Execution: Bamboo • Reporting: Clover/Bamboo
– Single point of defect detection and investigation • Bamboo + JIRA and Fisheye Integration
• Benefits – Fewer systems for QA to learn – Easier to maintain than traditional QA environments – Consistent format for defect reporting and notification – Unified view of system quality – Easier to identify testing gaps
Unified Testing
![Page 54: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/54.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• JUnit - unit and integration tests • Custom ant-based install automation framework
and system test framework – Generic Ant Build Model
• Heavy use of MacroDefs and AntCalls • Custom Ant Tasks
– Mimics JUnit response and output format – Can be run on build box or run on multiple build boxes
(multi-node tests, performance tests)
Unified Testing – How we do it
![Page 55: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/55.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• The combination of Bamboo and Clover give us a complete view of product quality – High-level build status – Test Failure Reports – Build Logs – Build Artifacts (Clover, Findbugs)
• JIRA and Fisheye integration allows us to quickly identify and resolve problems – JIRA tickets – Check-in Diffs
Unified Testing - Reporting
![Page 56: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/56.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
Unified Testing Demo
![Page 57: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/57.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
• Being a High-Octane Dev Team requires focus on Quality
• A High-Octane Agile Quality Program Needs: – Continuous Integration for Early Defect Detection and
Resolution – A High-level of Code Coverage – Unified Test Execution for Simplicity – Unified Test Reporting for Visibility – Tooling to Tie it all Together
Conclusions
![Page 58: High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality](https://reader034.vdocuments.us/reader034/viewer/2022052618/54b6e13d4a7959aa3d8b45b6/html5/thumbnails/58.jpg)
©2007Confiden,al&Proprietary.AllRightsReserved.
Discussion Time!