Industry executives and experts share their predictions for 2021. Read them in this 13th annual VMblog.com series exclusive.
4 Ways Machine Learning and AI Will Be Used to Improve Code
By Brian Rue, CEO and co-founder of Rollbar
The way software is
built has changed immensely in recent years. For many companies, it's a more
continuous process with frequent - sometimes daily - releases, a microservices
architecture, and cloud-native applications. Businesses want to move quickly so
they can stay competitive and keep pace with delighting customers. One thing
that hasn't kept pace, though, is how developers deal with code errors and
bugs.
The typical process is reactive and manual.
Best case scenario is the team gets an alert that something's wrong. But many
times, issues aren't surfaced until enough users report problems.
Either way, organizations need to investigate
such problems to figure out why the issues are happening and the best way to
resolve them. This can take days or weeks.
Wouldn't it better to minimize the effort to
resolve bugs, giving that time back to developers, and getting ahead of issues
before they impact users? The good news is that's already starting to happen
thanks to machine learning and AI being introduced into error response tools
and processes. Here are the four ways this will be adopted by best-in-class dev
teams in 2021:
Predict
Errors During Pre-Production
Catching and resolving error quickly is great.
Preventing them from happening is even better.
Machine learning can analyze the entire
history of your code and how it's changed over time to understand what errors
you've had in the past. It can use that to predict when errors will happen
again based on similar patterns of code - so you don't make the same mistake
twice.
Right now, it will let you know where it
thinks the problem will occur. Further down the line, we'll start to see
machine learning and AI working together to suggest on code changes to fix it.
Anticipate
the Severity of Errors in Production
Predicting issues as you're writing new code
is great, but errors still happen.
Maybe you have a new integration that causes
something else to break. Whatever it is, you want it fixed quickly and easily.
But you probably also have a queue of issues, new integrations, and other
updates that your team needs to address. So, prioritization for dev teams is
paramount. That's where machine learning can help.
With the initial information on a new error, machine
learning can correlate that against other information about your product and
users, or anything else you let it analyze. With that information, you can
decide what to do: take immediate action to prevent something serious, let it
continue because it's minor, make a small correction until you can dig in
later, etc.
For example, maybe the issue is only
affecting Android users, and they make up 20% of your user base. That's
significant enough that you want to fix it quickly. But maybe you have
something else that's affecting 95% of your users. Knowing that helps you
prioritize what you should be focused on next. In the year ahead, more dev
teams will benefit from this knowledge.
Enjoy Better Error Classification
Development teams already have tools and
systems to alert them about problems. That's why many are on call just like
medical professionals - to deal with issues immediately.
But instead of a single alert, you get more
noise than you can handle. A hundred alerts at once can be overwhelming. The
first thing you'll want to do is see whether all the alerts were caused by the
same thing. Getting accurate information about how to group errors can be
helpful.
Grouping solutions, or engines, already exist.
But they're built on hard-coded definitions. So, if a new bug pops up that was
never defined in the engine, such solutions won't recognize it.
However, a solution built on machine learning
will continuously update its definitions. That's how we built our grouping
engine at Rollbar. Better error signals also open up the possibilities on how
to automate the next steps to take.
Benefit from Proactive Decision Making
If developers can trust the error signals
they get, because they're getting better information from their grouping
engine, they can move much more quickly to minimize the impact to users.
If AI sees a major error that's affecting 95%
of users on iOS, the AI solution can automatically revert to the previous known
version of that code that worked properly.
Our newly launched AI-Assisted Workflows are
already doing this. Based on criteria users set up, progressive deployments can
be halted if an error is found, or feature flags can be automatically turned
off for the same reason.
We're going to start
to see even more ways to automate many of the manual tasks when responding to
and remediating errors. But 2021 is going to be the year that AI and machine
learning begin to become table stakes for dev teams. The organizations that
invest the most in these solutions will be the best poised to get ahead of the
competitive pack.
Some of the ways that
machine learning and AI are being used may not seem like true game changers.
But we're only at the beginning of this evolution in improving code. As teams
start to adopt these solutions in 2021, it'll build the foundation to go even
further in the future.
##
About
the Author
Brian Rue is CEO and co-founder of Rollbar,
the leading Continuous Code Improvement platform, helping developers to
proactively discover, predict, and remediate errors with our real time
AI-Assisted Workflows. Rollbar also has an Automation-Grade Grouping engine,
which is powered by machine learning to reduce noise in error signals to
delivering better error classifications, which is the foundation of our
automated workflows. Simply put: Rollbar wants to help developers build
software quickly and painlessly.