Skip to content

Instantly share code, notes, and snippets.

@sleepyfox
Created January 9, 2023 13:12
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sleepyfox/6c6c11f7272a57c7ea08a898eaac9373 to your computer and use it in GitHub Desktop.
Save sleepyfox/6c6c11f7272a57c7ea08a898eaac9373 to your computer and use it in GitHub Desktop.
The problem with AI coders
author: @sleepyfox
title: The problem with AI coders
date: 22-Jun-2022

The problem with AI coders

The problem with 'solutions' like GitHub's Copilot, and similar tech, is that it frames the problem as a problem of search. The programmer is searching for some code that does a thing (produce a HTML table with alternating coloured background rows of green and red), and that they just need to find that thing. Machine Learning has had success in this area, just look at Google's page-rank 'algorithm'.

But the reality is that the programmer does not have a problem of search, they have a problem of understanding. It is not finding a thing, but understanding a thing that is the issue. If the programmer already understood how do do the thing, they just would have done it.

Looking for code that does X on Google, or on Stack-overflow, presents context - we can see alternate answers, we can look at what the context was when the person suggested the answer and see if that context is similar to our own, or completely different. We can look at alternate answers, and make choices about which is more appropriate, we can see the authors' explanations of how the answers work, the authors' opinions of when they would be suitable, vs. when they would be unsuitable.

ML provides none of this. Copilot doesn't provide any context around why the author suggested this solution. It doesn't even know where the solution came from. It cannot explain why it chose to present you this solution, rather than another solution. It can't help you learn about how to construct an HTML table, or how to apply CSS to make alternating background colours for the rows; at best all it can do is provide a working example.

Sometimes in the simple case a working example is all you need, examples are very powerful. But often we need more than just an example, we need the context, the explanation, the indications and contraindications, the explanation of what alternatives exist, and how we might choose amongst them.

For all these reasons, Copilot isn't replacing Stack-overflow anytime soon.

Addendum: Since I wrote this and tweeted about GitHub violating the license agreements on code used for the training set for Copilot, a class action lawsuit against GitHub and Microsoft has been raised in the US federal court https://githubcopilotlitigation.com/ - I sincerely hope that this produces an outcome that stops big-tech AI projects from wilfully pilfering content that doesn't belong to them.

Also: see the following very disturbing thread on ML 'hallucinations' in GPT-3, and why you should be extremely wary of any response you get to a question, even if it looks convincing - https://twitter.com/paniterka_ch/status/1599893718214901760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment