The future of Software Development & AI.
So earlier this week, I noticed a new AI Chatbot had been released that seemed to be getting a lot of traction called ChatGPT and decided to take a look myself.
I’ve spent time before playing with Chatbots and was never overly impressed, they seemed clunky and almost as if someone had just spent years creating a bunch of “if-then” statements, but ChatGPT seemed different.
OpenAI released the chatbot ‘ChatGPT’ last week and it’s been creating quite a stir. ChatGPT was trained using a machine learning technique called “Reinforcement Learning from Human Feedback” (RLHF), and that has given it the ability to simulate dialogue, remember the context of a question and answer follow-up questions, admit mistakes and challenge incorrect premises.
After the usual questions such as if ChatGPT thinks it is sentient, its views on OpenAI’s co-founder Elon Musk, and next week's lottery results, I thought why not investigate its use as a tool for software development?
Let’s be honest, as engineers, we rely heavily on tools like search engines, or the suggestions prompted by our IDEs. Sure we can expend cognitive energy and write good clean code off the top of our heads, but in this day and age, let’s admit that Google is a critical aspect of our ability to deliver software. In my opinion, that doesn’t make us bad engineers, it’s just another tool to help us develop software. The question is, could AI like ChatGPT help us deliver high-quality software faster?
I wasn’t expecting much, but I was wrong. Oh so very wrong.
It. Is. Incredible.
Let’s start off with some basic requests:
Okay nice answers, but those are questions that are easily scrapable off the top results on Google. Let’s step it up and make things a bit more challenging.
Now that’s impressive. I like that it even provides documentation about what it’s doing.
What about a real-world example, maybe something relatively generic and vague as you’d expect from any product owner?
Not necessarily something I think we could deploy to production and release to the real world, but it’s handled a vague request fairly well.
Frontend development has never been my strength; so let’s try some backend Java scenarios:
Nicely done, but I forgot to specify I wanted it written using SpringBoot — let me update the question:
Note how it’s aware of the context of my question.
For the purposes of this blog I’m not going to do TDD (Test Driven Development) so excuse me for that — but let’s add some unit tests:
Very nice, it’s a simple enough unit test but certainly something I can build on later.
Let’s step this up even further, how about some functional tests?
How about something that we all are guilty of? Bugs. I’ll not use my own code as there’s not enough computational power on Earth to fix that, but I’ll give it a generic example:
Granted, the examples above weren’t the most complex, and the code returned wasn’t perfect, but credit where credit is due; this is a game changer and, in my opinion, really exemplifies the potential that AI has.
I have no fear of it replacing software engineers any time soon BUT, it is an excellent platform to start with and I can see this currently being massively beneficial for rapid prototyping or used to help developers learn new technologies.
I’d encourage everyone to try it themselves before the free testing phase ends: https://chat.openai.com/chat
Finally, let’s ask ChatGPT what it thinks:
About the author:
John O’Neill is a Solution Architect here at Version 1.