The subject of AI has been everywhere lately and with a certain amount of fear and dread. Programs writing programs is the subject of many scary sci-fi plots. We’ve come to a time when even the index of the amount of knowledge in the world simply can’t be held in one person’s brain. And this is increasing on a daily basis. Also, there is a frightening amount of incorrect information that has entered the arena. Many have discovered that FUD (fear, uncertainty and doubt) sells.

Can AI help with this problem or will it contribute to our demise?

There are a lot of opinions on this topic but there’s nothing like getting some actual data on the subject to make it less scary and more interesting.  An area of interest to me personally is programs (AI)  writing code. That’s one of my jobs, so is something like ChatGPT going to replace me? I decided to try out a few short examples of using ChatGPT to get a feel for what this is all about.

A simple frontend application

First thing I thought I’d try was to see if I could get ChapGPT to write a todo list in Vue.js. I’ve been working with this framework lately and it seemed like a nice test. Off the bat it did exactly that. It gave me  instructions for how to set up the framework and the code looked very  reasonable. It had an add and a delete, but it didn’t have a check box for marking something completed, so I asked it to add that. It also crossed out the item when I selected it. I didn’t ask for that but obviously it’s seen todo lists before. The styling was pretty ugly so I asked it if it could make the list look better. It proceeded to include Bootstrap and style the list centered in the page on a nice looking card with a header for the list. I showed it to Mark who asked if it would do a dark/light mode. At this point I ran into some problems with it finishing. I suspect the tool was being used by a lot of people and having trouble keeping up. So I wound up with several incomplete renditions and it lost track of some of my earlier requests. 

I took the original success and one of the partial renders and cut and paste to build a nice little to-do list app with Dark/Light mode. All around the experience was pretty successful.

Something more complicated

My next experiment was to see if ChatGPT would write a Laravel app to keep track of bills and send me a reminder when they were due. This took a couple of  tries to frame the problem, but I did get a nice description of what I would need to build this application including Laravel installation and artisan commands to build the models/controllers and database tables. However, this is where things went awry as the commands were for an older version of Laravel and just didn’t work. This is really one of the more serious problems in modern programming. Keeping up with changing technology is like drinking from a firehose. And many of the resources on the net are out of date by the time they’re published. AI isn’t immune to this problem. It needs good training sets to produce good answers. 

What have I learned from this experiment

First, this is an exciting new area of research that will bring new tools to help humans negotiate the world. Just like Photoshop doesn’t make you an artist, AI isn’t going to make you a great programmer. What it can do is help you get to know new languages, frameworks, and patterns of construction. It seems like it could become a really good teaching tool, or a great way to bootstrap a project.

I’m excited to see if there are ways to use AI to help you troubleshoot problems, but this seems like a trickier kind of problem. 

I’m pretty sure I’ve just scratched the surface of what something like ChatGPT can do and learning to work with AI is going to be an important skillset in the future, because it certainly isn’t going away. The issues around training sets, how to get good data, how the data is vetted and who gets to chose the data are important and it will be interesting to see what kind of legislation and safeguards are created to deal with these issues.

Bottom line: I don’t think it’s taking my job yet, and I don’t see SkyNet on the horizon, but maybe I just haven’t phrased the problem correctly yet.

Other opinions

Our Portal author Jay Nelson has a great article on the coming AI revolution in our January portal. I recently ran into an article by a WordPress developer, David Gewirtz outlining his experience with having ChatGPT build a simple WordPress plugin.