The Lack Of Fulfillment in AI-Generating Code

One thing I never shut up about is that I minored in English – I often think back to Stratton‘s argument that writing about literature without first consulting other sources is a bit like coming late to a party and jumping into a conversation. You could bring a fresh perspective, sure (my words, not his), but you could also risk making points that have already been made over and over and over again.

We know that generative AI exists. We know that generative AI can produce code. We also know about AI agents like Claude Code, popularized in Matt Shumer’s Something Big Is Happening In Tech essay but also mentioned a year ago here. Generative AI tools like free ChatGPT at least require a person to manually copy-and-paste, test, and check into version control. Tools like Claude Code are more automated, and can do things like correct, test, and check in code automatically. This is closer to the vision, I suppose, of someone simply prompting AI and then stepping away to return to complete projects.

Whether it is actually a good idea to do this is a matter of debate.

forwordpress

An example is above. This thing is called PaperTrader, it was generated in just a few minutes with Claude Code, and it can be used for just that – paper trading. It uses yfinance in a Python script, I THINK, pretends to trade using a steady stream of “real” data with a 15-minute lag, and saves data of performance on my desktop using an authentication mechanism of some kind. The stack is Spring Boot/React TypeScript, and the database is Hibernate.

Can you feel my characteristic lack of confidence as I write this? The JetBrains video linked above argues that we should never call code “finished” if we generated something we could not have written ourselves. Others are a bit looser and argue that we should simply review every line of what we wrote. This is toy code running on localhost and saved to a private gitrepo, but there is so much that I do not understand about it.

How stale is the data? Surely it cannot be real-time, but I did eyeball a stock against Yahoo Finance and it looked the same with a lag. Before I saw Hibernate in a config file, I was not sure if there was persistent memory. And improvement opportunities abound. You can search a stock by symbol, but there is no option to search by actual company name. Individual stock graphs would be more interesting if there was some aggregate.

Still, I didn’t design this. There was no wireframing, no documentation reading, no list of requirements, really. My idea was pretty vague and it kind of conjured this up out of nothing. Before Claude Code I had spent time searching around for something similar, and never really found anything. So there it was, something I might find useful that, as far as I knew, did not really exist for free before.

Then I never touched it again until yesterday.

The End Of Gatekeeping, Or A Crutch?

When I first encountered ChatGPT, it seemed like something with the potential to be a dream come true. Software engineering and coding, I felt, were all about gatekeeping. Want a job? Here are seven interviews, concluding with a panel and with so much prep requirement that entire companies would spring up to promise riches.

Now non-programmers could code. What else was there? Anyone with an idea could turn it into reality, and there was no need to spend months or even years learning the ins and outs of a programming language, let alone all the additional theory in computer science classes. Someone could become an expert in a different field, like biology or finance, and then the coding could be simply a tool.

It took me a long time to find an apt analogy for writing code with the help of generative AI. With no sense of irony, I first asked ChatGPT for examples. It likened AI to a calculator. AI can make calculations faster, but you still have to learn math.

There’s lots of pushback against the calculator analogy online. Suffice to say, calculators rarely hallucinate mid-calcaulation.

Finally, I went on the Developers of India subreddit and found a much more cynical analogy. Using AI is like getting addicted to drugs. You become overly reliant, and eventually you watch as your brain melts into slop.

Well…that seems a bit harsh. Tokens are expensive. Limits can be reached. Or not. Maybe some random company will revolutionize this and figure out how to do everything more cheaply.

Until we reach that point, there are many bugs to fix. Data point of Evan, but I also notice that AI is developing a stigma, perhaps a bit like the hacker stigma against script kiddies (but I do not have CISSP, so I am not qualified to make that comparison).

More General Thoughts

In the Pivot podcast, Scott Galloway is quick to point out something that many will find not-that-controversial: AI writing is still really lacking. It’s not nearly as easy to identify as it used to be, however.

It used to have bullets, repeat off a few non-sentences, and then ALWAYS conclude with “in conclusion.” Now I have been fooled by it enough times to disqualify any criticisms I may have of it.

AI fiction is interesting. It has choppy sentences. Eloquence, somehow, in a way that occasionally lacks real substance. Restates. Reiterates. Forms sentences with contrast, not so much to truly emphasize a point but to parrot good writing.

A paragraph that’s only one sentence long.

A feeling of wistfulness, mock conflict, ten sentences in before you realize it’s kind of just repeated the same thing over and over and over again.

Coding is a little bit different. Even technical writing may be a good candidate for AI. At least there, AI can handle the precision without trying to mimic something as subjective as what constitutes good writing. Good writing has a rhythm to it, I suppose, but it can’t be reduced to just that.

The issue with AI-generated code is that it frequently does things that make no sense, and sometimes they are insidious in that they seem to work and bugs are more difficult to identify. It could probably be argued that anti-AI “purists” are not so different from the people who criticized things like web frameworks pushed by those who never learned HTML/CSS/JavaScript properly, but the aforementioned “purists” had a point then and they sure as hell have a point now. This is like the web framework debate all over again, but if web frameworks were propping up the entire S&P500.

Closing Thoughts

Until we reach that bright hallucination-free world on the horizon, coding without AI is still a valuable skill.

Please comment below with your thoughts on how reading this rambling was annoying, and you would have preferred to AI-generate something about the fall of AI and read that instead.

Jeez, I do not miss Medium comments at all.

Leave a Comment

Your email address will not be published. Required fields are marked *