Peter's cartoon avatar

Peter O'Shaughnessy

Web technologies and browser-based experiments

Artificial Intelligence and the Future of Coding

A question for programmers: how intelligent is your IDE? It warns you when you type something that won’t compile? It makes simple suggestions for how to fix broken code? It can scaffold some basic code for you? That sounds fairly clever...

But now compare it to, say, the sum of all knowledge on Stack Overflow. Or the person that you last pair-programmed with. Now it doesn’t seem so smart, right?

IDEs - and the way that we code in general - are set for a revolution. The future of coding is Cloud-based - and supported by Artificial Intelligence.

Artificial Intelligence: where it’s at

You’ve probably been hearing a lot of buzz about AI recently, yet it might still sound like science fiction. It’s an old term, loaded with the baggage of decades of sci-fi books and movies.

Yet, AI is already a reality. We’re still quite a way off from “general” intelligence or any systems comparable to our range of human abilities. But we’re doing pretty well with “narrow” intelligence - that is, computers learning to solve particular kinds of problems - and we’re starting to make more rapid progress. Due to the recent breakthroughs of cheap parallel computation, the rise of "Big Data", and better algorithms like "Deep Learning", computers are becoming able to perform more and more complex tasks, with less and less specific up-front guidance. A recent example that hit the headlines is Deep-Q, Google’s agent that learns to play Atari games.

So how about using AI to support us as we develop software? I think this is going to be an exciting area over the next few years, especially for Cloud-based IDEs.

Cloud-based coding

If you're like me, you still use an offline, desktop app to write your code. Think about that for a moment. As developers, most of our careers are based on the tectonic, worldwide shift of everything moving online. Yet, some of our most important tools still aren't.

Naturally, we’re headed towards Cloud-based coding. When I say “Cloud-based”, I don’t simply mean that our IDEs will be web apps. They could still be desktop applications. They should certainly still function (albeit in a more limited way) offline, because even in the Amazing World of the Future, we’re still likely to have our connection go down every now and then. But our editors will be increasingly connected to Cloud services.

Intelligent coding agents

Imagine your IDE is connected to an AI service, and polls it for suggestions every keystroke (or few). Now you can have the whole of the machine-crunchable Web behind you.

“It looks like this code has a common problem. Here’s the solution from StackOverflow.”

“Here’s some sample code from a similar function on GitHub.”

“Last time someone wrote that, they later refactored it to this...”

There’s all sorts of ways an agent like this could help us code. And it’s going to keep getting better and better - just like Siri.

Tried Siri lately?

The other day I demonstrated Siri to a couple of friends in a restaurant who still hadn't tried it. I didn't think it was going to work very well with all the background noise. It worked perfectly, first time. Have you noticed how much it has improved since its release? I’ve noticed the accuracy of the speech recognition increase especially, and it’s not just me.

A key reason it’s been able to improve so much is because it's Cloud-based. With everyone’s queries going to the same service, it’s collecting a huge amount of data for training.

In other words, it gets more intelligent the more we use it. The same will happen with AI coding services.

In fact, it’s already starting to happen. the Eclipse Code Recommenders plugin provides intelligent code completion by showing you how other developers have successfully used APIs in similar situations.

Automate all the things!

It’s not just our IDEs that will get smarter. We can expect many aspects of our tooling and infrastructure to get more intelligent and more automated.

For example, internationalisation. There are already companies that offer automatic translation of your website. You shouldn’t rely on it right now, but with computers becoming better and better at translating human languages, it will surely just be a matter of time before we hardly need to think about it; 99% of internationalisation will be automatic.

What else will we be able to automate in the next few years?

How about coding, itself?

Coding without code?

An interesting question is: will we even be writing code in the future? I suspect not the kind that we recognise as “code” now, anyway...

We’re already starting to see services like The Grid cropping up. In case you missed the hype, it’s a website builder with “a form of artificial intelligence that functions like your own personal graphic designer”. I think it’s unlikely to make many graphic designers redundant anytime soon, but it’s interesting as part of a trend towards humans leaving the actual code (in this case, HTML and CSS) up to the computer.

Let’s consider for a moment why we write code in the first place. We need programming languages (like Java, C++, Ruby et al) to bridge the gap between humans and machines. Most of us write code in high-level languages which already abstract us far away from the underlying machine code. As computers get smarter and better at interpreting what we want, we should expect that we’ll be able to move closer - or fully - to our natural human language.

I expect we will also interact with computers more through speech, given that most of us can speak faster - and more naturally - than we can type. Will that extend to programming? It’s a way off yet, but surely it will in the future, once we have intelligent agents that are capable of understanding us well enough, and plumbing the code and infrastructure for us.

I think we’ll also see a rise in visual programming. Many of us are familiar with Firebase’s graphical UI for defining and modifying data structures. Another example is Treeline, who “want to take the coding out of building a backend”, by providing a visual interface for defining data flow pipelines:


*Credit: TechCrunch

Easier programming. Harder debugging.

It’s worth remembering though that the more complex computers become and the further away we get from their inner workings, the more we’ll struggle if we want to understand what’s actually going on under the hood.

How do you debug a complex AI agent? In the future, that might become about as difficult to answer as “how do you debug a human?" As Samuel Arbesman writes, “human ingenuity has created a world that the mind cannot master”.

But let’s not give up on understanding as much as we can. After all, in our future world of unfathomable machine intellect, us humans will need something to keep us occupied!

artificial-intelligence future-tech