High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality

1,155 views

Published on

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 Humphreys

Customer Speaker: Rik Tamm-Daniels of Attivio

Key Takeaways:

* Overviews of key concepts and how to get started
* Walk-throughs and configuration tips for Clover, Bamboo and Crucible
* Stories from the trenches

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,155
On SlideShare
0
From Embeds
0
Number of Embeds
60
Actions
Shares
0
Downloads
65
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality

  1. 1. High Octane Dev Teams Brendan Humphreys
  2. 2. High Octane? Concepts / History Four rules of code review Rik Tamm-Daniels, Attivio, Inc.
  3. 3. High Octane?
  4. 4. Machines vs Humans
  5. 5. Smarter Tools • Checkstyle, Lint, PMD • Findbugs • Clover
  6. 6. Continuous Feedback
  7. 7. Feedback and Audience
  8. 8. 1998
  9. 9. 2007
  10. 10. Adoption in Atlassian
  11. 11. #1: Strive for Ego-Free Reviews
  12. 12. #1: Ego-Free Reviews
  13. 13. #1: Ego-Free Reviews • No personal Pronouns
  14. 14. #1: Ego-Free Reviews • No personal Pronouns • No point scoring
  15. 15. #1: Ego-Free Reviews • No personal Pronouns • No point scoring • Moderator to police
  16. 16. #2: Don’t be a Pedant
  17. 17. #2: Don’t be a Pedant
  18. 18. #2: Don’t be a Pedant • Use tools to catch coding style, enforce common errors
  19. 19. #2: Don’t be a Pedant • Use tools to catch coding style, enforce common errors • Look fortrees forrest, not the the
  20. 20. #3: Find Problems, Not Solutions
  21. 21. #3: Find Problems, Not Solutions
  22. 22. #3: Find Problems, Not Solutions • Except for trivial fixes
  23. 23. #3: Find Problems, Not Solutions •Except for trivial fixes • Pair program instead
  24. 24. #4: Embrace Feedback
  25. 25. #4: Embrace Feedback • Especially if you are a junior developer • You will learn to love it!
  26. 26. Agile Quality: High-Octane Style Rik Tamm-Daniels VP, Engineering June 1st, 2009
  27. 27. About Attivio •  Located in Newton, MA •  Founded August 2007 •  45+ Employees •  What we do: Unified Information Access ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  28. 28. What are we building? •  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) ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  29. 29. What makes Attivio High-Octane? •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  30. 30. Attivio and Atlassian: How it all began •  Atlassian Tools installed on Day 1 –  Bamboo –  JIRA –  Confluence –  Fisheye –  Clover –  First Bamboo build was Green! ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  31. 31. Our Process •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  32. 32. Agile Quality Challenges •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  33. 33. Agile + Quality •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  34. 34. Continuous Integration - Build Process •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  35. 35. Build Agent Configuration Build
Agent
 Linux
x64
 VM
 Build
Type
 Default
 Agent
 Linux
x64
 Linux
x64
 Linux
x64
 Linux
x86
 Windows
 Windows
 Solaris
x64
 VM
 VM
 VM
 VM
 x86
VM
 x64
VM
 VM
 Con,nuous
 Old
Version
 QA
Install/ Full
Nightly
 Full
Nightly
 Full
Nightly
 Code
Check
 Trunk
Build
 Con,nuous
 System
Tests
 Build
 Build
 Build
 Full
Nightly
 Full
Nightly
 Build
 Build
 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  36. 36. Branching Methodology Source:
Collabnet
 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  37. 37. Branching Methodology •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  38. 38. Code Coverage •  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) ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  39. 39. Code Coverage Build •  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) ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  40. 40. Code Coverage Build Artifacts ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  41. 41. Unified Testing •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  42. 42. Unified Testing – How we do it •  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) ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  43. 43. Unified Testing - Reporting •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  44. 44. Unified Testing Demo ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  45. 45. Conclusions •  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 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  46. 46. Discussion Time! ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.


×