This is a mobile version, full one is here.

Yegor Bugayenko
16 February 2022

Fallacies of AI Driven Coding

A few days ago, DeepMind (acquired by Google in 2014) released AlphaCode and self-published a paper explaining how their artificial intelligence (AI) can “understand” a programming contest task written in English and then write a Python, Java or C++ program, which would work in about 30% of cases. Earlier last year OpenAI ($1B-funded by Microsoft in 2019) released Codex and published a paper, claiming that their AI can also solve around 30% of the programming tasks it was tested with. Wired, the Financial Times, The Verge and many others have already announced the victory: AI will replace programmers and we are all going to lose our jobs.

I would identify five beliefs about AI and its code-writing abilities, which, in my opinion, are fundamental fallacies:

To conclude, ML will never write our code, because … it’s just not the right tool for the job. However, it may be suitable for other things, like autocompletion, refactoring, bug fixing, optimization, and so on. I’m particularly interested in automated refactoring: imagine a large legacy code base given to AI, which improves certain parts of it, making the code faster, safer, more readable, or shorter. Maybe it will even upgrade the code to newer frameworks, SDKs, and dependencies. This is where ML already helps and will help more, improving existing ASTs.

Trying to apply ML to code generating is a road to nowhere, which only wastes resources and … boosts stocks of Google and Microsoft.

Besides, how much good will it do to the industry if programmers write code mostly by finding samples on the Internet, copying, and sticking them together? Many of them already do that even without AI. The analysis recently done by Stack Overflow demonstrates that “the higher a user’s reputation, the less often they are copying.” Less skillful programmers tend to copy. Is this a good tendency? Do we want AI to push it further?

Will AI ever be able to write code by reading natural language requirements? Yes, it will. When we invent artificial creativity.