I got mentioned in this week’s PC Pro podcast far too much.
As usual, the live recording was accompanied by live chat in Discord and one of the subjects was AI being used to write code. I had views. And many of them got repeated on the podcast, albeit mostly those that were presenting an alternative view to the presenter’s own rose-tinted views.
But I want to clarify some things.
You can listen to the podcast here…
Here’s what I said in the chat…
Ugh. As someone who’s seen the code output from AI… just no.
And then when it was said that it was something you should be considering because, if you wasn’t, your competitors would be, I said…
I would say to let your competitors use AI for their code. They won’t remain competitors in the long term.
The point I’m trying to make is that I’ve tried AI for writing code and seen the results of others doing so. It’s regularly low quality, and often has security and accessibility issues, where it concentrates on simply delivering what you asked it to do. If your competitor is accepting low quality code, then well that’s not going to be great.
Which all seems one sided but was my attempt at some balance from the podcasters, most of whom are not coders and think the idea of AI writing everything was a great idea.
The reality is, I do use AI when coding. But to assist me, not to write the code itself. For example, I’m terrible at writing regular expressions and find AI is incredibly helpful for this. One of the points made during the podcasts is that developers are often pretty terrible at adding comments to their code. Which is true. But the idea of handing over the entire coding job to AI for this reason doesn’t hold water. Again, use AI as an assistant – get it to review your code and make suggestions for improving the commenting.
But let’s rewind back. Why shouldn’t we use AI for coding? Mainly, because it’s pretty bad at it. I recently looked at one AI coding tool and found that the code it produced was peppered with security issues. The WordPress plugin review team (who, as their name suggests, reviews all new plugins submitted to the official WordPress directory) have said that they can spot AI generated code a mile away. It often contains security and/or accessibility issues.
Even then, the issues around lacking context and just generally hallucinating is still a concern. I was struggling to work out how to achieve something in code recently and asked ChatGPT to assist. It gave me an answer. It didn’t work. So, I pointed out that it didn’t. It said I was right and suggested an alternative method which would work this time. It still didn’t.
For that reason too I wouldn’t even use it was a method of helping you learn coding, as it’s a pretty poor teacher.
Of course, human created code is often not much different, but if we’re relying on AI to write it, we want it to be the best version of ourselves, not the worst. In time I’m sure it will get better and then my view may well change. But until then, I’ll continue to advise caution. And, yes, if your competitors are using it, they may well be saving money in the short term. But, longer term? What’s your security worth to you? What’s a good quality website/app/whatever worth to your business?


Leave a Reply