![| Embarcadero RAD Studio Delphi C++Builder Blogs](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2023/04/ai_code-1251474.png?resize=1140%2C694&ssl=1)
This year is definitely starting to look like the year of the AI uprising and it’s only a question of time before it makes it into IDE software of all types. The ball really started rolling with a dramatic investment by Microsoft of at least $10 billion in OpenAI, the company behind the admirably powerful ChatGPT, Dall-E and similar advances in artificial intelligence and machine learning (ML). It was a brave move by Microsoft and it appears to have wrong-footed Google’s parent company Alphabet who experienced what appeared to be some major publicity SNAFUs while promoting Bard, their own ChatGPT rival. There’s now a bit of goldrush going on with AI and it’s hard not to notice the proliferation of apps which incorporate machine learning or AI (or at least claim to) in their titles. But the big question is, is a sufficiently powerful AI really going to steal our jobs?
Table of Contents
Is LSP, code completion and error insight a form of AI?
Well, that’s a good question! RAD Studio 11.3 has a lot of great new features and improvements in it. In particular the Language Server Protocol or LSP had a ton of things done to improve its quality and reliability. The LSP is the ‘magic’ behind the mechanism which suggests potential functions, methods and properties when you type a dot or hit CTRL
and SPACE
. It’s intrinsic to the intelligence of useful functions like error insight and, unless you know better, it can look like intelligence. In fact, the similar feature in Microsoft products is called ‘intellisense’, clearly a name picked by someone with a flair for alliterative rhyming.
![20230402164501 | Embarcadero RAD Studio Delphi C++Builder Blogs Is Powerful AI Really Going To Steal Our Jobs Delphi LSP in action](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2023/04/2023-04-02_16-45-01-2095793.png?resize=750%2C462&ssl=1)
Sometimes LSP, code completion, and error insight can really appear like it’s alive (especially in 11.3 which I’ve found to be rock-solid and a huge improvement) – and it’s definitely useful, perhaps even essential, when coding in todays’ complicated software development industry. The reality is though that it’s just a very fast and smart indexing tool which has a specialized focus on the particular task with which it is helping, which in the case of RAD Studio is Delphi and/or C++ code. Clever, useful, but not ever going to be sentient…yet.
Why is ChatGPT such a huge leap forward in AI?
ChatGPT is a MASSIVE language model with billions of tokens (elements of knowledge). Compared to previous incarnations of similar large language models (LLMs) it might actually be orders of magnitude larger. The recently released ChatGPT4 took things even further and now understands images as well as having a bunch of safeguards to prevent it being fooled into giving answers it shouldn’t.
The key difference is that ChatGPT formulates answers and holds a multi-response conversation which appears to be drawing its own conclusions rather than providing answers from a prepared library or selection of potential replies. It provides a seemingly complex interaction drawn from intuition and reasoning.
Compare this to the early chatbot efforts of computer scientist and ethicist Joseph Weizenbaum’s Eliza which was, in effect, a set of really big IF
statements and there is almost no comparison. In a way that’s fitting since Weizenbaum claimed he actually wrote Eliza more as a parody than deliberate attempt at true AI but the response to Eliza was enough to convince him that society would be wise to be cautious about the potentials of genuine AI. Joseph Weizenbaum died in 2008 so he never got to see something like ChatGPT in action but I’m pretty certain he would have been as impressed as the rest of us – and a little unsettled.
![| Embarcadero RAD Studio Delphi C++Builder Blogs Is Powerful AI Really Going To Steal Our Jobs ChatGPT giving its opinion of Joesph Weizenbaum](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2023/04/chatgpt-4436198.png?resize=750%2C563&ssl=1)
What can ChatGPT AI do for software developers?
The answer is quite a lot. It can answer questions, help you find errors, even write some code for you. It is simultaneously amazing and terrifying.
For example, I asked ChatGPT (March 2023 version) to create a simple procedure that displays a message box which says “Hello blog”. I am pretty sure no-one else has asked it to say “Hello blog”, it’s not a difficult phrase but it’s uncommon enough that I could see if ChatGPT was inserting real code and not some kind of template.
Here’s the result.
![20230402163017 | Embarcadero RAD Studio Delphi C++Builder Blogs Is Powerful AI Really Going To Steal Our Jobs A Delphi code procedure written by ChatGPT](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2023/04/2023-04-02_16-30-17-4772568.png?resize=750%2C391&ssl=1)
It’s correct. I laughed a little that the browser’s code wrapper labeled the syntax highlighting as “Arduino” instead of “Pascal” but other than that it’s absolutely correct.
I’m a computer studies student, can ChatGPT do my homework for me?
The “create a hello world procedure” question I posed was exactly the kind of question high-school students get asked. The answer was completely correct so, yes, I am pretty certain ChatGPT will be the secret tool that makes life a lot easier for 1000s of students who want to glide to test success on the wings of an ultra-helpful AI. ChatGPT is able to do much more complicated things than a simple procedure. It can optimize code, lay out design patterns, create interfaces for web services – in fact pretty much anything.
Is it possible to incorporate ChatGPT into the RAD Studio IDE?
Since ChaptGPT is so capable it might be cool to incorporate it directly into the RAD Studio IDE so we can get it to help us write and create code without leaving the code editor. Luckily, plenty of other Delphi developers also thought this might be an interesting idea.
RAD Studio Alexandria 11.3 includes a lot of nice fixes, improvements and enhancements. One area that received a lot of love in RAD Studio 11 was the ToolsAPI. This is a set of units, classes, and interfaces which allow developers to interact directly with areas of the IDE and code editor window such as the gutter (where the line numbers are) and the individual rows of program code. I have a few articles planned which will go into this in a lot more depth because some of the changes are extremely exciting for inquisitive creative minds like mine. You can read more details of the changes to the ToolsAPI and code editor in this article. The answer is very definitely; yes ChatGPT can be incorporated into RAD Studio. There are some caveats though which I discuss at the end of this article.
How to incorporate ChatGPT AI into the RAD Studio IDE
One of the best examples of incorporating ChatGPT I have seen was created and demonstrated by Marco Geuze of GDK Software. Marco showed us how to do this in an incredibly well-produced session for the recent DelphiCon. I was lucky enough to be hosting Marco’s session and was there for his Q & A too.
Here’s the video so you can see Marco using the ToolsAPI to get ChatGPT to create Delphi program code automatically in the RAD Studio code editor.
Where can I get the source code for Marco Geuze’s RAD Studio add-on?
Marco’s GDK Software GitHub account has a repository for the full source of the ChatGPT add-on here: https://github.com/GDKsoftware/DelphiCon2023. GDK also have a ToolsAPI helper library which they use for their own projects which you can find here: https://github.com/GDKsoftware/ToolsAPI-helper
More ways to add the power of ChatGPT AI to your IDE
Marco Geuze was the first person I saw demonstrate a ChatGPT RAD Studio AI add-on extension but his code repository is not the only one available. There are in fact, at the time of writing, at least two more ChatGPT plug-ins available for RAD Studio. I have not had a chance to try either of them yet but it’s quite exciting to see so much interest in the subject.
![| Embarcadero RAD Studio Delphi C++Builder Blogs Is Powerful AI Really Going To Steal Our Jobs ChatGPT add ons for RAD Studio in GetIt](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2023/04/2023-04-03_07-04-54-4174485.png?resize=750%2C541&ssl=1)
Am I going to lose my job to a ChatGPT AI?
This is the question of the moment isn’t it? The good news is that right now ChatGPT is ‘sort of ok‘ at creating Delphi code. But it often does a really poor job of it (Marco Geuze has an article where he shows us exactly how many errors he got). If you do a quick Google search – or, even better, use the new “Bing ChatGPT-powered AI search” button which will have appeared to the right of your web browser if you are using Microsoft Edge you will get an answer something like this:
![20230402171408 | Embarcadero RAD Studio Delphi C++Builder Blogs Is Powerful AI Really Going To Steal Our Jobs Bing is not convinced you should trust ChatGPT produced code without checking it](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2023/04/2023-04-02_17-14-08-4322060.png?resize=407%2C352&ssl=1)
So, no, I think your job is safe…for now. The likelihood is that OpenAI are really on to something though and with many billions of Microsoft dollars backing them up they’re not going to settle for anything less than the best they can get. I doubt that Alphabet or even Meta will waste much time in catching up; AI is the new software frontier. I’ve been in the software development industry for 38 years and this definitely feels like one of those moments where some huge things are happening. I’m not sure if there is an AI equivalent of Moore’s Law but if it follows along similar lines with a corresponding exponential increase in sophistication and competence then I, for one, welcome our new AI overlords.
The only comfort is that if you are unlucky enough to find yourself back on the job search market ChatGPT wil be able to help you create a convincing resume and letter of application. Just don’t ask it to open the pod bay doors.
![| Embarcadero RAD Studio Delphi C++Builder Blogs Is Powerful AI Really Going To Steal Our Jobs Podbay doors are not going to be opened](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2023/04/2023-04-03_10-23-52-1743958.png?resize=750%2C444&ssl=1)
Why not download a free trial of RAD Studio 11 today and try the examples for yourself?
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition