Leading Lean Software Development: book review

It’s a long time that I don’t share thoughts regarding a book that I’ve read, but this time it’s totally worth the effort to write down this blog post.
I used to read between 15 to 20 books per year during my commuting time and I really enjoy the different points of views of the authors and it’s fascinating how the same topic can be treated in so many ways.

Leading Lean Software Development

The book that caught my attention is called Leading Lean Software Development from Addison Wesley.
I read many books on Lean and Agile topics but this one, I’ve to say, it’s one of the best for people like me that works in software development with these methodologies.
I strongly believe that there isn’t a framework that could rule them all, so I love learn and try different approaches like Scrum, Kanban, Kaizen, Grows and many others outside there and catch the essence in order to use the best technique when I need it.

This book does exactly that, it’s not only emphasising the importance of Lean methodologies but it’s mixing Lean methodologies with software engineering practices and give many example how these techniques helped to succeed not only in the software industry but also in the “real world”.

The most stunning example is regarding how the Empire State Building was created in less than a year and how it’s possible to have the same efficiency in the software development!

There so many take aways inside Leading Lean Software Development book that it’s hard to share all of them, but I think it’s a great collection of my believes in the Lean and software development world.
For the first time I could say that I’m represented by a book!
It’s a MUST read book in my opinion and the most interesting part is that there is another book written by the same authors way more practical that I can’t wait to read: Implementing Lean Software Development.

I hope you’ll find the time to read them and if you want to share other books with great value just leave a comment

Advertisements

The power of feedback loops

Working in software development requires that we find the right techniques to achieve quality and customer satisfaction. Learning about development and flow techniques from experienced peers can be helpful. But if the team has a lack of senior peers or insufficient commitment, we may have to find alternative routes.

While studying how to improve my methods, I watched an interesting video wherein Noel Ford explained how useful feedback loops are in software development. Working from that premise, I started collecting and applying the best practices that could most help developers deliver software that meets customer expectations while also improving code quality.

First of all, let’s define a feedback loop. According to Wikipedia, “Feedback occurs when outputs of a system are ‘fed back’ as inputs as part of a chain of cause and effect that forms a circuit or loop.”

Any Agile or Lean framework incorporates this concept, but I think the closest implementation of feedback loop is defined inside kaizen with the PDCA cycle.

PDCA cycle

PDCA stands for “plan-do-check-act” and in kaizen is a technique used for continuous improvement of a company’s standards. The team tries first to analyze a problem, retrieve the metrics in the current situation, define a strategy for improvement toward achieving the intended result, and finally retrieve the metrics of the process to assess whether improvement really occurred so the team can adapt strategy to obtain better results and create a new standard.

This is a continuous process that should be carried out several times to aim for the best possible results.

Source: http://upload.wikimedia.org/wikipedia/commons/a/a8/PDCA_Process.png

Feedback loops in software development

As software creation follows an empirical process, we need to create several interim checkpoints to determine whether what we’re producing is really what our customers are looking for. Often during development we don’t realize how much time (and money) we waste simply because we don’t gather good specifications or show the progress of our work to the customer. Just because the waste is to a certain degree hidden doesn’t mean it is without cost; we often invest more time and expense than we realize, yet with a few shrewd tactics could actually prevent such loss and achieve what our customers really expect.

We can add several types of feedback loops during development to help accomplish that. The key rule of any feedback loop technique is “shorten, and often”!

Let’s go through the different types of feedback loops we can apply:

TDD/BDD/Unit Test

Test-driven development, behavior-driven development, or simple unit testing is the first feedback loop that should be established on any project.

It’s helpful for the healthiness of your project not only because helps you to better define the requirements, design better APIs, and obviously check the sanity of what you’ve written or refactored but also because testing gives you feedback on your work in seconds, and you can have this feedback every time you save a code file or when you push the code in your version control system.

Static analysis

Often we avoid proper static analysis in the belief that we lack the time to define what we need to analyze, but it doesn’t really take a huge effort to establish a good strategy, and the potential benefits are important.

Static analysis can help you immediately recognize areas in your software that could be simplified or improved without deep-diving inside the code. It supplies a powerful feedback loop that in seconds or minutes can provide metrics to analyze during the whole development life cycle.

One of my favorite metrics techniques is cyclomatic complexity. Applying this metric during the whole life of your software will help you understand the healthiness of your project and what areas need attention.

Code coverage is another useful metric, as it can suggest the extent to which your system is covered by tests. Unfortunately, though, it doesn’t give you feedback on the test quality.

Pair programming

Introduced by XP, pair programming is a powerful loop technique that provides peer feedback in seconds while letting you consolidate your knowledge and explain problems or solutions to someone else. Developers often skip this option when the business department deems it too expensive to have two people working on the same piece of code, but research demonstrates it’s not as costly as one might think. In fact, several studies show that while pair programming lowers developer productivity by a mere 10 to 15 percent, it increases the robustness of your software, consolidates and improves the skills of developers, and, most important, helps detect bugs and architecture mistakes more than any other technique. If executed in the right way, it can be a great investment for both your company and your software.

Code review

Code review definitely improves project quality and normally should be performed every time a developer in the team makes a pull request directly inside the version control system. Unfortunately, they are often skipped or, worse, ignored because we trust our peers too much or don’t have time. But if applied properly this technique can improve the code quality and architecture of your software to an amazing degree.

Usually it takes days, not seconds or minutes, so bear in mind that with this technique your developers don’t have the kind of frequent feedback afforded by the previously described techniques.

Agile Modeling

Several books describe and discuss this topic; I suggest scheduling one or more sessions at the beginning of any project to architect enough of your software that you can start development and review the design and implementations iteration by iteration (possibly with every sprint). You’ll see a constant improvement in your code without a huge up-front effort, meaning less need to accommodate changes for future business requests and more likelihood that your architecture and design decisions will faithfully reflect the project specifications. Usually these feedback loops are the only ones that maintain overall code structure and architecture sanity as viewed with an “eagle eye.”

Daily stand-up

This ceremony, used not only by Scrum teams but in many Kanban implementations, primarily provides an opportunity to synchronize team member efforts as well as a starting point for discussing potential improvements. As the name suggests, it’s a daily activity whose value hinges on not only on the technical aspects but also team communication and the big picture behind the project. These aspects are fundamental, because often developers are so focused on details they miss the perspective that could keep them from spending unnecessary work or time on secondary features (remember the Pareto principle).

Retrospective

An Agile retrospective, if well organized, is the most effective ceremony inside the Scrum framework to produce feedback that really helps improve projects and promote healthy teams. I facilitated several retrospectives and I’ve always gained a lot from them; if you can create a good atmosphere, defining properly what you want to achieve, you may reap surprisingly good results. For this purpose the retrospective is organized at the end of each iteration (usually every two weeks), but I really suggest more often if the team is recently defined or has more than one new member, to help newcomers feel part of the team and acquire its mind-set and to permit review of the resulting team performance as a whole.

Conclusion

Feedback loops help on a daily basis with project improvement and delivery success; more feedback loops mean greater control of software quality and better customer satisfaction, exactly the goals you are trying to achieve every day. Don’t be afraid to try new techniques to improve your team and your company. Fail fast, retrieve metrics, and learn from them; the worst that can happen is that you really improve!

Git Flow vs Github Flow

Recently I’ve spent time to study a good way to manage a software projects with GIT.
I really read a lots of blog post to check different points of view and to find out which is the best technique to use in different situations.

The principals ways to manage a software in GIT are: the Git Flow and the Github Flow.
These 2 methods can really help you to manage your project and optimise your workflow in the team.
Let’s see the differences between them.

Git Flow

git flow
git flow

Git flow works with different branches to manage easily each phase of the software development, it’s suggested to be used when your software has the concept of “release” because, as you can see in the scheme above, it’s not the best decision when you work in Continuous Delivery or Continuos Deployment environment where this concept is missing.
Another good point of this flow is that fits perfectly when you work in team and one or more developers have to collaborate to the same feature.
But let’s take a look closer to this model.

The main branches in this flow are:

  • master
  • develop
  • features
  • hotfix
  • release

When you clone a GIT repository in your local folder you have immediately to create a branch from the master called develop, this branch will be the main branch for the development and where all the developers in a team will work to implement new features or bug fixing before the release.
Every time a developer needs to add a new feature he will create a new branch from develop that allow him to work properly in that feature without compromise the code for the other people in the team in the develop branch.
When the feature will be ready and tested it could be rebased inside the develop branch, our goal is to have always a stable version of develop branch because we merge the code only when the new feature is completed and it’s working.
When all the features related to a new release are implemented in the develop branch it’s time to branch the code to the release branch where there you’ll start to test properly before the final deployment.
When you branch your code from develop to release you should avoid to add new features but you should only fix bugs inside the release branch code until to you create a stable release branch.
At the end, when you are ready to push live deploy live your project, you will tag the version inside the master branch so there you can have all the different versions that you release week by week.
Apparently it could seem to much steps but it’s for sure quite safe and helps you to avoid mistakes or problem when you release, obviously to accomplish all this tasks you can find online a lots of scripts that could help you to work with Git flow in the command line or if you prefer you can use visual tools like SourceTree by Atlassian that make the dirty work for you, so you have to follow only the instructions inside the software to manage all the branches, for this reason I’ve also prepared a short video to see how use this flow with SourceTree

You can go more in deep about this flow reading these 2 interesting articles: nvie blog or datasift documentation.

Github Flow

Screen Shot 2014-03-08 at 23.07.36

So now, do you think that Github is working with Git Flow? Of course no! (Honestly I was really surprised when I read that!)
In fact they are working with a continuos deployment environment where there isn’t the concept of “release” because every time they finish to prepare a new feature they push live immediately (after the whole automation chain created in the environment).
The main concepts behind the Github flow are:

  • Anything in the master branch is deployable
  • To work on something new, create a descriptively named branch off of master (ie:new-oauth2-scopes)
  • Commit to that branch locally and regularly push your work to the same named branch on the server
  • When you need feedback or help, or you think the branch is ready for merging, open a pull request
  • After someone else has reviewed and signed off on the feature, you can merge it into master
  • Once it is merged and pushed to ‘master’, you can and should deploy immediately

I found an amazing interactive page where you can deepen the knowledge of this method, but I see it’s very common when you work in QA teams, small teams or you are working as freelance because it’s true that is a lightweight flow to manage a project but it’s also quite clear and secure when you want to merge your code in the master branch.
Another good resource about Github Flow is the blog post made by the Github evangelist Scott Chacon.
I recorded also a video on how to use Github flow with SourceTree:

If you have any other method to manage your project in GIT feel free to share because I’m quite interesting to see how you usually work with GIT and if there are better ways to work with and if you have any other feedback or question I’m here for you!

Product Owner, Scrum Master and Team: this is Scrum!

As you read in my previous post “Approaching Scrum”, in the short description of this Agile technique, I talked about  3 main roles that composed the Scrum team.

The main 3 roles are:

  • Product Owner
  • Scrum Master
  • Development Team

There are also other people that partecipate in a Scrum team and I’ll talk about them in a bit.
I’d like to share a brief introduction to each role before talk, in another post, about the Scrum process in details.

Where is the project manager ?

That’s a good question, as you can see above in the list of the main roles, the project manager role is not mentioned.
Basically what the project manager represents in the traditional software development where basically manage the communication between clients and the company, manage the team’s tasks and so on, in Scrum we are dividing those functions trough the members of the Scrum team (product owner, scrum master and development team) giving more responsibilities to them.
This thing will have a positive impact with the whole team that is more involved in each part of the project (planning, decision and development) and they can drive the risk using Scrum to achieve the best business value so the best result for their customers.
Another important aspect to take in consideration, when you are working with Scrum, is that we don’t have the concept of “project” anymore, but we’ll work on features and improvements with a continuos delivery instead of a “big bang delivery” at the end of the project.
This will ensure that we’ll focus more in the business value instead of waste time in something that is not important for that project and that couldn’t have the right value for our stakeholders.
For my perspective a natural evolution for a project manager could be the product owner, or if he has got a technical background could be Scrum Master; for sure the most important thing is that he has to change the way to approach any development and he has to think in a collaborative instead of a hierarchical way.

Product Owner

This role is very important inside a Scrum team, in fact the product owner is the “voice” of stakeholders and customers or users.
He is also the person that has the product vision, that is in charge to take the right business decisions during the development of a new or existing product and he has to help the team, if it’s possible everyday, answering on questions related to the product.
He is in charge to create and maintain the Product Backlog and to share the product vision with the whole Scrum team.
The most important thing is that the Product Owner is always available for the team because he is part of the team and his role is essential to accomplish all the business aims of a project.
In fact he is in charge to order the activities to do in the Product Backlog and to update them (this process is called grooming) following the customer’s perspective.
Usually the Product Owner is someone that have familiarity to talk with customers or internal management as well and he is quite technical to talk with the Development Team.

Scrum Master

The perfect definition of a Scrum Master is: “Mr. Wolf” !
The Scrum Master is the person that try to facilitate the use of  Scrum inside the team, he has to remove impediments to the Scrum team, facilitate Scrum introduction in a new team,  avoid any external distraction to the Development team and so on.
The key concept for any person that is approaching this role is that you are not a chief of someboy, you are coaching Scrum to people not imposing something to them!
In fact another good definition of Scrum Master is the servant leader.
Usually the Scrum Master is a Lead Developer or a QA person anyway it should be someone that has got enough technical knowledge to understand and solve the problem of the Team and to discuss with the Product Owner and guide him to create good artifacts for the Scrum team.
This activity required more or less the 50% of the time for a person so usually the Scrum Master is often member of the Development Team as well.

Development Team

When Scrum talks about Development Team it doesn’t mean only developers but a group of people that work actively to the product.
So inside the development team we can find: analysts, designers, testers, UX team, developers and so on.
In Scrum the team has cross-functional skills that allow them to deliver feature every Sprint.
Another important thing is that the team is self organised so nobody (nor the Scrum Master neither the Product Owner) can add activities to their daily job or impose the timeframe to finish a task.
At the beginning it could be so strange but in this case people in a team assume more responsibility and the project will be done in the best way ever.
In the old way to manage a team where the project manager imposed his role to have the feature that he wants when he wants, the team was only executive people without any relation with the project and often without any reward if the project will be well done.
In Scrum the team is in charge to estimate the project, to choose the task to accomplish during a Sprint deciding them with the Product Owner and, last but not least the team has to develop more features as possible with an high quality of code (tested, documented and so on).
We’ll talk more in deep about estimates and about the “definition of done” in next posts for now what you need to know is that the team is not passive anymore but they play an active and important role to achieve the goals of each product.

Other actors

In Scrum the main roles are what you have read above but there are many other people that partecipate to the good delivery of a product, in particular when you start to scalate Scrum to many teams.
In fact Scrum is a framework to manage 1 or 2 teams but not more, there are many other Agile frameworks that help you in this activity like SAFe (Scaled Agile Framework).
Other people that partecipate to the delivery of a project are for sure the stakeholders.
Stakeholders can be internal or external, when we refer to internal stakeholders we have to think to our management that share with the team their needs and how their point of view to improve or change the product developed by the team.
The external stakeholders are our customers or users, yes you read well, our customers or users are very important in the Scrum process because they are the ones that decide if the project is going in the right direction or is failing.
Personally I think is the biggest challenge involve our customers inside the Scrum process but for sure it will be very useful for the team and the product because they can constantly give us feedback on the right direction to take with the product.

Approaching Scrum

Have you ever felt disappointed because you don’t finish a project in time?
When you try to estimate a project you feel like a poker player?
Have you ever wrote bad code because you were overtime and you needed to delivery as fast as possible?

If you think that there isn’t a way to escape from this nightmare you are completely wrong and I understood it in the las few months as well!
I don’t want to say that with Agile you can solve everything, but what I can say that for sure it can help you to achieve your goals and deliver in time with the best quality and value for your customers or users.

Let’s start from the beginning…

What is Scrum?

Scrum is an iterative and incremental Agile software development framework for managing software projects and product or application development. Its focus is on “a flexible, holistic product development strategy where a development team works as a unit to reach a common goal” as opposed to a “traditional, sequential approach”. Scrum enables the creation of self-organizing teams by encouraging co-location of all team members, and verbal communication among all team members and disciplines in the project.

A key principle of Scrum is its recognition that during a project the customers can change their minds about what they want and need (often called requirements churn), and that unpredicted challenges cannot be easily addressed in a traditional predictive or planned manner. As such, Scrum adopts an empirical approach—accepting that the problem cannot be fully understood or defined, focusing instead on maximizing the team’s ability to deliver quickly and respond to emerging requirements.

From Wikipedia.org

When you start to read about Scrum a lot of things seem impossible to apply in your daily job but I think that, like any transition period, you can arrive to work completely in Scrum in less than 6 months if you really want change your organization and improve it.
From my experience Scrum is a good framework that should be used extensively if you are working in products that will be delivered to the final user, otherwise you have to train up your customer to be Agile; but in the real world it could be more difficult.
Mainly because you need to have a good trustability before start to involve them in an Agile process and sometimes there isn’t enough time to do so.

Why have I to use Scrum?

That’s a good question, it was the same that I asked me few months ago and finally I’ve an answer, if you are a developer think when you started to write the first lines of code, obviously day by day you increase your knowledge and your code became even better until to the procedural code it wasn’t enough and you try to look to something more.
Then you have discovered OOP concepts and maybe design patterns, after few times you started to work with MVC, MVP, MVVM or your favourite architecture and probably after many years if you look back you won’t write procedural code anymore.
Does it sound familiar?
In the same way of Design Patterns and a micro-architecture that drive you to create solid and maintainable project, Scrum can help you to organise your projects creating a great business value, knowing every time the next steps and the actual status of the project, estimating better the goals and the time to achieve them and last but not least to drive the risk in a better way than the “traditional” methodology (waterfall model for instance).

How does Scrum works?

Scrum diagram
Scrum

As you can see from the diagram above, Scrum is an iterative workflow that happens in a small amount of time (usually 2 weeks or 4 weeks at least) where with few documents and a lot of communication you can achieve the best trade off between the business value for your final customer and the best quality of your software.
Scrum is composed by some actors (Product Owner, Scrum Master, Development team and Stakeholders), some meetings (Release Planning, Backlog Refinement, Daily Scrum, Sprint Planning, Sprint Review, Sprint Retrospective) and few artifacts (Product Backlog, Sprint Backlog, Burndown chart, Product Increment).
The most important concept that you have to keep in mind is that Scrum is easy to use and to understand but if you want to have its benefits you have to follow its rules.
To enter in this interesting world you have to keep in mind the 3 main concepts of an empirical process like Scrum:

  • Transparency
  • Inspection
  • Adaptation

Without this 3 fundamentals principles, Scrum it’s not useful at all!
Transparency means that you and your team don’t have to hide anything to anybody, if there are any impediments or problems or bottleneck following Scrum you can find and resolve them.
Inspection means that you and your team have to analyse what you have done after a small amount of time (Sprint Retrospective) and find what positive or negative was happened during that period.
Adaptation means that everything is not binary (0 or 1, true or false) but you have to adapt your way to work day by day improving yourself inspecting what you have done and being agile!

If you want Scrum is not only a good approach to work, it could be a good approach for life as well!
(Check also this useful article on Scrum Alliance website that explains Scrum in 30 secs)

Ok, now I’m really interested in Scrum, where to begin?

There are many books that allow you to enter in this amazing world, the first one that I can suggest you is Essential Scrum: a practical guide to the most popular Agile process

Essential Scrum
Essential Scrum

In this book you can really understand how the Scrum framework works and how to use it in your daily job.
I also suggest it if you are planning to join in a Scrum training course, it can really help you to have a good preparation for the course and for the following certification exam.

Next steps

What I’d like to share with you is my notes about Scrum studied on books, read on blog or social networks and share with my fellows, my idea is to fix few concepts on this blog that could be helpful also for people that is approaching Scrum right now or they would like to know more about it.
There are really tons of things to know and you’ll never finish to learn (as usual) so I think a blog it could be a good resource to share the basic of Scrum and in the future, going more in deep with real case studies related to my daily job.
I hope you will enjoy this information that are not what you usually find in my blog but maybe could be interesting as well, as usual any suggestion will be very appreciated so don’t be shy and share your thoughts!