Simplify the Work as Much as Possible Before You Automate It

Before we dive into making the work as simple as possible, we should have decided on the one way we want to do the work. Make sure that everyone is on the same page, otherwise you will need to repeat the simplification step for every variation of the not yet standardised approach!

In our process of Standardisation, Simplification and Automation we are in the phase of Simplification

 

Prepare for resistance

Making things simpler is an honourable goal and everyone you talk about it will agree with you. They are eager that you move ahead and that there is finally someone who removes the clutter. Enjoy the moment, then it will not last.

As long as you speak in general terms, everyone is on your side. But as soon as you start pointing to something specific that you want to make simpler, the tone changes. You will get a lot of reasons and many more excuses not to improve that specific part. While you can make everything simpler, that particular step is a must-have and cannot be removed or modified. But keep up the good work and try somewhere else.

Unfortunately, that story repeats itself throughout the whole process and now everything is important. But at the same time, everyone still agrees that it is too complex and needs decluttering. Welcome to the Catch-22 of process optimisation.

 

Declutter your process none the less

With no clearance to declutter a process, you still can get to work. Look at each step of the process and look at the reason it is there. Check if any of the following steps use the output and if not, make a note. It looks like a step we can remove, but someone outside of the process may need it. The reason we got why we cannot remove that step is now our guide to check outside of the process for someone who cares about the output. The more we know about the artifacts we create at a process step, the better is our position when we explain why that step is no longer needed.

Should that not work, there is always the financial side to help us decide. With the gained knowledge about the work that happens inside this process step, we can assign a price tag for the automation. When we go through the process and find the price tag for each step, we can sum them up and talk once more about the necessity of those steps. The higher the price, the sooner people tend to reevaluate the value each step provides.

When we overcome this resistance, the simplification of a process will gain speed in no time. Just make sure that you do not throw too much out. If the process needs to prevail, then at least a few steps should survive those cuts as well. Otherwise, there will be no process left to automate – what may not be a bad thing at all.

 

Make code simpler with the right abstractions

When it comes to the automated code generation, we can gain the most when we find the right abstractions. The most challenging part of that is to have patience to search for the right abstraction and not to run with the first one you find. The first abstraction that pops up is usually only useful for a handful of cases and not all cases we need to cover. You can make it work somehow, but you may lose out on much of the benefits you could gain.

Abstractions are everywhere, even in such banalities like a form. In ASP.NET there is the concept of display- and editor-templates that is commonly used to get the right input field for a property of the view model. Instead of us writing what data we expect, the ASP.NET framework figures it out and gives us a date picker for dates and a text input box for strings.

This is an abstraction many developers know. However, there is much more going on in a form than the labels and the input fields. We need validation, we need a translation of the labels, we need error messages if the entered data is wrong and a lot more. Usually, all that extra work goes next to the call to @Html.EditorFor and is repeated everywhere in the application.

A much better abstraction for forms would be if the editor template covers the whole line, including the label, the input field, the validation, and the translation of everything related to that field.

If we can write a field with a single line of code, we no longer need to copy and paste code around. Not only do we get a less error prone application, but we also get a more consistent user interface. Should the design need to change, we can fix the editor templates once and all the places that use it get an update instantly – no need to go and fix every field on every form.

The editor template is in ASP.NET for ages and everyone uses it in one form or another. But to move from the template for the input field to a template that covers the whole field with all its properties is a jump that few developers figure out. Yet it is precisely here that we find a great lever to simplify our application.

 

What if it is now so simple that we no longer need to automate it?

Congratulations, you reached your goal, and you can stop here.

What was the reason to automate the process or the code in the first place? Was it to make work simpler, to reduce the workload of the specialists or to get more work done? If we can reach all those goals without automation, then we do not need to automate it. If things change in the future, you can come back, recheck that we still need all the steps and then automate it.

 

Next

Making the work as simple as possible can result in reaching the goals of the automation project without doing the automation itself. A more common outcome is that we now have a single, optimised way to do things. Next week we explore the obstacles that await us in the automation itself.

2 thoughts on “Simplify the Work as Much as Possible Before You Automate It”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.