Thursday, October 20, 2016

Releasing with balls of steel

11.30
Product Owner: Henri, can you check your email? I forwarded you an email where people are discussing about the address issue.
Me: Sure.

I read the emails and see that the one known address related issues is actually causing bigger problems than expected. Good news is that we have already fixed the problem, it just hasn't been released yet.

11.33
Me: So, sounds like we could still do the release today, after all.

1.5 hours ago in our daily standup I had just concluded the obvious thing. If it is was a normal day, we could do a production release today but today is not a normal day. Today is the single most important day for the whole corporation because of what happens in the evening. So no releases today. And besides, it's Friday, Fridays are never the best days to release anything.

But now the situation has changed. If we don't release, there will be certain customers whose purchases will cause lot of extra work to the customer support because the address data won't be saved correctly.

11.35
Me: Hey, let's go to the lunch now. When we come back, we start preparing the release. If it looks like it's not going to happen, then we won't do the release. But if everything goes fine, then this release would be pretty valuable. But I want to emphasise one thing: we have to be extra disciplined today.

12.15
Product Owner: While you were at lunch, I tested the address fix and it works. But it seems that we have another address related problem. The street address validation isn't very optimal.
Me: Well, that should be a very small thing to fix. I wonder if that thing actually explains the yesterday's complaints about how some people weren't able to purchase successfully?
Product Owner: Could be so.
Me: It seems to me that we should definitely take this fix to the release as well. It's quite bad if the customers want to buy but aren't able to do that.
Product Owner: I agree.
Me: Ok, let's split the work here. Can you Developer fix this second address issue?
Developer: Yes, I can do that.
Me: And I continue looking at this login change related thing.
Product Owner: I continue testing the other new features.

12.45
Me: I have found a possible solution for the login issue. It would fix the problem but then cause another problem, which maybe isn't not that big thing. Hmm... Or, actually it ruins the whole idea of what this login feature is all about because... Ok, I have to think a bit more.

13.15
Developer: I have the address fix done.
Me: Good, let's review it right away.

13.20
Me: This looks good. I wonder if you could next check what is wrong with this one end-to-end test. I first thought that it's a random failure in the APIs but this has failed quite many times recently. I'd say it's quite important to check so that we get the tests green before the release.
Developer: Yes, I can look at that.

13.45
Me: This new login feature is a bit more complicated than expected. I suggest that we don't include it to this release since the risks are too high and the possible benefit would be close to zero, I mean what comes to the evening.
Product Owner: Sounds good to me.

14.00
Developer: I found the reason for the test failure. It seems that this particular XHR call has quite short timeout.  If the API responds a bit slowly, as it seems to be doing quite often, the user sees the error message.
Me: Makes sense. Well spotted! And I have now reverted the login changes. We can continue finishing the feature on Monday. Let's review your change and then start making the release together.
Developer: Ok.

Our build process in CI is annoyingly slow. I add a ticket to our board that we have to do something for it in the near future. On the other hand, this is good time to think if there's something special that has to be taken into account in this release. Besides the special day, there isn't. It's actually quite the opposite. It's important to do the release exactly the same way as any other release.

14.15
Me: The latest version is now in the dev environment. You can test the address fix and we will see how the end-to-end tests will pass.
Product Owner: Ok.

14.25
Product Owner: Yes, the address works well now. On my behalf you can do the staging release.
Me: We also checked the tests and they are good too. I will start the staging release.

14.35
Me: The staging release is now done. I will run the load tests next.
Developer: I can check the staging end-to-end tests as they finish.
Product Owner: And I will once more check the new features in the staging environment.

14.45
Developer: The tests are ok.
Me: And so are the load tests, nothing special there.

14.55
Product Owner: Ok, I have moved all the cards to the "Ready for prod" column. Will you do the production release next?
Me: Yes. And I will inform the stakeholders.

15.00 (chat)
Me: Hi @DBDev, @EveningBusinessOwner and @EveningDev. We just did a staging release and the prod release is ongoing. This release fixes the address validation and address saving problems.
DBDev: Ok
EveningDev: Friday 15.00. You have balls of steel.
EveningDevelopmentManager1: Did you do it "jacket on and compile"?
APIDev: same thoughts...
Me: :)

15.05
Me: The production release is done now. I clicked through the main paths and everything ok so far.

15.05 (chat)
Me: Release done.
EveningServiceManager: We have today "pretty" important day!
Me: And now we are a bit more ready for that
EveningBusinessOwner: Tested?
Me: In many ways. Unit tests, code review, end-to-end tests (in dev and staging environments), Product Owner's tests (in dev and staging environments), load tests. We also went through the new features critically and left one risky feature out of this release.

15.09 (chat)
EveningBusinessOwner: Redirect isn't working
Me: What redirect? I just tested your login and it worked fine.
EveningServiceManager: How about registration and purchasing?

Feels a bit cold. We don't know what he meant about that redirect and we are just waiting for some additional information. I'm thinking what we have released and can't figure out anything that could have broken their part of the system. Calm down, I'm saying to myself. We have done this as well as we can and so many times before. If there is an issue, it must be something that has been there also before.

15.13 (chat)
EveningBusinessOwner: It works in buying. Not in registration but this is actually on our side, we have never implemented that.
Me: Ok
EveningDevelopmentManager2: I'm bit worried about this release at this point when there has been so much other things too during the week.
Me: I understand that but we did this release exactly to support you.
EveningDevelopmentManager2: I think I'm gonna have a relaxing beer. Let's hope that everything works. We expect plenty of orders today and tomorrow.

15.22 (chat)
APIDev: Registration has already started, it seems.

15.30 (chat)
APIDev: There seems to be quite many errors in regisration
Me: What kind of errors?
...

We figure out that the errors are caused because our registration flow is not technically optimal. We could avoid those errors by making an additional API call before posting the registration data. For the user this has no effect. In both implementations she would see exactly the same error message.

Little by little the situation calms down. The big night has started and we follow the production charts. We can see a nice spike in the usage data but a boring, flat response time graph.

A couple of hours later we wish everyone good night. Everything has gone really well, at least technically. At this stage we don't have any business numbers available.

Epilogue


When is a good time to release new features and fixes? If you face the question one-sided only, the answer is pretty simple: whenever the release makes the system better. On that Friday there were two identified issues with clear solutions and from that point of view we definitely wanted to release.

But everything is (at least) two-sided. The other side in releasing is about the risk. What if the intended changes we have made will cause some unintended changes?

In the traditional software development there are two ways to approach this dilemma. The other one is to admit that the risks are too high and not to release. The other one is to quickly hack solutions, deploy them, and then probably quickly hack the fix to the problem that was caused by the initial fix. What is common for both is fear.

However, software development of 2010s is not fear driven. It is based on agile and extremely disciplined process. It is based on code written with great quality, on automated tests with good coverage and quality, on automated build and release processes, and on highly professional people working as a real team.

"Software development of 2010s is not fear driven."

I am very proud of how our team was able to do the release on that Friday and I want to emphasise that - this may disappoint some of you - it wasn't about cowboys doing heroic actions. It was rather people following the process that has been tuned along the way and is still improved all the time. Also it was about certain amount of humility when admitting that the feature that does not work well enough is excluded from the release.

What is also important to understand is that this wasn't only about what we did on that day. 99% of this was what we had done before, in previous commits, in previous code reviews, in previous releases, and so on. In a situation like that you cannot fix your process. But if you have done your work well earlier, you can have great possibilities to react to the changed situation. Which I guess is what Agile is all about.

Tuesday, August 23, 2016

Failure lessons in Rome

This summer I was a week in Rome with my 13-year old godson. While seeing the eternal city, for some reason we talked a lot about failing. I wanted to share with you the things we talked about.

Experiments' delta


We flew to Rome from Helsinki. In the airplane my godson mentioned failure and I wanted to give him some different thoughts about it. It is something I remember seeing for the first time in a HÃ¥kan Forss' presentation about lean (and legos of course, if you know him). In his presentation he talked about making an experiment with an expected result. In case the the result was something else than expected, that wasn't called as failure but as learning. In mathematics the difference between the expected result and the real result is called delta. This delta is not failing, it's learning.

What I find important here is that when you do something, make an expectation based on the theory you have. If the thing you try doesn't work out as expected, be kind to yourself. Instead of judging yourself, celebrate that you just learned something.

Exhausted but still learning


We arrived at Rome in the middle of the day, so we had plenty of time to do something in the city also on the first day. We decided to take a walk in order to find a nice restaurant and some geocaches. We found some pizza, pasta, and also caches but our walk during that afternoon became quite long and it was really hot (almost 35°C).

Basilica di San Giovanni in Laterano, a church visit on the first day

When we came back to the hotel, we were really exhausted. In order to avoid that on the next day, we decided that we need to have water bottles always with us. This became our second lesson about failing and learning. It wasn't the best possible first day but we learned an important lesson that gave a chance to have better time on the following days.

Leonardo's scientific attitude


The next day was really nice for us. Amongst other things we were in Vatican and even saw the Pope himself! During the day we also accidentally at Leonardo da Vinci's museum. We decided to step in. The museum was filled with machines designed by the master himself. One of them caught my attention. It was da Vinci's experimentation related building a machine that can fly. He wanted to see if "beating wings would raise a heavy load".

What was really interesting was his notes about the wing:
"... but be sure that the force is rapid and if the above effect is not obtained, waste no more time on it."

Leonardo da Vinci's wing expirement

I think this was really amazing. While our current culture is so much worried about failing, 500 years ago there was a man who had really good approach on it. If da Vinci wasn't able to get the result he wanted, he was ok with that and was able to focus on other things.

Failure or needs that aren't met?


In the evening we wanted to find a good restaurant where we could sit outside and eat tasty Italian food. Unfortunately we both had rather lousy meals. The lamb was actually really bad. :(

While realising that we had chosen a wrong restaurant, I wanted to give yet another aspect on failures, one that I have learnt from nonviolent communication. The idea is that instead of failures there are just needs that aren't being met. So instead of thinking that we failed on choosing the restaurant or the chef failed on cooking delicious meal for us, we can focus on the needs we had. In this case we wanted to enjoy warm Roman evening outside having good food with decent price. What happened was something that didn't fulfill those needs.

You may wonder what is the big difference here. I have found out that when you look at the failures (and the reactions they cause) by looking at the needs behind them, the failures become more human. In other words this is about bringing empathy to failures.

Navigation failure


The next day it was time to rent a car. We drove to the amusement park called Rainbow Magicland. We had really good time there - expect my 20 seconds in the crazy roller coaster. Ok, it was fun, in a way...

Ranbow Magicland and its wild roller coaster

Our plan was that after the park visit we drive to Castel Gandolfo, to the Pope's summer residence. My godson used the navigator and I was driving. When we had driven about 30 minutes and seemed to be getting closer to the Rome center instead of Castel Gandolfo, I started wondering where we were actually heading at. When checking the situation, we found out that we were actually navigating to Via Castel Gandolfo (Castel Gandolfo Street, couple of km from Rome center) instead of the castle that was located ab 30 km from Rome to south.

Navigation failure you can say but I rather say so what. Instead of worrying that we weren't able to follow our plan, we started looking at new opportunities. Our primary goal for the next day was to swim in the Mediterranean. By looking at the map it made perfect sense to drive first to Castel Gandolfo, where we actually found a really lovely lake to swim, and after that to the west coast where we enjoyed the warm water of the Mediterranean.

Lago Albano - lake next to Castel Gandolfo, great place to swim
In this case it was of course relevant that our plan wasn't that critical. But if you think about it, how often the inability to follow a plan - even with more important cases - really matters? How often it actually brings us new opportunities instead?

Scale matters


On our second last morning in Rome we wanted to try the toast machine at the hotel breakfast. We put four slices of bread to the machine but when eating we realised that the bread wasn't warm enough. It was time to share the last lessons about failures with my godson. While this "failure" was really small-scale in the first place, there was a scale-related lesson hidden in it.

Toaster that didn't heat up breads

The thing is that when you try something new - like new toaster - try it first with small scale. In this case we could have used two slices of bread first and see how the machine behaves. When realising that one round in the machine is not enough, we could have put two more slices and heat them up with two rounds.

This is something that is used a lot in the product development, including software development. It's better to fail on the development phase because the failures are typically more small-scale failures and their cost is smaller compared to the production where failing is usually much more expensive.

Attitude of life


We had super great time in Rome but besides all the sightseeings, comic stores, and warm weather I hope that my godson also remembers something what we talked during the week. Failing is not something you have to fear because failing is full of learning opportunities. Basically it's all about how you see your life. When something negative happens, do you focus on worrying about it or do you take the opportunity to learn for the next time?

Monday, July 4, 2016

Nonviolent communication with development team

Nonviolent communication (NVC) has been a really important topic for me during the past three years. I have told many people how the book Nonviolent Communication - A Language of Life (Marshall B. Rosenberg) has changed my life. In the beginning of this year I read the book for the second time, which has even more increased the meaning of it to me.

About a month ago I was lucky to take part of Agile Finland's coaching camp (#accfi). It was a truly magnificent weekend with amazing people and interesting open space sessions. My main input during the weekend was to share NVC with the other participants. I was really happy to see how many got interested in it and said that they want to learn more about it when they go home. Also quite many of them said that NVC was the most important thing they got from the open space sessions.

Agile Finland Coaching Camp was held in amazing place called Herrankukkaro

When I got back to the work after the coaching camp, I wanted to continue sharing thoughts about nonviolent communication. I suggested my team that we could have a 2-3 hours session where we would talk about the topic. Again, I was happy to hear that everyone in the team were interested.

The session was really successful in my opinion and I wanted to write this blog post about it. This is for those who are interested in NVC and maybe even wonder if it is something to talk with your colleagues.


Briefly about NVC


Nonviolent communication (sometimes called compassionate communication) is based on the four basic elements. While we can apply it also on positive situations, NVC matters most when we face something negative. This can happen anywhere in our lives, at home, at work, in public places, or for example when reading internet forums.

The basic idea is that when something negative happens, we would not rush into judgments and conclusions too fast but instead proceed with the following steps. The first step is to make observations, to think and clarify what really happened. The second step is to focus on the feelings that are present or existed during the situation. After that comes the crucial third step. Instead of concluding that the feeling was caused by the thing that happened, Rosenberg suggests that all of our feelings are caused by the needs that are either met (positive) or not met (negative). So the third step is to try to understand what met or unmet needs caused the feelings. The fourth step is then to make a request that would help us to meet the needs and that way enrich our lives.

The basic elements of nonviolent communication

You can apply the four steps in two ways. Especially if you are having strong feelings yourself, you can focus on your own feelings, needs, and requests. The other option is to focus on the other people's feelings, needs, and requests. These two approaches differ greatly from what we too often tend to do, judge either other people or ourselves.

To me there is one thing in NVC that has helped the most. While I may have not always remembered the four steps, I have tried to remember one thing. The core of NVC, in my opinion, is empathy. When I have empathy present in my daily life, I can get so much more good things out of it and help others to have good things too.


Introducing NVC for the team


I started our session by going through the four basic elements of NVC. In order to have some more concreteness I asked if anyone of my team members (*) had recently faced any negative situations in their lives. One of them told us how in the morning she had felt bad when meeting a colleague in the cafeteria but not wanting to chat with her because of the hurry to do some important work. This was a nice example to start with.

First we talked about what had happened in that situation. In this case it was rather easy to make the observation. Two people meet each other in the morning, the other one doesn't want to have a chat, other than saying good morning.

The next thing was to name the feeling my team member had. This isn't always so easy thing to do. There are so many different names for different feelings but remembering them and finding the correct one can be truly challenging. I don't remember exactly what feelings we identified for this case but probably we talked about being distressed and in a hurry.

List of negative feelings by Center for Nonviolent Communication
(https://www.cnvc.org/Training/feelings-inventory)

As a third step we tried to name what needs of my colleague were not met and that way caused the aforementioned feelings. This again can be sometimes really difficult phase. Even though the needs affect to everything we do, we are not always very informed about them. What comes to the example case, we concluded that my colleague both had a need of connection and at the same time need of effectiveness in her work. The contradiction between these two caused the negative feelings.

The last step in NVC is to make a request that would help us to meet our needs. When taking account the need to do the work, the request could have been for example asking if they can have a chat the next time they meet because of the work that my team member wanted to do.

While this was a very simple example, it was a good start for the session. From here we proceeded towards more difficult cases. What was important to me was that we would use as much our work related cases as possible.

"Henri had a really good way of leading the session; softer start and then to more difficult real life cases."


Feelings created by customer feedback


A week earlier there had been a customer survey on our website. The customers had been asked how successful they had been in doing whatever they wanted to do on the site and then give a free comment related to it. This gave good material for our session.

First we went through some negative feedback and feelings that it caused. To my surprise none of the feedback created such feelings that I had expected, or due to such reasons that I had assumed. Intuitively I would expect that when someone harshly criticises the system you have built yourself, you feel for example annoyed or disappointed. At least that was how I typically used to feel before I read about NVC. I either used to judge the user (incompetent user) or myself (bad at building web sites).

However, in our team the feelings were maybe disappointed but for different reasons. Our team members felt sorry for the users because the users were not able to accomplish what they had wanted. The team members were disappointed also because they were aware of those issues but couldn't do much about them. In other words, they knew the problems users have, they knew possible solutions, but they didn't have management support to implement those solutions. This led our discussion into two things. First we talked what kind of requests we could make for the management to enable us solving the customer needs and feel accomplishment in our own work. The second thing was to change the point of view.

Like I wrote above, we can focus either on our own feelings and needs or other people's feelings and needs. In this case the other people were not only the users of the system but also the management. We talked what kind of needs the management had and what kind of reasoning had been behind certain prioritisation decisions. I think this was a really valuable aspect, to have empathy towards the management. What I observed during this discussion that first there was a bit higher stress level when our colleagues told about their disappointment towards the missing management support. Then when some empathy was added to the discussion, the stress level lowered. This is something that I have witnessed happening many times in myself when applying NVC.

"When you honestly try to understand other person's point of view and needs behind that, it takes you closer to the 'from human to human' attitude and problem solving. It's not actually anything special, it's just not that easy when you are in a hurry in your daily work."


Positive feedback and NVC


Like I mentioned above, you can apply NVC also in positive situations. The customer feedback was again a great case for that. While there were plenty of negative feedback, there was also a lot of positive feedback.

I did the same thing as with the negative feedback, I read aloud some of the users' comments and asked how our team felt about it. Obviously our team members were happy that they had been able to create such a system that makes (at least) some people satisfied. But more interesting was what different kind of positive feedback gave for us.

Some of the feedback was very short like "works really well" or just simply a smiley. While this surely felt nice, that kind of feedback didn't really help us to understand how we had been able to help the customer. Instead, when there was feedback like "the service was very easy and fast to use", it helped us to better see in what way we had succeeded. This led to the discussion how we ourselves can give feedback for other people. Do we in a way judge them by saying that they are good or they do good work? Or do we tell them how their work has helped us to meet our needs? Everyone agreed how the latter way is clearly more valuable for the feedback receiver.

List of positive feelings by Center of Nonviolent Communication
(https://www.cnvc.org/Training/feelings-inventory)

More challenging cases


We further continued to more challenging cases. One of our team members had had quite a lot of negative feelings related to co-operation (or lack of it) with another team in the same organisation. Her reactions and conclusions had been mainly how the actions of the others had created the negative feelings for her. So this clearly was a great opportunity to take a different point of view.

First we went through some of the situations there had been, without jumping into the conclusions and judgments. Then we tried to identify the feelings there were. Like in many other cases during the session, this wasn't as easy as it sounds. Many times during the session I asked someone about his or her feelings but the reply went very quickly to what the other person had done in the situation. I think that this is probably the most challenging part of NVC. Naming feelings is really difficult, identifying needs maybe even more. But especially difficult is to listen ourselves and our feelings and needs, instead of focusing on the other people's actions.

"I really started to think my behaviour and reactions related to certain persons / topics (even though unfortunately I note that it requires plenty of effort in my busy daily life)."

When we had talked enough about the feelings and needs that the team member had regarding to this case, and also practiced in making requests for the other party, we took the other party's point of view. To me it looked like that this helped my colleague even more, to focus on the other person's feelings and needs. I don't think I can overemphasise the value of empathy.

During the session I noticed how difficult it was to name the needs we have. Since I kind of anticipated this, I had printed the list of different needs before the session. We used that list and saw how in so many cases the needs we have in our work are related to the need of connection, the specific needs being like appreciation, cooperaton, and respect. I wonder what would happen in organisations if people would better understand how important needs these are for the employees, for human beings.

List of needs by Center of Nonviolent Communication
(https://www.cnvc.org/Training/needs-inventory)



NVC inside the team


As the last case we talked about a situation that happened inside our own team. I found this very interesting case since the actions of some people caused positive feelings (like excited) for some team members and negative feelings (like worried) for others. This demonstrates very well why we need to take responsibility of our own feelings. When our needs are met, we may feel excited. When our needs are not met, we may feel worried. It's the needs that cause feelings, not the actions of other people.

"To me it was really an eye-opener when you reminded how the same action can create different reactions for different people, depending on their motives and needs. I think this helps to understand the other person's point of view."

Again we talked about the feelings and needs related to this case. What I observed this time was how there was a rush to jump into the solutions without first clearly understanding the needs. This is yet another challenge with NVC in my experience.

I felt really proud that our team was able to talk about difficult cases like this. I also believe that this increased the trust inside of the team and made our team stronger than before. For this particular case it gave us tools how to behave differently next time if there is a similar situation.

"I believe that NVC adds trust in the work community and respect towards the other people's thinking and behaviour."


There are no wrong feelings


One major thing during the session was to see how sometimes people felt ashamed of their feelings. Like in the first case our colleague felt that she wouldn't have had the right to feel as she did. Same happened a couple of other times during the session as well. What I wanted to emphasise was that we have a right to have the feelings we have; there are no wrong kind of feelings. When we understand the needs that cause the feelings, it is much easier for us to accept ourselves.


After the session


I think we had a really good and valuable session about nonviolent communication. During the weeks after it we haven't talked much about NVC but I have seen a couple of cases where the session clearly had a positive effect. In one case one of the team members said to me what negative feelings he had had during the daily standup, and why, when I had judged his idea very quickly. I apologised my action but also happily thanked him for saying his feelings aloud since it helped me to see how I had acted in a non-constructive way.

Another team member has also told me how she has even more went through the case regarding the other team in the organisation. She has also talked about NVC with her family members in order to give them some ideas how to handle certain difficult situations.

"Interesting how NVC can be useful with people in all areas of my life: work (workmates and bosses), boyfriend, family members, friends, and all the people I meet in my life."


Summary


NVC has enriched my life a lot and that way created me a need to share it with people near me. Since I spend a lot of time for almost every day with my workmates, I find it very valuable that they have at least the basic idea of nonviolent communication. The session we had created a valuable basis for that and further improved our high-performing team into the next level. Even though this was just a beginning, I'm confident that there is a lot more waiting ahead of us.

"I hope that I find time & energy to learn more / read the book. Maybe during my summer holiday."
"NVC - this model is really worth of getting known. The session gave me good basics to use the model already now but also left an exciting feeling to learn more."


(*) I use the word team member a lot in this blog post. A team member can here mean a programmer, Product Owner, Project Manager or something else. I have chosen to use the more generic term since I kind of think that setting roles for the people can be violent and unnecessary categorises people. Since we are a software development team, I rather think that we are all developers with different special skills.

Thursday, June 9, 2016

The best code review tool ever: discussion

Code review as team performance indicator


Sometimes people wonder what is a good way to measure software development team performance. While the obvious approach is to focus on the results, the outcome, I suggest that code reviews is another thing you should pay attention to. Personally I have seen that in the best teams code reviews work naturally, bringing a lot of benefits that enable creating valuable outcomes. In the less performing teams code reviews are skipped or they are somehow forced.

Code reviews can bring at least the following benefits. They increase the quality of the code. They act as a gate both for internal and external quality. They spread information inside of the team and that way support shared code ownership. They amplify learning. For the new team members they are one way to get along with the features of the product and the way of working in the team.

So if there are so many benefits for doing code reviews, why aren't all teams doing them? Here we come to the point why they measure the team performance. In the best teams, in my personal experience, people understand the benefits and they are willing to review others' code. They appreciate their own and others' learning. They want to have truly shared codebase instead of functional or component coding silos. They see how code reviews increase the quality of their work. If I summarise this into one sentence - they care. A team cannot perform very well if the team members don't care about these kinds of things.


The problem with pull requests


Since the very beginning my current team has done all the code reviews face-to-face; the author explains commit by commit what he has done and why. However, a couple of months ago we got new team members that are not located in Helsinki. This led us to the situation where we started using pull requests. When a remote team member finishes something, he creates a pull request and someone from the Helsinki site reviews it. We are using Stash where you can leave comments to any code row and have a conversation there if needed. Works nicely, kind of...

Little by little I got annoyed when I realised how much time it takes from me to do a code review. First of all, when there was just me reading the commits, it felt really inefficient. I had to make guesses what the author had meant and since I wanted a confirmation, I needed to write a comment. This led to another inefficiency, conversation around commits. Then there usually was another round of commits based on the feedback and sometimes similar problems also on this round. If my initial feedback was misunderstood, the new commits created even more waste to the process.

Of course in some cases I took the conversation off from the tool and we used a chat. But all in all, even though we had a nice tool, this wasn't working well. From the lead time perspective, because of all the delays in the process, it was really slow. From my personal perspective, it was frustrating and took time from other things.

However, we didn't change anything for a while. Maybe all of this wasn't so clear to me at that time. Maybe I was too busy to hop on the bike.

Then at some stage the remote team members suggested that the Helsinki programmers should start doing pull requests as well. That way they could learn from us and understand better what we are doing. And I think that there was also an equality aspect between the sites. My intuition was against this idea but I couldn't reason it at that time. I remember mentioning something about the pull request tool and one of the remote team members replying: "it's a great tool". And yes, it is a great tool, it is just solving the problem in the wrong way.

Because it would have not been fair to judge the suggestion beforehand, we tried it. One of the Helsinki team members created a pull request for the remote team. They reviewed it, gave some nice feedback and he did the modifications based on that. So in a way it worked pretty ok. Expect that also in this case there was a bit of the delay issue but still.


Get rid of pull requests, start talking to each other!


The most valuable feedback from this experiment was that it made me think. I felt that despite of the good intentions, we are going to the wrong way. It's not that Helsinki people should start doing pull requests but the remote people should stop doing them. Or at least we should change the way how we go through the pull requests.

When I started doing yet another code review and during the first two commits I already had a couple of questions, I just decided to stop there. We went to Google Hangouts and did the code review just like we had been doing with the co-located team members: the programmer goes through the commits one-by-one and explains what he has done and why. And most of all, we discuss!

It's probably not difficult to guess how it went. I got immediate answers to my questions. We got some short discussions about other commits too. I was able to give some feedback so that I was confident that he understood it. Code review was quickly done and we both felt it was exactly how we should do them also after this.

And this is how we have continued after that. There have been some small code reviews done without talking but most of them we have done by discussing. The benefits I just mentioned have realised pretty much every time and besides them there have been other ones too. Sometimes code reviews have generated discussion about future plans or ideas how to improve our code in general. In some cases the good discussion has saved us time because we have concluded for not doing something. And of course there is the rubber duck effect; quite often it's not the reviewer who realises something but the author himself. This is something that could not happen without people talking to each other.


Summary


Programmers tend to be people who enjoy using technical tools. From that point of view it's easy to understand why a well-built pull request tool may sound like a great way to do code reviews. However, by doing code reviews by discussing you get so many more benefits compared to code reviews where the reviewer just reads the code. No matter how good your tool is, it cannot replace people talking live. Whether it is face-to-face, by phone, with a video tool, or some other way.

Wednesday, May 25, 2016

I don't care what you did yesterday

I have worked in different Agile teams for several years. Some of them have been Scrum teams, some Agile teams in other ways. No matter what methodology the team has used, one practice has been pretty much always there, the daily standups.

During that time I have searched the best way to have daily standups. I'm well aware that there are no best practices, just good practices in different contexts, but still I feel that finally I have found (so far) the optimum way to have daily standups.

Let me show you the path I've walked. The starting point shouldn't be a big surprise for anyone.


The 3 questions


What did you do yesterday? What are you going to do today? Is there anything blocking you? These are the questions that probably most of the Scrum teams all over the world ask every working day from every team member. I find this a very effective way to focus on every day work compared to for example weekly meetings.

However, there is one problem here. Scrum should be team work. If the most often repeated ritual focuses on individuals so heavily, something has to be missing there.


Runners and baton


Some years ago I found a blog post (*) that described different approaches to the daily scrums. One of them was user story focused daily standup. The idea is that we shouldn't "focus on the runners but on the baton". Runners obviously refer to team members and baton to the tasks they do. In other words, if the team is supposed to develop user stories, let's see how the stories have progressed, how we plan to advance them today, and if there is something that prevents us from developing them.

The idea resonated a lot to me and I have tried it at least with three different teams, one of them being my current team. The problem is that it never felt natural for the team members in any of those teams. It was quite hard for people to follow what task we were talking about right now and what next. To make this work in practice, there had to be someone who facilitates the meeting. But if you need someone to do that for this simple 15 minutes standup, there must be again something wrong with the method.

What eventually happened in the teams was that we returned back to the basic individual-focused method. I just had to accept that because I didn't have anything better to offer. However, I still felt that there must be something better, I just didn't know what that was.


Making our goals explicit


A couple of months ago I was thinking that it would help our team if we wrote our goals to our board. There were two reasons for this. First of all, when you write something down, you are making implicit explicit. It wasn't always so obvious for us what the team's goals actually were, so this forced us and especially our Product Owner to think about them. Second, when everybody sees the goals all the time, they become stronger. It's much easier to try to reach the goals when they are just in front of your eyes all the time.


Goal-based daily standups


When the goals had been in the board for a couple of days, I finally got it. Even though we hadn't yet even tried, I was convinced that this was the missing thing to make really good daily standups. So I asked our team that could we run the standups so that we just forget the individuals and focus on goals. The basic idea was that we go the goals through one by one and whoever has anything to say to the goal we are talking about can say whatever she wants to say. After all goals had been walked through, people could bring up all the other relevant things that hadn't been mentioned yet.

At this point it may be relevant to notice that we are typically having 4-5 goals at the same time. In the most optimum situation there would be only one goal at a time, and our team would try to get there as fast as possible. However, our work is such that for example the first goal is to help some other teams to reach their own goals. In practice this means that whenever they have new needs that we can fulfil, we do that with the highest priority. Otherwise that goal just hangs out there and we can skip it in the standup. There can be also upcoming goals typically in the position #4 or #5 to tell us what will come next. Even though there may not be programming tasks going on related to these goals, there may be e.g. planning happening and someone in the team can share with others how it is progressing.


Our current goals. #1 is about helping the other teams. #2 and #4 are active in some level. #3 and #5 are new goals that were added today and will become more active when e.g. #2 gets done.

The new setup has worked really well for us. We use the most of the 15 minutes for the things that matter most for us. There is always something else but that stays on minority. I could say that typically it takes about 10 minutes to check the status of the goals and 2-5 minutes for the other things.

You could say that the things we talk about on goal-based standups are mostly the same that we would talk on individual-based standups. However, I find that there is a very important difference on the perspective. It really doesn't matter what you did yesterday or what you are going to do today. What truly matters is what we together have done for the goals and what we together are going to do them today.


Revealing problem with our focus


Some time ago the goal-based daily standups revealed a problem we had. I realised that even though we talked about only 5 minutes about the goals, our standups could easily take 20-25 minutes. This meant that most of our focus was in the work that wasn't actually our highest priority. (And besides that, we weren't very efficient when talking about it.) In other words, our goals were listed but the tasks we were working with were mostly related to something else. After realising this we had a good discussion with the team and we were able to solve the problem. Since then the situation has been much better.

In order to emphasise this we have a small sticker next to each goal (see the photo above). Each task then has the same sticker on the whiteboard. This helps us to see that the majority of the tasks either in progress or coming next are related to the goals.


Summary


Very typically agile teams benefit from having a short standup meeting every day. However, the traditional daily scrum format is very individual-focused and can easily forget the team and goal aspects. Instead of that, write your current goals down and put them visible for everyone (e.g. on whiteboard). Then on daily standups do not go through each team member but go through each goal.



(*) I was not able to find the original blog post anymore but the content of this one looks very similar to me, even though this one is dated to 2016: http://martinfowler.com/articles/itsNotJustStandingUp.html