Yotpo Engineering
Published in

Yotpo Engineering

Working in small batches is the one single thing you should care about.

When I was asked in a management meeting, what are the most important aspects to look at when aiming to optimize our developers’ delivery and velocity, my immediate response was — working in small batches, and the rest will come.

I care deeply about software craftsmanship. I have read a lot of books, articles and listened to podcasts regarding software-related ideas, and tried some of those ideas in my work and processes at Yotpo. I have found that many of them have roots in a very simple idea: working in small batches.

What do I mean when I say “batch”? For a developer, that means how much code you write before pushing your changes to production. Working in small batches means publishing your changes when they are small. How small? The smaller — the better.

In this post, we will review the benefits of working in small batches, and how it is manifested in the latest trends. I will also share with you ideas on how to incorporate it into your daily work.

What’s in it for your team?

Let’s imagine that after reading this post you were so excited that you were able to convince your team to change your flows and processes to support working in small batches.

Following this shift, let’s look at what you have probably achieved:

  • CI/CD — it does not make sense to manually test every little change over and over again, right? Now that you are working in small batches, you’ve had to let go of the slow bottlenecked QA process. Instead, you invested in a well-covered test suite. These tests are running on each commit, allowing fast feedback. After the tests have passed, the changes are automatically deployed. CI/CD has proven to be predictive of success in the software delivery process. You can read all about it in the great State Of DevOps Report 2017
  • Lead Time — this metric is about how fast you go from idea to code in production. Your pipeline includes pushing code, running tests, code review and deploying. If you were waiting hours or days for your code to go to production — you wouldn’t be able to work in small batches. So if you are able, that means your pipeline is taking much less time, and your customers will appreciate it! This was all covered by Code Climate’s superb research
  • Observability — your changes are flowing into production rapidly, and you want to quickly identify if something bad has happened. You aim to find it out before your customers do, so you can revert ASAP if it has. As a consequence, you invest in making your system observable, you enhance your monitoring, alerts and crisis protocols

Manifestation In Latest Trends

Small batches are an important part of many of the latest software trends, some of them you probably already practice these days.

(I would argue that working in small batches is the common thread, the one-trick pony, that was optimized and wrapped in those successful ideas.)

  • Agile — well, this is an easy one. In contrast to the Waterfall approach, in Agile we split into small teams owning small pieces of software, working in small-sized sprints and on small-sized tasks
  • Lean Startup — lean development strives to get feedback as soon as possible, and act upon it. This idea was inspired by the Toyota lean workflow, which in turn was inspired by Kaizen. Eric Ries, the author of The Lean Startup, says it best in his 2009 blog post: Work in small batches
  • DevOps — when Agile and Lean methodologies met the Cloud, the DevOps movement was created. It is meant to shorten the development life cycle and encourages every developer to work in small batches
  • Liquid Software — presumably the next phase of methodologies, the JFROG liquid software concept is all about continuously updating our software. Small pieces of code flowing from the developer’s computer straight to the customer. Exciting!

Ways to improve

So how do you get better at working in small batches? Here are some ideas that might help:

  • It is a skill — practice makes perfect. Start thinking in small steps and treat it as a challenge. The more you practice it — the easier it becomes and you will see its benefits more clearly
  • You can start now! You do not need to wait for your CI/CD to be in place, nor for your organization’s microservices revolution to happen. You can start shaping your mind to think in small incremental steps just by trying it
  • Start the day thinking “What code will I push to production today?”. Ask yourself “What is the single smallest step I can take to make this code better?” or “What part of this feature can I already release today?”
  • Practice Kent Beck’s radical idea of TCR — test && commit || revert. In this technique, you would have a background process that tests your code. If the tests pass, it commits the code, and if not it deletes your code. Ouch! It will force you to think in very small steps, because if not, your work will be thrown away

Wrapping Up

In conclusion, working in small batches is a powerful idea that is worth absorbing. It is present in the core of the most influential methodologies — mastering it will get you far.

I encourage you to try out the links spread around this article, and you can check out some more:

DevOps process: Working in small batches

Best Software Development Practices — Kaizen is the name of the game



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store