Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
547 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers 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
Search our website
We also send out useful tips in a monthly email newsletter ...
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).
|
In this blog
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?
Aspect | Advantages of ChatGPT |
---|---|
Accuracy | 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! |
Relevance | ChatGPT consistently did a better job at answering the question I'd asked. |
Supporting notes | 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?
Reason | Notes |
---|---|
Checking | As this blog has repeatedly shown, just because generated code looks convincing doesn't mean it actually works correctly! |
Tweaking | 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. |
Speed | 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:
Language | How I will use AI tools |
---|---|
SQL | 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 ... |
Python | 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. |
VBA | 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! |
OfficeScripts | 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). |
JQuery | I can spend a long time getting my punctuation correct for JavaScript and JQuery, so I will be an enthusiastic user of ChatGPT to generate client script from now on! |
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 |
---|
|
Some other pages relevant to the above blogs include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.