A pleasant walk through computing

Comment for me? Send an email. I might even update the post!

Professional Development Fundamentals

The one thing missing from this guide right now is tracking work in an Agile way. I plan to add that later.

Contents

Local Development Cycle

Release small often

  1. Pull and rebase latest code from mainline.
  2. Work from a short-lived feature branch.
  3. Unit test, frequently commit locally, push branch when it passes tests.
  4. Integrate latest mainline locally, run private build/tests, push.
  5. 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

Continuous Integration

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.
  • TDD Always runs and fully automated. Environment is created and deployed to from scratch. Automated integration tests run.
  • UAT Runs if mainline changes and TDD succeeds. Existing environments deployed to. Some automated testing. Users perform acceptance tests.
  • 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.

  1. Reduce friction to doing the right thing
  2. 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)
ARCHITECTURE CAPABILITIES
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)
16 Monitoring
17 Proactive notification
18 WIP limits (limit work-in-progress)
19 Visualizing work (public Kanban boards)
CULTURAL CAPABILITIES
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

Resources

Unit Testing is Part of a Developer's Job Description

The debate over unit testing's value is over. Twenty-plus years of evidence in software development, and decades more than that in other fields, proves that inspecting for quality early is superior to doing it late.

Whether to unit test shouldn't even be a discussion.

Here's a short and sweet slide deck on the subject.

Unit Testing Slide Deck PowerPoint

Graphic - Git Merge vs Rebase

I've struggled to find a graphic of merge vs rebase that made sense to me, so I created one.

The way I think of rebase is:

I'm making it seem to the other branch like I just did this work. I'm putting my work last.

SVG File
PNG File