20 Patterns in Software Teams PDF
20 Patterns in Software Teams PDF
20 Patterns in Software Teams PDF
Ed 2019.03.18
Table of Contents
PART 1
Domain Champion 2
Hoarding the Code 5
Unusually High Churn 8
Bullseye Commits 11
Heroing 13
Over Helping 15
Clean As You Go 18
In the Zone 20
Bit Twiddling 22
The Busy Body 24
PART 2
Scope Creep 27
Flaky Product Ownership 29
Expanding Refactor 31
Just One More Thing 33
Rubber Stamping 35
Knowledge Silos 37
Self-Merging PRs 40
Long-Running PRs 42
A High Bus Factor 44
Sprint Retrospectives 46
Introduction
In truth, they probably wrote most of it, and Domain Champions will typically show low
in some cases rewrote the same sections of Receptiveness in incorporating feedback
code multiple times. from reviews.
The Domain Champion isn’t just “the engineer Domain Champions will seldom, if ever, appear
who knows credit card processing”; it’s all they blocked. Short-term, it’s a highly productive
ever work on. It’s their whole day, every day. pattern. But it’s often not sustainable and can
lead to stagnation, which of course can lead to
Some degree of job specialization is essential attrition.
and often motivating. But even within
specialized roles there can be ‘too much of
one thing.’ Managers must balance enabling a Primary Focus
team member to unilaterally own the expertise,
and encouraging breadth of experience.
How to recognize it
Domain Champions will always work in
the same area of code. They’ll also rewrite
their code over and over, and you’ll see it in
churn and legacy refactoring metrics as they
perfect it. What to do
Assign tickets that focus on other areas of
Domain Champions are deeply familiar with the codebase.
one particular domain. As a result, they’ll
typically submit their work in small, frequent Of course, some engineers would prefer to
commits and will show a sustained above stay where they are. It can be very enjoyable
average Impact. to do a task you’re good at. And, it can be
uncomfortable to take on work that requires
Because no one else knows more than the information or skills you have less practice
Domain Champion, there’s usually very with. But effective managers will strive to
little actionable feedback that others can challenge their team.
provide in the review process. As a result,
It’s not uncommon for programmers to wait When you see large and infrequent commits,
until their work is done to share it. In creative first consider the pattern’s duration (have
and research-intensive fields, it can be a we seen this pattern for years, or has it only
natural tendency to avoid sharing work when recently been visible?). This information
it’s only just started. There are plenty of can help determine whether this is the
reasons why this might be: a fear of having engineer’s preferred way of working, or if this
others judge the work in progress, a fear of is caused by something outside the normal
others taking ideas, or a desire to make the development process.
whole process seem effortless, to name a few.
CODE COMMITS
THIS WEEK
Whatever the reason, the heart of the
Eng 1
problem is this: the more an individual saves
up their work, the less they collaborate with
others. Working alone is inherently riskier Eng 2
than working with others. And Software
Engineering is a team sport.
M Tu W Th F
This tendency to work privately and then
submit work all at once doesn’t just limit and
slow down the individual — it’s damaging to How to recognize it
the team’s progress as a whole. Submitting Large and infrequent commits can be a sign
work all at once means that there weren’t that the engineer is working privately until
any opportunities for collaboration along their project is finished, and then submitting
the way. Even more, once the work was their work all at once.
submitted, someone else had to review all
of that work. So naturally, this work behavior This pattern is typically first seen in the
can also lead to lower quality code — both Work Log report but is also identifiable in the
from the Submitter’s standpoint (who didn’t team’s Review Workflow. These PRs are larger
check in their work early to get feedback or and usually come later in a sprint or project.
notice potential missteps), and the Reviewer’s Because of this, they’ll typically either take a
perspective (who likely doesn’t have enough longer time to review (relative to the team’s
time or energy to adequately review all of average) or will get a lower level of review
that code). (see Review Coverage).
Churn is a natural and healthy part of the development process and varies
from project to project. However, Unusually High Churn is often an early
indicator that a team or a person may be struggling with an assignment.
Most likely, not all of the commits that make Eng 1 PR Opened
up the project will be Bullseyes. But the ones
that are, generally have a small to modest Eng 2 Review and Comment
impact and were thoroughly reviewed and
approved on the first try. Celebrate them! Eng 3 Review and Comment
Eng 1 Responds
How to recognize it
Eng 2 PR Merged
In practice, Bullseye Commits can be
identified by when they were submitted
in regard to the deadline, their impact,
and how they were treated in the review What to do
process. Generally, the code was started Recognize a clean bullseye in a stand-up,
and completed in advance of the deadline, or a simple note: “I saw that check-in, nice
with negligible churn. The commit’s Impact job!” Whether it’s public or private, showing
was small to modest in size and was then that you noticed and that you care will only
thoroughly reviewed. It was approved on the reinforce this pattern.
first try (see Review Workflow).
If there’s an engineer who regularly makes
It’s the level of thoroughness in the review Bullseye Commits, it may be helpful for others
that distinguishes Bullseye Commits from to understand how they approach projects.
Rubber Stamping (Pattern #15). In Bullseye Ask the engineer to do a lunch and learn, or
Commits, code reviews are substantive. consider asking them to provide feedback on
another engineer’s work in the review process.
Right before a release, the “Hero” finds some critical defect and
makes a diving catch to save the day. More formally, Heroing is the
reoccurring tendency to fix other people’s work at the last minute.
Granted, a good save is usually better than level of engagement in the review process
no save. But regular Heroing leads to the (see the Review and Collaboration metrics).
creation of unhealthy dynamics within the
team or otherwise encourages undisciplined Helping Others
programming. Some team members even learn
to expect them to jump in on every release.
TEAMWORK
Heroing can be a symptom of poor delegation
or micro-management. It also points to
Review Coverage
trust issues on a number of levels. The Hero
will ultimately undermine growth by short-
TIME Release
circuiting feedback loops and, over time, can
foster uncertainty and self-doubt in otherwise
strong engineers. At its worst, the Hero feeds
a culture of laziness: everyone knows the What to do
Hero will “fix” the work anyway so why bother. Rather than managing the ‘saves,’ manage the
Ironically, those last-minute fixes are the code review process.
genesis of a lot of technical debt.
Ideally, team members are making small and
frequent commits and requesting interim
How to recognize it reviews for larger projects. If that’s not the
The Hero typically dominates GitPrime’s Help case, consider working toward that goal first.
Others metric, particularly in the form of late It’ll help to get the Hero’s feedback early, even
arriving check-ins. They’re also distinguishable before the code is done.
in the review process, where they may be
self-merging PRs (and typically right before When the team is in the habit of getting
the deadline), or they will show very low feedback early and often throughout a project,
Receptiveness in the review process (meaning as opposed to submitting massive PRs all at
either others aren’t providing substantial once, the barrier to participating in the review
feedback or the Hero isn’t incorporating it). process is lower. This can make it easier to
promote healthier collaboration patterns and
It can be hard to disagree with their get everyone — especially the Hero — to
changes — especially with these changes give and be receptive to feedback in reviews.
being made so late in the sprint. This is partly Coach the Hero to turn their ‘fixes’ into
why the Hero’s PRs usually show a very low actionable feedback for their teammates.
Engineer One submits. Engineer Two cleans Review Coverage. The other engineer will
it up, over and over again. This behavior can not. One engineer will have a high Impact; the
be normal on small project-based teams. But other won’t.
when that 1-2-1-2 pattern doesn’t taper off, it’s
a signal that should draw your attention. This behavior can be perfectly healthy and
expected when in a mentorship-type situation.
The problem is threefold: (1) always cleaning But beyond a certain point, rotation is in order.
someone else’s work takes away from one’s
own assignments, (2) it impairs the original
author’s efforts toward true independent
Disproportionate Help
mastery, (3) it can overburden the helper and Code Review
and leave the original author in a continuous Eng 1 Eng 2
unnatural waiting state.
How to recognize it
You’ll notice this pattern in the same way you’d
realize “Heroing” (Pattern #5) in GitPrime’s
Review and Collaboration reports and the What to do
Help Others metric. Look for reoccurring, nn Bring additional engineers into the
last-minute corrections between the same code review process. A side effect
two people. of this solution is that by increasing
the distribution of reviews, you’re
In the Review and Collaboration and strengthening the team’s overall
Operational reports, you’ll notice these two knowledge of the codebase (see
consistently review each other’s work. One Knowledge Sharing).
engineer will have a high Help Others, but it’s nn Cross-train and assign both engineers to
not reciprocated. The “load-bearing” engineer
different areas of the codebase.
will also show high levels of Influence and
How to recognize it
M Tu W Th F
An engineer in the zone organizes their
day to eliminate distraction and focus on
delivering business value. Their Active
Days are consistently above average. Their If increasing overall team velocity is important
Impact is high and consistent. Their PRs are to you, helping everyone on your team find
timely, evenly paced, and nicely sized. They their zone is a foundational place to start.
consistently participate in reviews, so their
Involvement is high and consistent. Their An essay from Paul Graham, titled “Maker’s
churn is usually lower than average. Schedule, Manager’s Schedule” offers context
and strategies for blocking meetings and
creating space to get in the zone.
What to do
Similar to engineers who exhibit the “Clean Small changes in scheduling and reduction
As You Go” pattern, it helps to acknowledge of interruptions can amount to significant
this pattern either publicly, privately, or both. increase in capacity. Furthermore, consistently
Emphasize their consistency and how great getting in the zone allows your team to ship at
code is built not in a single sprint or pulling a sustainable pace without suffering from the
all-nighters. The Work Log and Review and burnout of heroic sprints.
How to recognize it
Look for high rates of churn in the same
area of the code. The key is to couple What to do
repetition and refactoring with ambivalence Look for ways to reenergize the engineer with
or indifference in code review over an a new project. Find a ticket, even a small one,
extended period. that will lead into new and interesting areas of
the code — even if it comes at the expense of
For example, watch for a standard library the team’s productivity in the short-term.
call, or otherwise stable code, get refactored
into customized code for some difficult to Creative workers thrive when tackling new
articulate optimization. Or, watch for code and challenging problems, even if they at
that gets refined and refactored multiple first balk at working outside their area of
times with disinterest — light code review expertise. New experience typically leads
and PRs with generic submitter comments to learning something new, a process most
like “refactoring,” “reorganizing,” or “touch up,” engineers enjoy.
followed by “LGTM”.
A R E A S O F S P E C I A L I Z AT I O N
away from heavier problems. This behavior
can be perfectly normal over short periods
or in isolated instances. And, in fact, some
shifting around is healthy.
The
But the Busy Body is problematic over a Busy Body
long period because these engineers end up
without a strong sense of ownership. There’s
DOMAIN KNOWLEDGE
nothing for them to point at and say, “I made
that.” Even if they can solve a wide range of
problems, lacking something that they own
can lead to attrition. What to do
Give these engineers something to own top to
bottom. Whether it’s a module, a new feature,
How to recognize it or a large project, ask them to do more
Engineers exhibiting this pattern will show than just ‘get it done’. Ask them to become
high levels of Impact and lots of small pull an expert in that particular area or on that
requests without any identifiable home specific project.
base in the code. They’ll show a high level
of Involvement in the review process. And Then, double down on their strengths in that
because they typically spend their time area: assign them the 1.1 version, the bug
building and spend less time bug fixing their fixes, the unit tests, and the documentation,
own work, they’ll show high levels of new work then give them the 1.2 and 1.3 versions as
and relatively low churn. well. Allow them the opportunity to get to
know their domain, to work with it, to teach
These dynamics are often first identified in the others about it, and to develop a mastery.
Player Card report or in the team’s Submit and Ask them to give a presentation on the
Review Fundamentals. project to highlight lessons learned and best
practices. The key is to nurture a true sense of
ownership.
Scope Creep (noun): a pattern whereby the team, look to the external stakeholders that
originally agreed upon scope increases or interface with that team to see what might be
changes after implementation has begun. causing the issues.
Often, though not always, Scope Creep
happens incrementally and thus invisibly.
Bad
COMPLEXITY
Using data to make Scope Creep visible
to all parties can help mitigate the risks of
unexpected work, and can also be used to Good
combat this pattern moving forward.
TICKET JITTER
Mid-Stream
under this category: Changes
0
nn A Product Owner submits incomplete
requirements, leading to extra engineering -
time spent toward filling in the gaps or
resulting in ‘miscommunications’ later on. What to do
nn A Product Owner changes their requests Ambiguous or changing requirements from
after implementation began, leading to a Product Owner can often be a sign that
missed deadlines. that person is stretched thin. They have too
much to work on, so nothing gets their full
attention. It’s helpful, for that reason, to have
How to recognize it a discussion with their manager. Bringing data
This pattern tends to reveal itself in recurring to the discussion can eliminate skepticism
scope creep driven by the same product around what’s happening and help cut straight
owner. You may notice a significant expansion to the discussion about how to resolve the
of code that wasn’t driven by code review in situation.
the back of the sprint.
The handling of the situation should generally
be left to the Product Owner’s manager. If
it’s an issue of too much work, it can help to
eliminate the individual’s work in progress.
Otherwise, it may simply require coaching
around any areas they tend to overlook when
creating specs.
WORK FOCUS %
How to recognize it
New Work
A small amount of legacy refactoring is
healthy. It’s when you notice a whole slew of TIME
changes in areas that are unrelated to the
feature at hand.
What to do
Look at the Work Log for outsized code Open the topic up for discussion with the
commits in sets of files that seem completely team. Ask team members to make a case for
unrelated to the feature at hand. Talk to and against the refactor, and then come to a
the engineer, expanding refactors are rarely conclusion about whether it’s best to move
driven by the product teams. forward with the project, drop it, or tackle it
with a different approach.
Often, the Submitter will have some level review process over any given time period.
of seniority in the team, and the Reviewer These reports will help watch and manage the
trusts that the work is good enough. In other trends in the long-term.
situations, someone doesn’t value code review,
or everyone just ran out of time and felt the
FRI 4:55 PM Eng 1 PR Opened
need to push the PR through.
3 Commits, 5 Files Affected
++95 Lines, -- 67Lines
In any case, the code review process has a wide
range of benefits and outcomes: teams see 4:58 PM Eng 2 PR Merged
“LGTM”
improved code quality, increased knowledge
transfer within and across teams, more
significant opportunities for collaboration
and mentorship, and improved solutions to What to do
problems. So when an individual submits code While reviewing other people’s work is a
for review and no review is given, we sacrifice substantial part of what it means to be a
all of these outcomes for short-term efficiency. professional software developer, it’s not
always recognized as such. Rubber Stamping
often occurs in environments where the
How to recognize it review process is given little attention or
Rubber Stamping is most noticeable in the recognition; when leadership praises the
Review and Collaboration reports. Watch the behaviors they want to see in code reviews,
Review Workflow for PRs that opened and we generally see that the way people work will
closed in a preposterously short period of shift to match those expectations.
time, with a very low level of Receptiveness.
Low levels of engagement in reviews can On an individual level, it can be helpful to
also be seen in the Involvement and Review coach team members on what substantial
Coverage metrics. reviews look like in practice by showing
examples from others on their team. Try
When review happens later, as opposed to right deconstructing the feedback together in
after the PR is opened, there will be little to no a 1:1, so engineers leave the meeting with
back-and-forth in the comments (see the PR a framework they can use moving forward.
Resolution report). If there were no comments If there are specific engineers who are
on the PR, this PR will show as Unreviewed. frequently given less review, take into
consideration how they’re responding to
The Team Collaboration metrics will also any feedback in the process, how large their
provide insight into the time and energy that PRs are, or the time at which their PRs are
team members are allocating toward the submitted.
Often in long-running PRs, you’ll notice a few If you see a few back-and-forth comments
back-and-forth comments, then radio silence. with signs of uncertainty or disagreement in
their communication, followed by silence, it’s
Apart from the possible disagreement or worth checking in to see how you can move
confusion amongst the team, long-running the conversation forward.
PRs are also themselves a problem. A PR that
is a week old can quickly become irrelevant,
especially in fast-moving teams. Long-running What to do
PRs can also become bottlenecks. It’s usually best to first check in with the
Submitter. It’s their responsibility to get
Sort PRs by: Oldest their work across the line, so they should
be encouraged to bubble up disagreements
Recently Opened or uncertainties as they arise. If there is a
disagreement, get their read on it and offer
Smallest advice to move it forward. Depending on
Biggest
the situation, get the Reviewer’s read on it
as well — ideally when everyone is together
Least Activity
in a room or on a call. Make a decision, and
Most Activity ask anyone that disagrees to ‘disagree
and commit’.
Bus factor (noun): The number of team Furthermore, it helps to start with the Index
members that need to get hit by a bus before to get a high-level understanding and then
your project is doomed to fail. drill down into specific team dynamics. If the
Index is trending downward, check to see if
Having a low bus factor is risky. A High team members are getting into a cycle of only
Bus Factor means that there is a greater reviewing each other’s work.
distribution of knowledge and know-how
about the code across the team. When more 100%
KNOWLEDGE SHARING
than one engineer knows about each area of
the team’s code, there’s more optionality for
managers to assign tasks and more people 50%
that can provide substantial reviews, reducing
the possibility of bottlenecks to a release.
0
TIME
For example, if three engineers know how
to work in the billing system, a manager
can assign a task in that domain to any of
those three engineers. Contrarily, if there are
knowledge silos, or if only one engineer has What to do
experience working in the billing system, the Knowledge Distribution can be achieved
manager will have difficulty assigning those when team members are making small and
tasks to any other engineer. frequent commits, and there’s a healthy level
of collaboration and debate in reviews from
everyone on the team. It can be helpful to keep
How to recognize it this in mind when providing feedback in 1:1s
A team’s distribution of knowledge can be and when onboarding new hires to the team.
visualized with the Knowledge Sharing Index.
It’s best to use this report within teams that When you see a low Sharing Index (i.e., a low
you would expect to review each other’s bus factor, higher risk), see the Review Radar
work. A low Index means that there is a lower for opportunities to get team members more
distribution of knowledge across a team, involved in the review process. When you see
representing a higher bus factor risk. This the behavior you want to see in the review
also means there may be silos forming; a high process, consider recognizing that in a team-
Index represents a greater distribution of wide meeting.
knowledge across the team.
F E E D BAC K
LO O P
Learn Measure
“In Engineering we’re good at measuring the what. GitPrime gives us is the ability
to measure how we get there. I can’t imagine a company like ours operating without
GitPrime metrics.”
About GitPrime