Monday, 30 January 2017

Agilität und Effizienz

Ich habe in den letzten Wochen darüber nachgedacht, wie Agilität Effizienz fördert und sammle meine Gedanken in einem Artikel, den ich in einer der nächsten Ausgaben der agile review veröffentlichen möchte.
Ich veröffentliche den gegenwärtigen Stand hier vorab, weil ich hoffe, dass er bereits "gut genug" ist, um euch nützlich zu sein – und weil ich hoffe, durch euer Feedback die weitere Arbeit effizienter zu gestalten.

Agilität und Effizienz

von Urs Reupke

In den letzten Wochen bin ich umgezogen und renoviere jetzt die alte Wohnung. Viele Teilaufgaben führen mich durch Abende voll Beschaffung,Transport und Handwerk. Immer wieder frage ich mich abends: Hat sich das gelohnt? Habe ich effizient gearbeitet?
Daraus wuchs die Frage, was Agilität und Effizienz miteinander verbindet.

Tuesday, 10 May 2016

Review of "Functional Principles for Object-Oriented Development"

After a long time of agility and philosophy, here's something technical for a change.


Yesterday, I was talking OO and functional programming with Alex Chythlook, who told me that some problems I faced in Anathema could have been solved much easier applying functional programming idioms.
When I asked for details, he pointed me to a talk Jessica Kerr (@jessitron) held at GOTO 2014.
Go here in case you're watching the talk and would like to actually see the slides.


All of her points are well made, and she's an entertaining presenter. I am happy that she pointed out some things that I didn't have names for previously.
However, I am surprised that many of these ideas are functional, as they just appear to be thorough applications of OO principles to me. If they have been functional all the time, then it is certainly good to call them thus.

What stood out

"Errors are data too" Jessica said and told us to "not interrupt the execution flow". 
I've long spoken out against checked exceptions, and this nails it: If I treat an error as data, I am forced to deal with it. Right now, just where I would process the good result. No handing the exception outward, no wrap-to-catch-later.
That way, Exceptions are limited to things that I, as a programmer, have not foreseen, and that's the way they are meant to be used.

Idempotence, something she touches on in the very end, is quite important, too. Good to have a word, now. It describes the idea that an executable block of code (so, a function or a Single Abstract Method object) should change the world only once, even if it's called multiple times.
From her talk, I picked up the notion that this should be true for every function, and I don't fully agree with that because complexity increases when I build things out of things that build things, even if those are just functions.

The third main takeaway was her call for Lazy Evaluation. Doing that forces you to think in Objects or First Order Functions, and prevents procedural style – and that should always be a good thing.

What appears to be OO

I first stumbled when Jessica introduced a service object to limit a function's access to the database. Isn't that an application of the interface segregation principle (ISP) and the Single Responsibility Principle (SRP)? 
Smalltalk people always told me that even in Java, the client should define the exposed interface, and this is just that: If I need a service that just inserts, the method should have access to only that.

Next, she speaks about specific typing - again, isn't that just OO? If something represents a name, I should call it "Name", not "String". The DDD people have said it since 2004 and hardly anyone listened, so Jeff Bay had to point it out again in his paper on Object Calisthenics some seven years ago, calling on us to "wrap all primitives and Strings" (and numeric objects, of course).
Applying this principle in classes and productive code, I can well say that it is a game changer - your code becomes much more clear and expressive this way, even more so when you apply his next rule – "use first order collections" - as well.
Back to Jessica: Good on her picking up on that, I fully agree. It surprised me, though, that she watered down the principle by us to Options and Tuples later on in her talk. Those two are never domain specific, so effectively, she just put two new primitive types on our plate. 
More recent languages have more elegant ways of expressing these concepts, and they might feel more at home there.
I was surprised once more when she presented the lack of concern about when or how my code is executed as a principle of functional programming. With the OO concept of encapsulation comes the idea of Single Abstract Method objects, which are handed around as executable blocks. She even pointed us to the GoF patterns Command and Strategy, so clearly, this has been around for a while and was considered OO back then. 
Did the GoF silently sneak in functional ideas? How dare they!

What I didn't quite get

Apart from these three good points, there was one I didn't get: Structural Sharing? What was it about, memory efficiency? Didn't she just tell us that we should rely on our compilers instead of doing their work?


So, all in all, it doesn't matter. Whether it's OO or functional, this is a good talk to watch. 
If you want to brush up on intermediate concepts of coding or see some examples of how things might get easier if you break your common patterns: Go watch!

Monday, 8 February 2016

Teams R SEXI

In this post, I will explore what makes a good Development Team in Scrum from an organizational perspective.

Great teams

When it comes to structuring the Development Team, the Scrum Guide tells us that the team is “cross-functional, with all of the skills as a team necessary to create a product increment” and that the team should be structured to “organize and manage their own work”. Finally, we learn that the team should have between 3 and 9 developers, to be able to contain all the skills required while not increasing management complexity beyond the level self-organization can casually deal with.

Over the past few years, I have helped some clients to improve their teams’ setup and structure, and found that there are more criteria that the Scrum Guide only hints at but never mentioned explicitly.

Have few dependencies

While Scrum expects the team to be able to provide the product increment on their own, corporate reality often sees products with a scope much larger than what a single team can produce in reasonable time.
You may have read about scaling approaches like LeSS, and their call for feature teams. Rare is the product, though, where splitting into features is possible the moment your start with Scrum.

To alleviate the situation, I look for a setup where inter-team dependencies are as few as possible. In an ideal case, this means that the team has one team to receive input from and one more team to deliver output to.
For work to flow, the team has to be independent from other teams. Define your teams so that their scope covers a large, uninterrupted piece of the value chain, and integrate technical concerns as much as possible.
That way, you will reduce the number of handovers both in planning and in the actual work done.

Stay together

In a corporate environment, projects start and stop all the time. Project managers vie for resources, eyes on the deadline, not on the social effects. For team members, this means that today’s colleague may be gone tomorrow – so each of them looks out for their own piece of work first and foremost.
When introducing Scrum in such an environment, I emphasize the twin values of stability and reliability.
It takes a stable environment for employees to benefit from investing in the team’s success rather than their own achievements. Team members learn to trust each other over time and start to co-operate. In a stable teams, members can learn each other’s abilities and preferences – and that’s what it takes to get better.
Reliability, meanwhile, means that team members are on the team, period. Splitting people between projects eats up time beyond the numbers in your spreadsheet, as it introduces interruptions in the form of urgent requests from outside projects.
Now, any corporation worth the name will have a complex resource distribution in place already, and you will be hard pressed to change it all at once. What to do?
Allot people to the product as much as possible, and encourage them to block fixed slots of time for working on the product. If necessary, suggest they turn off phones, chat and mail clients; empower them to postpone dealing with incoming requests till team time is over.
That way, their team can learn rely on them, and teamwork improves.

Learn from each other

Remember what the Scrum Guide said? “Teams organize and manage their own work.”
It takes a certain level of experience to do that, and I have frequently heard managers or Scrum Masters complain that their team is not yet ready for this level of freedom – and next coordinate the work themselves, trampling the sprouts of self-organization.
So, it takes experience for the team to self-organize, and it takes laissez-faire.
The best teams I worked with did not consist of veterans only, though, since less experienced team members bring two crucial factors to the team: By embracing their curiosity, they challenge long-standing practices; by working with several of their more senior colleagues, they foster communication.
So, when building a team, I look for a good mix of old hands and new to make learning happen and self-organization possible, while still having all the skills to actually build the product.

Make work flow

This concludes my thoughts about criteria to watch out for when building great teams:
reliabilty, stability, experience, cross-functionality and independence.

So, when you are next thinking about how to improve your team, just think “Teams R SEXI”, and you are well on your way:

Experienced adequately
X-functional and

Mind, though, that these criteria are strongly skewed towards the organizational perspective and pay no heed to the more mushy, social criteria that are well worth considering as well.

What criteria do you apply to find your teams? Did you go at it from an entirely different angle? 
I am looking forward to your comments.

Saturday, 30 January 2016

Focus and focus time

In this post, I explore the Scrum value of focus, the notion of focus time and its implications for your Scrum team’s setup.

Focus as a Scrum value

Focus. It is one of the core values of Scrum, reminding us to be precise about our development goals and to stay on target at all times.
Focus tells Product Owners to build one product for a well defined audience, tells Scrum Masters to help their teams improve in one area at a time, and tells the Development Team to go for the Sprint goal and only the Sprint goal.
It is them - the team - I want to focus on in this post, although the thoughts apply to the other roles as well.

Focus time

Recently, a client introduced me to the notion of focus time. By his definition, focus time is the part of a Sprint that the team actually spends working on product backlog items directly contributing to the Sprint goal.
Thus, focus time is comprised of all the work required to get one specific product backlog item from “ready” to “done”, including design, implementation, testing, documentation and posing the odd question to the Product Owner or relevant stakeholders.
It is not: Helping to prepare the next Sprint, demonstrating the product increment in the review, improving the process in the retrospective or organizing the team in the Daily Scrum.1 While all of these activities are important, they are by definition off-focus, as they do not directly improve the product2.

Perfect world

In an ideal setup, the team spends most of their time focused. The Scrum Guide allows for up to 10% of the development team’s time to be taken for product backlog refinement3, while planning, review and retrospective take up 10% of the team’s time yet again.
Another 5% are eaten up by Daily Scrums and general communication with people in- and outside of our product: Even the best of bosses and stakeholders need some attention from time to time.

This leaves our ideal development team with
100% Sprint time
- 10% refinement
- 10% planning, review, retrospective
- 5% Daily Scrum and communication
=  75% focus time

That’s 7½ workdays out of your two week sprint! Contrast that with the common complaint that Scrum is all talking and keeps people from getting things done.

Half measures

Rare, however, is the team where all team member contribute all day, every day. The larger an organization, the larger its tendency to split people’s time and attention over several projects or products.
25 years ago, in 'Quality Software Management: Systems Thinking', Gerald Weinberg introduced us to the hidden cost of context switching, claiming that an even split across two projects left a knowledge worker with only 40% of his or her capacity to apply to each of them. (While Weinberg's original text is not available for free, his idea has spread beyond the cover of his book.)

So, let’s split some people and look at their focus time:
50% allotted time
- 10% context switching
- 5% refinement
- 10% planning, review and retrospective
-  5% Daily Scrum and communication
= 20% focus time

In case you’re wondering, I left the numbers for the four main Scrum rituals at their original value since all teams I have worked with so far insisted that their split members take part in all of them, since this is where the team makes all major decisions.
So, out of a promised 50% of somebody’s time and attention, only 20% contribute directly to the goals we set for the product – that’s hardly more than half of the 37.5% we might expect when looking at the original calculation.
Now, suddenly, Scrum is all talk and no action.

Said and done

So, the idea of focus – concentrating on what we ought to do – lead us to the notion of focus time, the time spent directly contributing to the Sprint goal. We have seen that ¾ of a team’s time could be spent focused, and that this number shrinks drastically when we split people’s time across products.

Now, I’d like to invite you to examine the time your team spends focused.
Do you get close to ideal numbers? Are you in the 20% range, even though everyone is on the project 100% of their time? Where does the time people don’t spend focused go and which of these activities are really necessary?
All in all: What could you do to improve the numbers?

Besides looking at things that distract the team, you might want to look at the product backlog items your team and Product Owner agree upon for the sprint. Is there a common theme, so that most or all of them contribute to a single goal?
If they have little in common, one could argue, there is not really one Sprint goal, and the team could never reach the lofty numbers I laid out above. However, there could be leverage in the way the Product Owner prioritizes the product backlog or the way you plan your sprints.

Let’s talk about your numbers and your findings in the comments!


Writing this post brought to my mind a number of questions, among them:
“What keeps teams from focussing and how to get back there quickly?”, “How to show the value of Scrum’s rituals to the ‘rather do than talk’ faction?”, and “Is focus time a good measure for the quality of a Scrum process? What other metrics are there?”

Comment below if you have thoughts on any of these questions or are particularly interested in one of them.

1 Neither is it taking part in communities of practice, performance reviews, answering mails, general discussion or undirected learning, along with most other things team members like to do.

2 Actually, this is the main reason that some developers tend to resent them. Hackers want to do, not talk. As a Scrum Master, you could do worse than to think about this before your colleagues bring it up.

3 Note that this is not the established practice of a “refinement meeting”, but rather includes all activities dealing with the process of refining the product backlog.

Thursday, 8 October 2015

Punkt, Punkt, Komma, Strich

Heute habe ich mich mit meiner Kollegin Anna Lorenz (@roadranna) über Daten und Punkte am Satzende unterhalten. Wieviele sind es? Und wann? Ein Ausflug in die Interpunktion.

Das Datum und der Doppel-Punkt

Auf den ersten Blick war die Frage einfach: Schreibe ich nach einem Datum am Satzende einen oder zwei Punkte?
Ich komme am 01.10..
oder doch lieber
Ich komme am 02.10.
Klare Frage, klare Antwort: Version zwei ist richtig.
Förmlich heißt das dann: "Am Ende eines Ganzsatzes setzt man nach Ordinalzahlen, die in Ziffern geschrieben sind, nur einen Punkt.." (§105 der amtlichen Rechtschreibregeln)

Abkürzungen und Ellipsen

Das aber ist natürlich nur die halbe Antwort, denn auch andere Fälle bringen Punkte vor den Punkt:

Abkürzungen zum Beispiel
Ich komme am 03. Okt.
und auch Ellipsen, etwa wenn ich laut nachdenke
Ich sollte am 04.10. kommen...
Wieder setzen wir keinen weiteren Punkt.
Förmlich: "Am Ende eines Ganzsatzes setzt man nach Abkürzungen nur einen Punkt." (§103 der amtlichen Rechtschreibregeln)
Zusammengefasst können wir also festhalten: Nach Punkten steht kein Punkt.

Satzzeichen mit und ohne Ende

Zum Glück aber ist nicht alles Punkt, was am Satzende steht, und da verhält sich die Sache anders:
Du kommst am 05.10.!
brüllt der Vater dem Sohn nach, wenn jener droht, der Mutter Geburtstag zu verpassen, und
Kommst Du am 06.10.?
fragen wir bei einer Einladung zu einem gemeinsamen Freund.

Genauso verhält es sich bei den schwächeren Satzzeichen Komma und Semikolon, beim Gedankenstrich und beim Doppelpunkt.

Wie geht's noch?

Jetzt hilft die schönste Regel nicht, wenn der Leser trotzdem darüber stolpert und sich wie wir heute fragt: "Ist das so richtig?"

Elegant und zweifelsfrei umschifft man das Problem mit ein paar Ziffern mehr
Ich komme am 07.10.2015.
oder einigen zusätzlichen Buchstaben
Ich komme am 08. Oktober.
Bei Abkürzungen stellt sich die Frage nicht mehr, wenn wir sie ausschreiben.

Tisch für zwei allein

Doch Vorsicht: Während der Vorschlag
Ich könnte am 09.10. kommen oder am 10.10.
leicht von der Hand geht, steht bei der langen Form
Ich könnte am 11. Oktober kommen oder am 12. Oktober.
sofort der innere Deutschlehrer hinter uns und mahnt die Doppelung an.
Schnell steht da
Ich könnte am 13. Oktober kommen oder am 14.
und wenn ich diese Zeile am 10. September schicken, dann wartet Anna vielleicht vergeblich auf mich.

Thursday, 9 July 2015

Body scanner estimation

9 out of 10 coaches agree: Estimating is not about the numbers, but about the dialogue.
Even though, many teams find themselves discussing a meager difference in story points - often to the point of frustrated sighs - while the technical details are long clarified.

Today, I have been listening to an explanation of story point estimation. The team was just discussing a list of criteria to judge stories by, and I couldn't help but think: "What if we just cut to the dialogue instead of dealing with points, and used the criteria to encourage it?"

That thought led to a quasi-algorithmic way of estimating, quickly dubbed "Body scanner estimation" by my colleague Ilja Preuß (@ipreuss on twitter).

How to play

1. Discussing the story itself, and answer any questions.
2. Answer all of the following questions with either Yes or No.
    • Inside/Outside
      • Do we need to pull support or input from outside the team?
      • Does it affect outside systems?
      • Do we need to share knowledge about the results?
      • Does it need management approval?
    • Knowledge/Skill
      • Does it need specialized knowledge? (Or can any of us do it?)
      • Is this story the first of its kind for our team?
      • Is it very time consuming?
      • Is it annoying to complete?
    • Technical
      • Do we have technical debt in the vincinity?
      • Does the change ripple throughout our system?
      • Do we need to set up testing infrastructure?
      • Do we need to set up build infrastructure?
3. Now, count the number of "Yes" and add 1 as the base cost.
4. Round the result to the nearest number from Fibonacci's sequence to get your estimation.
5. Sanity check the result.

This method of estimation gives teams a handrail to work with, with questions to spark further thought and discussion.

I yet to try Body scanner estimation, so I am eager to hear of your results. Do the questions make sense to you? Did you add some of your own?
More importantly, though, did you come up with a fresh way of estimating lately? 
Let us know in the comments.

A template to communicate intent

In a corporate environment, teams face many different stakeholders.

Despite of best efforts, team members often have trouble judging requests for what they are actually worth, and tend to react to apparent urgency instead of actual value.

A team lead I recently met found himself in the very same situation, and prompted me for advice. In our conversation, we found out that in his particular case, the issue was partly about communication: the team members didn't know the teams goals, and so they had little to go against.

However, knowing that goal would only get them so far, because things are rarely cut clearly - a request may be out of scope for the team, but fully aligned with the division goal.

The template

Shortly after, I came up with a template to cover three levels of goals and intent:

We will [achieve the team goal],
in order to [achieve the division's goal]
so that the company can [achieve the company's goal].

For example:
"We will ensure the performance of the mainframe
in order to enable the free flow of data
so that Skynet always remains one step ahead of the resistance."

How to apply it

Facing fresh input, this enables team members to think on their feet and look beyond the team's immediate goals, judging issues not only by what their team lead told them, but also by the larger objectives.
This mirrors the military concept of commander's intent, where doctrine says that the aim, purpose and implications of an operation have to be understood two echelons down - something that can hardly be achieved in a single sentence.
By that measure, just filling in the blanks makes for a nice poster, but leaves half the work undone: The actual act of face-to-face communication, where the team lead informs his colleagues about the three levels and their implications - once to make them clear, and once again whenever they change.

Obviously, a dialogue like this requires knowledge of the higher level's intent - but that is hardly a bad thing, since communication goals in a clear and concise fashion is part of proper leadership.

By my assessment, this template works best when the team has an overarching goal or mission that keeps constant for at least some weeks. With small adjustments, though, you could easily use the template for short term objectives like Sprint goals in a Scrum process.

What do you think of the template? What do you do to communicate management intent to your teams? Please tell me in the comments.