Using Chatgpt to write code
Discussion
I really struggle to write any code, having spent the morning on a project on a Raspberry Pi Pico I thought I would ask Chatgpt.
Basically it came up with some working code in less time it took me to type in what I wanted, then you can just keep asking for bits to be added or changed and it produces more code, that works.
If I were a software engineer I would be worried.
Basically it came up with some working code in less time it took me to type in what I wanted, then you can just keep asking for bits to be added or changed and it produces more code, that works.
If I were a software engineer I would be worried.
I used to be fairly good with VB code (and before that pascal, fortran, zx81 and spectrum). Today, probably 20 years after writing any 'decent' code, I resorted to ChatGPT as my memory failed me in VB.
Did it straight away with no issues. Really simple but solved an issue at work in a matter of seconds.....
...and, I realise I am an amateur......
Did it straight away with no issues. Really simple but solved an issue at work in a matter of seconds.....
...and, I realise I am an amateur......
james6546 said:
People keep sending me code that they ve asked AI to write, think I ll be ok for a while yet.
Customers who are able to do their own changes sounds terrifying, I spend most of my time explaining why code changes are a bad idea to do!
Having seen some of the bodgers that purport to be experienced embedded software engineers I think AI could give 'em run for their money.Customers who are able to do their own changes sounds terrifying, I spend most of my time explaining why code changes are a bad idea to do!
One software project that I needed a good few years back was basically transmitting data between two devices and looping back at one end, the code needed to send/receive the data and then flash an led, red if corrupted, green if not.
The result was one bit sent the data round the loop, the other bit flashed the led but the 2 bits didn't talk each other, as useless as a chocolate teapot.
AI coding assistants can be real time savers
In XCode 2026 I can start to type a for-loop and it will generate several lines of code that are, for the most part, exactly what I would have written
Either we will need fewer coders, or coders will produce more syntactically-correct output quicker
In XCode 2026 I can start to type a for-loop and it will generate several lines of code that are, for the most part, exactly what I would have written
Either we will need fewer coders, or coders will produce more syntactically-correct output quicker
It can be good for the bare bones of some code, especially if its complex or badly documented. Though if its too badly documented then it will struggle too. 
For example, create some python code using pyqt6 with a button that opens a dialogue box and another button that links to a different window.
Theres a lot of setup for that, but if you want to have a load of buttons and other ui elements and you need to explain what each one is and does, it starts to take longer to explain, rather than just take what was given for the simple example and expand on it just copy n paste the bits of code.
Unless you like writing HLD/LLD documents
Also it will only give you what you ask for, mostly. Like outsourced devs, if you ask for the wrong thing, thats what you get. If you dont specify defensive measures like input sanitisation or not having sensitive information stored in publicly accessible firebase databases, you wont get them.
Experienced devs should do this by default, or at least raise it as a requirement,

For example, create some python code using pyqt6 with a button that opens a dialogue box and another button that links to a different window.
Theres a lot of setup for that, but if you want to have a load of buttons and other ui elements and you need to explain what each one is and does, it starts to take longer to explain, rather than just take what was given for the simple example and expand on it just copy n paste the bits of code.
Unless you like writing HLD/LLD documents

Also it will only give you what you ask for, mostly. Like outsourced devs, if you ask for the wrong thing, thats what you get. If you dont specify defensive measures like input sanitisation or not having sensitive information stored in publicly accessible firebase databases, you wont get them.
Experienced devs should do this by default, or at least raise it as a requirement,
Edited by .:ian:. on Friday 10th October 12:48

My devs use it - but they use it either to generate boilerplate, or to produce basically a free PoC for something they're trying to do and haven't done before. They aren't asking it to generate production code.
My biggest concern about it is that what generative AI does is essentially "create text that looks like a human response to this question". When it generates nonsense, it's plausible looking nonsense. I worry that it's going to generate something that is wrong, but subtly so. It has, however, got better at analytical tasks, and is a bit less "virtual plausible bulls

Inbox said:
I really struggle to write any code, having spent the morning on a project on a Raspberry Pi Pico I thought I would ask Chatgpt.
Basically it came up with some working code in less time it took me to type in what I wanted, then you can just keep asking for bits to be added or changed and it produces more code, that works.
If I were a software engineer I would be worried.
Until you realise writing code is maybe 10% of the job.Basically it came up with some working code in less time it took me to type in what I wanted, then you can just keep asking for bits to be added or changed and it produces more code, that works.
If I were a software engineer I would be worried.
Granted, AI can help in other ways but its certainly not the be all and end all.
Chances are there was some boilerplate code on a website you could use or would at least get you a good way there.
Im a director of SE, have loads of engineers working for me. None of us are particularly worried. AI can be useful, its good for cobbling together boilerplate stuff for POCs but it cant build enterprise level software, its nowhere near it. I use it for personal projects but find it frustrating.
The problem with it is its trained on the information available on the internet, most tutorials and info are very basic stuff, so yes it can compare and contrast a lot of ways of doing basic things and throw code together, but doesnt mean its any good. Ive seen it include 3rd party libraries that are out of date, not supported and riddled with vulnerabilities. Veracode did some research and found almost half the code it was asked to create introduced an OWASP Top 10 vulnerability, that sort of stuff makes some one in my position very nervous.
One thing I have been impressed with recently is Figma Make, ask it to design something and it throws together a design and some React code in minutes, great for rapid protyping stuff
The problem with it is its trained on the information available on the internet, most tutorials and info are very basic stuff, so yes it can compare and contrast a lot of ways of doing basic things and throw code together, but doesnt mean its any good. Ive seen it include 3rd party libraries that are out of date, not supported and riddled with vulnerabilities. Veracode did some research and found almost half the code it was asked to create introduced an OWASP Top 10 vulnerability, that sort of stuff makes some one in my position very nervous.
One thing I have been impressed with recently is Figma Make, ask it to design something and it throws together a design and some React code in minutes, great for rapid protyping stuff
Paul Graham
@paulg
The reason AI coding works so well is that the source code of the median app was already slop before LLMs.
I think this is the reason I'm finding it transformative. I'm guilty of cutting corners with dev costs, and AI is producing much better code than the cowboys I've worked with.
Not every business needs enterprise grade code with all the compliance that goes with it. I think AI will have the biggest impact in this middle ground and then work its way outwards.
@paulg
The reason AI coding works so well is that the source code of the median app was already slop before LLMs.
I think this is the reason I'm finding it transformative. I'm guilty of cutting corners with dev costs, and AI is producing much better code than the cowboys I've worked with.
Not every business needs enterprise grade code with all the compliance that goes with it. I think AI will have the biggest impact in this middle ground and then work its way outwards.
Same, here.
I have no coding aspirations but have used AI to create some apps that allow me to manipulate some files how i wanted to. PDF file conversion and formatting markup layers etc. It was surprising easy.
The thing for me is how quick it can generate the code. Im not generating commercial code so dont have to worry too much about security etc.
I have decided to try some prototypes in Rust, which is a bit of a step on from python but as an assistant I find AI invaluable and saves a lot of time.
The kicker for me is if AI coding is in its infancy now, what the hell is is going to be like in a decades time, probably worrying.
I have no coding aspirations but have used AI to create some apps that allow me to manipulate some files how i wanted to. PDF file conversion and formatting markup layers etc. It was surprising easy.
The thing for me is how quick it can generate the code. Im not generating commercial code so dont have to worry too much about security etc.
I have decided to try some prototypes in Rust, which is a bit of a step on from python but as an assistant I find AI invaluable and saves a lot of time.
The kicker for me is if AI coding is in its infancy now, what the hell is is going to be like in a decades time, probably worrying.
Edited by Hedobot on Saturday 11th October 08:56
lizardbrain said:
Paul Graham
@paulg
The reason AI coding works so well is that the source code of the median app was already slop before LLMs.
I think this is the reason I'm finding it transformative. I'm guilty of cutting corners with dev costs, and AI is producing much better code than the cowboys I've worked with.
Not every business needs enterprise grade code with all the compliance that goes with it. I think AI will have the biggest impact in this middle ground and then work its way outwards.
I agree, the middle ground will be where the impact is. The script kiddies and amateur coders will be buggered. Business will be able to have AI churn out some stuff that works well enough.@paulg
The reason AI coding works so well is that the source code of the median app was already slop before LLMs.
I think this is the reason I'm finding it transformative. I'm guilty of cutting corners with dev costs, and AI is producing much better code than the cowboys I've worked with.
Not every business needs enterprise grade code with all the compliance that goes with it. I think AI will have the biggest impact in this middle ground and then work its way outwards.
It's interesting the impact it will have. Demand for Software Engineers has generally always been greater than the supply and really good ones are very hard to find, and often are hard to manage bell-ends. I'm happy for AI to mature where we can trust it to pop out some usable code for simple stuff and we focus on the proper hard problems.
As long as you have an idea of the basic principles of coding and you are capable of breaking things down into sensible steps, you can use it to generate a lot of useful code, extremely quickly. It's a fantastic tool and can enable someone to multiply their productivity by a large factor. I used github copilot to code a bunch of utilities and tools in Python (a language I'd previously not used) a year or so back, it was pretty amazing how easy it made things. And that was before AI got good enough to write really large bodies of code from a prompt, I was more or less using it like an auto-complete, in VScode.
If you expect to be able to give a prompt 'Produce a full featured clone of MS Word in rust' then you are going to be extremely disappointed and are likely to be for a while.
However, I could foresee a future scenario where LLMs designed for systems analysis and design could instruct dedicated project manager LLMs to supervise dedicated code generation LLMs and testing LLMs to develop really large projects with a relative minimum of human input.
The point those who say that it can't fully replace a human coder frequently miss, is that if you can 5X programmer productivity you only need 1/5 the amount of coders to do a given job in a given time.
If you expect to be able to give a prompt 'Produce a full featured clone of MS Word in rust' then you are going to be extremely disappointed and are likely to be for a while.
However, I could foresee a future scenario where LLMs designed for systems analysis and design could instruct dedicated project manager LLMs to supervise dedicated code generation LLMs and testing LLMs to develop really large projects with a relative minimum of human input.
The point those who say that it can't fully replace a human coder frequently miss, is that if you can 5X programmer productivity you only need 1/5 the amount of coders to do a given job in a given time.
Lucas Ayde said:
The point those who say that it can't fully replace a human coder frequently miss, is that if you can 5X programmer productivity you only need 1/5 the amount of coders to do a given job in a given time.
Then the coders in 4/5th that no longer have anything to do take up hacking to make some money, not sure all this end that well.Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff