Here's one big pitfall when automating
3 min read

Here's one big pitfall when automating

The reality is that reality is messy. Often times there are edge cases, exceptions to the rule, and assumptions that will break your code. In fact, before you've really manually experienced the pain of the majority of the edge cases, you don't really understand the domain of the problem.
Here's one big pitfall when automating

Running a business has many moving parts. The more you can automate, the more it frees you up to address high level strategic challenges of your business. This is a newsletter about automating aspects of your business.

Anyone who tells you all the pros of doing something and none of the cons is definitely on a hype train. Nothing wrong with being on a hype train if you want to get somewhere. But you want to make sure you don't run off a cliff with enthusiasm. It's the same with automation–it's not all rainbows and butterflies. Here's one big pitfall when people try to automate.

I've talked about the one place you shouldn't automate, and that's with inbound customer touch points. Where and when else should you consider not automating?

Randall Munroe of Xkcd has already jumped ahead of me here:

Automation
https://xkcd.com/1319/

The reality is that reality is messy. Often times there are edge cases, exceptions to the rule, and assumptions that will break your code. In fact, before you've really manually experienced the pain of the majority of the edge cases, you don't really understand the domain of the problem.

Not really understanding the problem is the source of most time and cost overruns in programming. Automation is no exception. If you try to write code to automate right off the bat, it's likely that you'll spend time writing, and rewriting the automation code.

For example, take something like parsing a full name into first, middle, and last names. Seems pretty straightforward, no? Just split a string by its spaces, and take the first word to be the first name, the last word to be the last name, and everything inbetween as a middle name.

name_arr = full_name.split(/\s+/)
first = name_arr[0]
middle = name_arr[0..-1].join(" ")
last = name_arr[-1]

Well, people have a knack for complicating things. While this would handle multiple middle names, there are people whose last names have two or more words, like "De Anza" or "De la Cruz". Some people have double-barrel names, like "Gell-Mann" or "Graham-Cumming" and when two double-barrel people get married, sometimes you get "Simone Greiner-Petter-Memm". Sometimes, people have two word first names, like "Anna Grace" and "Sarah Michelle". Other people's names include a suffix, like Jr. or IV (as in "the Fourth").

And sometimes, people like to decorate their Linkedin profiles with emojis to avoid automated recuriter spam.

And that's not the half of it! There are many falsehoods programmers believe about names.

  1. People have exactly one canonical full name.
  2. People have exactly one full name which they go by.
  3. People have, at this point in time, exactly one canonical full name.
  4. People’s names do not contain numbers.

The list goes on and on.

That's not to say you shouldn't automate something with that much variation. Just know what you're getting into. You should weight the amount of time that you have to maintain the automation due to the complexity of the problem with the amount of time that you'll save with the automation.

Sometimes you won't have a choice. You need the process to start handling data right away. As long as you know you need to devote time to iterating and maintaining it over time, the exceptions will tend to diminish over time.

But whether you expect to just set and forget the automation or iterate on it over time, it's inescapable that you need to understand the problem. Also make sure you have seen enough exceptions before trying to automate it. That way, you can leverage the time savings automation will buy you in order to focus on other aspects of your business.

Photo by Pixabay from Pexels


If you enjoyed this and other Automation Recipes, subscribe to the newsletter. It’s got all the same stuff you love, plus all the things that will surprise you.

Automation Cookbook
Subscribe!

Enjoying these posts? Subscribe for more

Subscribe now
Already have an account? Sign in
You've successfully subscribed to Automation Cookbook.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.