The one thing missing from this guide right now is tracking work in an Agile way. I plan to add that later.
- Local Development Cycle
- Pull Requests and Code Reviews
- Continuous Integration
- Aspects of quality code
- Capabilities of high-performing software teams
- The Four Key Metrics
Local Development Cycle
Release small often
- Pull and rebase latest code from mainline.
- Work from a short-lived feature branch.
- Unit test, frequently commit locally, push feature branch when it passes tests.
- Integrate latest mainline locally, run private build/tests, push.
- Final push, create a pull request.
Pull Requests and Code Reviews
No unreviewed code
- Another developer reviews the PR (code review)
- PR merges into mainline
Build once, deploy-to-many
- CI Server is triggered by source control changes.
- Build Triggered by mainline and feature branch changes. Build in clean environment, run unit tests, create deployment package.
- Integration Always runs and fully automated. Environment is created and deployed to from scratch. Automated integration tests run. Jeffrey Palermo calls this the TDD stage.
- UAT There are many kinds of UAT environments: QA, user acceptance, security, performance. Runs if mainline changes and Integration succeeds. Existing environments deployed to. Some automated testing.
- Prod Runs if UAT succeeds and deployment is approved. Existing environment deployed to. Some automated smoke testing. Can require approval.
Aspects of quality code
Code is never finished
- Loosely coupled Dependencies are reduced. See SOLID, DRY, YAGNI.
- Complexity reduced Packages, classes, methods have one purpose.
- Tested early Unit testing reduces defects and improves architecture. See TDD.
- Reviewed Code reviews improve quality and share knowledge.
- Clearly named Naming (of classes, methods, variables) is hard and important.
- Self-documenting What the code does should be obvious. Comment why the code does what it does, when not obvious.
- Properly versioned Harder than it seems. See Semantic Versioning and your language's package peculiarities.
- Maintanable and replaceable No code lasts forever. Design for change.
Capabilities of high-performing software teams
A couple of principles can guide making lots of better decisions.
- Reduce friction to doing the right thing
- Do all the steps
Here are the 24 capabilities of high-performing software organizations from the DORA group's meticulous, evidence-based research.
|Capability (and desired result)|
|CONTINUOUS DELIVERY CAPABILITIES|
|01 Version control|
|02 Deployment automation|
|03 Continuous integration (CI)|
|04 Trunk-based development|
|05 Test automation|
|06 Test data management|
|07 Shift left on security (put first, make easy)|
|08 Continuous delivery (CD)|
|09 Loosely coupled architecture|
|10 Empowered teams|
|PRODUCT AND PROCESS CAPABILITIES|
|11 Customer feedback|
|12 Value stream mapping|
|13 Working in small batches|
|14 Team experimentation|
|LEAN MANAGEMENT AND MONITORING CAPABILITIES|
|15 Change approval processes (lightweight, not external)|
|17 Proactive notification|
|18 WIP limits (limit work-in-progress)|
|19 Visualizing work (public Kanban boards)|
|20 Westrum organizational culture (Generative)|
|21 Supporting learning|
|22 Collaboration among teams|
|23 Job satisfaction|
|24 Transformational leadership|
The Four Key Metrics
How do you know you're succeeding?
Again, from the DORA group.
- Deployment Frequency How often an organization successfully releases to production
- Lead Time for Changes The amount of time it takes a commit to get into production
- Change Failure Rate The percentage of deployments causing a failure in production
- Time to Restore Service How long it takes an organization to recover from a failure in production
- DRY (Don't repeat yourself)
- YAGNI (You aren't going to need it)
- TDD (Test-Driven Development)
- Semantic Versioning 2.0.0 | Semantic Versioning
- DevOps Research and Assessment (DORA)
- Are you an Elite DevOps performer? Find out with the Four Keys Project
- Accelerate: The Science of Lean Software and DevOps: Building and Scaling High Performing Technology Organizations
- Naming things is hard | dk
- Code review
- Meltdown: What Plane Crashes, Oil Spills, and Dumb Business Decisions Can Teach Us About How to Succeed at Work and at Homee