Embrace AI pair programming or perish

Benjamin Jordan
CodeX
Published in
7 min readOct 29, 2021
From pxhere.

Dire enough for you? Let me explain where I’m coming from: for the programmer and non-programmer alike.

I have been using a product called GitHub Copilot for one week. This “free” program (though highly expensive in the currency of my data) is touted as “your friendly AI pair programmer”.

Octocat | Used with permission from https://github.com/logos

And why shouldn’t it be called friendly! Look at this little pal. What a cutie. I don’t have permission to use the actual Copilot logo, so GitHub’s Octocat will have to do.

Your pal Copilot pops up while you’re writing code and, well, it helps you write whatever code is coming up next.

Us programmers are used to small bits of code popping up here and there while programming — most development tools we use have a feature called “auto-complete” which is sort of like grammarly for your code.

Here’s what modern auto-complete looks like.

When I type a ., a little box pops up and tells me some things I might want to type. It does this by analyzing my code and, in this case, it knows what _rpcHandle is (because I’ve described what it is in code), so it can tell me the things that it does and make them options in that little gray box. This type of program is so well known that every programmer has used something like this at some point in their career.

This is not what GitHub Copilot does. And this is why we are not friends.

This post is about to go off the rails.

Quantum Stuff | Used with permission from MaxPixel.

The quantum leap

This is hard to explain using analogies.

Auto-complete is to GitHub Copilot as ten is to one billion. It is orders of magnitude beyond everything else. This analogy isn’t even accurate because the number one billion does not have the ability of being able to improve itself. This is a quantum leap in the toil of programming, not an incremental improvement.

Let me back up and show some proof. I want to show you some code that I didn’t write and explain exactly how much I didn’t write it.

I needed some code that looked through a directory tree and found all sub-directories that themselves contained a directory named .git. This is not the most complicated problem ever but it‘s no slouch.

I wrote a description of what I wanted in English:

// recursively find all subdirectories with a git folder

…and this is the code that Copilot wrote for me:

That’s… a lot of code. This is not a dropdown box with some options. And this is not just a lot of code: this code works. Additionally, our cute little friend decided to reference code that I had already written in the file— like getSubdirectories. This is not something you can Google, this was a thing that only I knew about because it was only in my personal code: yet it knew how to use it.

I decided I wanted to push Copilot, so I added an English adjective to my comment: asynchronously. Don’t focus on the particular meaning of this adjective, if you aren’t sure what it means — the point is that I added an English adjective to my comment.

Guess what? It generated a freaking asynchronous version:

The astute among you may notice that, while it’s not entirely correct — existsSync should just be exists, it’s pretty darn close. It even added a maxDepth for me, which can help prevent various types of errors. This is something that I would have put in a future version of this code, were I writing this by hand, not something that I likely would have put in to begin with.

I pushed this further by adding some more English, and in parallel, to the end of my comment — again, don’t worry if you don’t understand particulars.

It freaking did it. This code is also not entirely correct, but it is quite close. It is the frame of a complete solution. If I asked for an asynchronous, parallelized, recursive directory search, 99% of js programmers would also give me code that was incorrect — though most likely it would not be this close. This is not an insult to js programmers, it’s a testament to the power of AI. And I am not being hyperbolic: I have interviewed hundreds of engineers.

And this is a technical pre-release of a first generation tool.

Used with permission from pixabay.

Why aren’t we friends?

Friendship does not correctly characterize this relationship.

What is it called when you adopt a lion cub, slowly become dependent on it for survival, then it grows up and tears you limb from limb? In this scenario, everyone has lion cubs and really you can’t be competitive without them. There’s a German word for it, I’m pretty sure.

I am not concerned with AI taking my job — I’ve already come to terms with this, though admittedly I may have been working up to this point on a different timeline. Application programmers sit between product teams and computers, translating between the two, but soon the product team will no longer need translators, and eventually the computer will no longer need a product.

I am not concerned with the impending wave of unlearning that will be unleashed across the existing programming community as we learn to adapt to new tools. Unlearning has always been and will always be. Don’t stick to your guns on this one — learn to work with the beast, not against it.

I am not concerned about the educational changes that need to take place to train the next programmers. Formal programming training has always been for the birds (I said it!) and those that are most interested will continue to teach themselves.

I wonder how novel architectural patterns will ever get a foothold when AI is writing code based on the weight of its inputs. Will there be an interesting successor to React when AI is asked to output solutions based on a body of React-heavy solutions?

I am concerned about the in-feasibility of a good competitor to Copilot. There is so much groundwork already laid. Who has as much code sitting around as Microsoft + GitHub? I understand that GANNs exist but, unless I’m missing something, the most compelling GANN would be built using Copilot.

I am concerned about the impact of AI programming on nations with large outsource development economies. When development labor can be outsourced to a US based tech giant’s AI, outsource budget will no longer be directed to those countries, they will be directed to the US based tech giant.

However, what disturbs me most of all about this writing on the wall — something I’ve thought about in the abstract before but never so concretely, is how many personal identities will be shaken. How many of us programmers tie a certain amount of our identity or self-worth in being able to write half-way-decent code? This has happened before, I think,with other industries decimated by automation. Imagine learning that a machine can do what you’ve always been good at, except better than you, faster than you, cheaper than you. Oof.

“Sandworm Mural” | Steven Leung

Get onboard

Copilot is only going to be a pair-programming tool for so long. After that, like the Fremen wielding maker hooks, we will do our best to ride the colossal sandworm, but all we can do is point it in the right direction. I will soon be the copilot, then eventually: passenger.

When I opened this article, I said something about Copilot being a quantum leap in the toil of programming. Now we have no choice but to accept the challenge of embracing the beast without taking a quantum leap backward in the joy of programming.

All aboard.

--

--

Benjamin Jordan
CodeX
Writer for

Tech, thought, teaching. Total loser. Founder @GMM, Adjunct @SLU. Formerly VPE @N3TWORK, CTO @Big Run Studios, CTO @Enklu, Studio Tech Director @NCSOFT.