562 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Coding in SQL, Python, VBA, JQuery and OfficeScript using AI tools
Part eight of an eight-part series of blogs
One of the immediate and obvious ways to use AI tools is to boost your productivity as a programmer. This blog shows how you can use ChatGPT 4 and Google's Bard to write programs in SQL, Python, VBA, JQuery and Office Script (probably the 5 languages Wise Owl use most).
To me the answer to both these questions is obvious! I'll answer the second question first ...
This whole blog was a slightly unfair comparison, as both tools are changing fast and Google have implied that Bard's most powerful features are being held under wraps, but as things stand ChatGPT 4 is the clear winner. Why?
Advantages of ChatGPT
I repeatedly found mistakes in the code written by Bard, whereas ChatGPT seems to write almost faultless code. How it does this I couldn't say!
ChatGPT consistently did a better job at answering the question I'd asked.
ChatGPT writes excellent comments, summaries and help - again, it's somewhere between amazing and terrifying to see this in action.
Set against this, Bard is much quicker at coming up with solutions and (at the time of writing) cheaper too. However, I'd rather wait 60 seconds for an accurate answer than get one I didn't trust in 10 seconds or less.
When I first used ChatGPT to write code, I was scared for the future. What would happen to the armies of programmers in the world? After some time to reflect I'm a bit less worried, as I think the world needs expert programmers. Why?
As this blog has repeatedly shown, just because generated code looks convincing doesn't mean it actually works correctly!
For most programming tasks an AI tool can generate functions to help as building blocks, but a human will still need to put these together to solve the business problem - and that human will need to understand the code generated.
Asking the right question
A good analyst will learn how to ask the right question - a programming skill in itself.
In many cases (most?) it will still be quicker to write human code than it will be to formulate a question, ask this of an AI tool and then review the response. This will obviously be truer the more experienced you are as a programmer in a particular language.
My test in any training course is always this: do I use this software feature myself? Here's how I suspect I will use AI tools to help myself code in each of the 5 areas I've reviewed:
How I will use AI tools
I will rarely if ever use AI tools to generate SQL. The problem is that the AI tool will (necessarily) use made up table and column names: by the time I've changed these for the actual table and column names I'm using, it would have been quicker to write the code myself. Note that everything would change if I could somehow feed my database schema into an AI tool ...
I have to be honest: ChatGPT writes better Python than me, and does it more quickly. However, most of the time my problem with Python (and any other language) isn't the coding - it's thinking what I need to do. So again, I don't think I'll be using AI tools often.
At the moment, I prefer the VBA I write to that generated by AI tools. AI may choose the code, but I want to choose the algorithm!
Since I don't know these well, I would always get AI to help me, but I suspect I would end up writing my Office Script code myself (for the same reason as I would write my own VBA code, as explained above).
The obvious moral of all this: the better you know a language, the less likely you will be to use AI to generate code in it!
|Parts of this blog|
25 Aytoun Street