Sometimes automation is a questionable investment, but with many tasks, there’s a 100% chance that you’ll need it in an ongoing manner where automation pays dividends. While automation and self-service, in general, can help save time or prevent interruptions, the benefits of automation go far beyond that.

A 10-minute interruption never takes just 10 minutes. It takes 10 minutes plus the 15 minutes to rebuild context and resume the programming task you were working on beforehand. So now, if you perform that task once per week, and it takes 25 minutes. Then two hours of up-front effort to automate that task pays for itself in about a month. There’s no perfect answer for when to make the time or how much time to spend on it, but if we think about these tasks as interruptions and distractions, it becomes much more value to try to prevent them in the first place.

Automation does more than save time

At the simplest level, automation saves time. But automation can also play a key role in focus. If a task is particularly tedious, humans get bored, and the opportunity for distractions increases. Computers, on the other hand, just keep chugging.

Similarly, if a task is particularly time-consuming and needs to be performed on a regular basis, when you automate it, you never have to switch gears to go do it, or, if you do have to switch, you can run it in seconds instead of minutes and minimize the interruption to your other work.

Automation isn’t purely about saving time, though. That’s the vector that’s easiest to estimate or measure, but automation also helps prevent errors, provides faster results, and make it easier to hand off tasks to others because the automation is its own form of documentation and requires less training.

There are obvious areas for automation like release management, testing, reporting, and other regular but significant tasks. However, there are some great opportunities to automate smaller tasks as well. The key is to be on the lookout for the types of tasks that interrupt or distract but also lend themselves to automation.

Distraction-prone tasks are some of the best to automate. These are the types of work that are inherently distracting. For example, composing an email can be distracting because you end up opening your email inbox, and the pull of unread messages can tug at your attention. So automating a way to quickly fire off an email without seeing your inbox can help mitigate potential distraction.

Tasks that are tedious in nature are distraction-prone because it’s easy to become bored and self-distract while performing them. Their tedious and repetitive nature often makes them a natural fit for automation as well. If you find that you’re performing a repetitive task and your mind wanders, set aside some time to see if you could automate it. The other upside of this kind of automation is that even though the task itself is tedious, the process of automating it is often more challenging and engaging.

Adding tasks to your to-do list faces a similar challenge as email. While your to-do list may be important, it’s difficult to focus on one task when dozens of others may be begging for attention. Similarly, processing and organizing a task is a much higher cognitive load than simply recording it. So if you get a fleeting thought that needs to be added to your to-do list, you want to be able to capture it quickly without losing your train of thought on your current task. You can always process it later, but you should be able to record that thought with little more than a few keystrokes, and certainly without opening your to-do application.

These may seem like minor or trivial improvements, but the time saved isn’t what’s important here. It’s all about distraction avoidance. By streamlining these kinds of tasks, you enable yourself to more easily maintain focus and avoid self-distraction.

Automation can reduce mistakes and speed recovery from mistakes

Automating exception handling is another area that’s exclusive to software development. Software invariably encounters problems when real people use it. Often those errors need to be fixed, but at a minimum, they need to be acknowledged. Automating the work around those errors so that you can more quickly investigate and resolve works wonders. And since there’s a 100% chance your software will have errors and exceptions, speeding up the process by which you’re notified and able to respond is a good investment.

So when you add exception handling to your software, pay close attention to ways that you can streamline the notification process and more quickly troubleshoot to determine the severity, and, ideally, a solution. When you know there are tasks that you’ll face regularly, it’s not premature optimization. You’re just helping future you get to the bottom of things more efficiently and mitigating the degree to which these kinds of inevitable interruptions distract you from your primary work.

Release management is another area where software developers frequently under-invest. It’s a task that’s both difficult to perfect and performed just infrequently enough that we don’t feel enough direct pain to commit significant time to it. However, as far as creating software goes, it’s absolutely critical for mitigating distractions. Like most forms of automation, it carries several benefits. First, it decreases errors in the long-run by handing off error-prone manual labor to a machine. Second, it takes a tedious manual task and streamlines it so that it’s faster. Third, it enables you to more quickly correct mistakes and troubleshoot problems. Finally, it dramatically enables you to improve your release process with minimal burden.

Automated testing will save you

Let’s talk about automated testing—one of the best automation investments a developer can make. Automated tests are faster and more accurate than you can ever hope to be. Automated tests can’t completely replace the need for manual testing, but they can reduce it to the bare minimum. You get more tests run with more accuracy, less effort, and less time.

One significant difference between automated tests and manual testing is that you write automated tests at the same time that you’re working on the code. This helps to ensure you have all of the information you need without having to dig in and troubleshoot later after you’ve forgotten the details. In many cases, automated tests can help ensure you write the correct code in the first place by uncovering bugs before you even commit your code. Fixing bugs while you’re working on a specific section of code is always more efficient than having to rebuild context to fix the bug days or weeks later.

Another benefit of automated tests is that they run in the background and don’t require that you remember to set aside time to run them regularly. They just happen and help everyone on the team stay on the same page by reducing miscommunication mistakes or exposing them faster when they happen.

On that note, automated tests also help serve as a form of documentation for developers. Since tests implicitly document what the expected behavior is, another developer can refer to the tests to see what should be happening and have a little more context about how they should handle different situations.

Another significant benefit of automated testing over manual testing is that when an automated test fails, the test provides immediate context and insight about what’s going on. This can help narrow your search for the bug or, if multiple tests fail, help you quickly assess the overall scope and reach of the bug.

Assuming that you’re running your automated testing in a continuous integration or continuous deployment situation, you’ll invariably avoid releasing broken builds. That saves you time reducing the need for rollbacks as well as less time putting out fires and recovering from a significant bug.

Your next steps

  1. Invest in an automated testing system for your application.
  2. Invest in increased automation for release management.
  3. Look for small wins in automation that help you avoid distraction.
  4. Create and memorize a convenient shortcut to send an email without opening your inbox.
  5. Set up a system for quickly and efficiently capturing stray thoughts without breaking stride on your current tasks.