Fabien Gasser
Fabien Gasser Ex-Head Of Innovation at Smile

AI for code

AI for code

AI allows us to understand and measure codebase in a new way, and those last years have been exciting with startups trying to get the best of what AI on code could do.

Why should I be interested?

Legacy management is not an en easy task, test or documentation are most of the time missing so adding feature easily introduce new bugs, and upgrading libraries for the sake of security require a huge amount of time, and much more when you have to fix it later on. That’s one point for automation.

Without tests and documentation, you are slow to deliver new features, and when you do, you are more likely to fail and take forever to recover. That’s another point for automation.

But why tests and documentation are missing? Because** tests are boring** compare to the huge dopamine rush brought by the possibility of changing the world with few lines of code. A developer would happily spend their time solving issues rather than doing dummy tasks.

That’s 3 points in favor of automation in code.

State of the art AI for code automation.

Source{d} lead a Fosdem track in 2019 on Machine learning on code, and it was mindblowing. Here are few talks that inspired me and a few applications in the tech market, from GitHub Copilot to Ponicode.

This what the next-gen development part could be like.

AI for code analysis

Understanding Source Code with Deep Learning

Code is written by humans for humans and machines. By learning from the human-oriented components of code, recent research has invented models that start to “understand” some aspects of source code. Using Graph Neural Networks to learn from the rich semantic relationships within code and, by training them on a self-supervised task, they have allowed us to find bugs in open-source projects.

by Miltos Allamanis @ Fosdem 2019

Pair programming with AI

Suggesting Fixes during Code Review with ML

Reading foreign code is hard, and suggesting improvements is even harder. Yet a dramatic portion of code review time goes to figuring out the boring details: formatting, naming, micro-optimizations and best practices. We believe that all of those can be automated with ML on Code

Github Copilot You get suggestions for whole lines or entire functions right inside your editor.

One of the biggest news on the subject, let’s see how it goes.

Unit test generation & code documentation

Units testing is a cornerstone for software delivery and a bottleneck that automation tools have to tackle to ease everyone’s life.

A french company lead made Ponicode VSCode extension by Patrick Joubert ex recast founder, who decided to turn his NLP knowledge to code, especially Unit test generation, as a starter and much more are coming.

Ponicode raises $3.4 million to develop AI that automates code testing

Diffblue IntelliJ extension for Java to catch regressions earlier in your pipeline with Java unit tests that are automatically created by Diffblue Cover

Codist.ai Your projets deserve to be 100% documented and you don’t need to think twice about it 🧠 CodistAI helps document source code faster.

Code metrics

During the last year, Covid emphasized the need to have clear metrics on code and solutions like Athenian try to solve the issue of understanding the tech team’s outputs and bottlenecks based on code analytics.

It’s not their first attempt, as members used to work for Source{d}.

https://www.athenian.co/

Code migration, from bare metal to Cloud Native

Moving from one language to another is a long-awaited dream with at the moment falling scaling result: from to COBOL to C#, from python 2 to 3…

How to build an automatic refactoring and migration toolkit

Every code base needs to be modernised at some point, either to reduce the technical debt or to migrate to another language. In such complex and challenging projects, automation is a key point to reduce the workload of low added-value tasks as monotonous refactoring or redundant paradigm translation.

by Juliette Tisseyre @ Fosdem 2019

The future of software development is automation

Tech managers & developers should dig into AI applied to code that enhanced developer productivity.

It’s time to treat your code like your treat data, with meaningful KPI/OKR and recurrent data quality tasks.

  • what could be automated: unit tests and other low-level but critical tasks

  • what could be accelerated: code migration, switching legacy applications to cloud-native

  • we could be assisted: PR auto-tagging, pair programming, or snippet autosuggestion

It’s definitely not a walk in the park as key challenges to solve will be on the road: intellectual property, license, quality of code suggestion, security issues, bias in training data, garbage code in, garbage code out…

And if you care to have a deeper look at the opportunities brought by AI on code, there is always an awesome repository listing solutions & capacities.

Have fun with your new superpowers.

Thanks for reading

Did you enjoy it? If so, don’t hesitate to 👏 this article or subscribe to our Innovation watch newsletter! You can follow Smile on Facebook, Twitter & Youtube.