5 ms·
You do have to know what you are doing well enough already to get good code from ChatGPT. Much like with a lot of inexperienced, and unfortunately far too many
by ksaj 4y ago
You do have to know what you are doing well enough already to get good code from ChatGPT.
Much like with a lot of inexperienced, and unfortunately far too many experienced programmers, you'll get exactly what you ask for - nothing more, nothing less. So if you don't ask for security controls, you won't get security controls.
If you point out in your description what needs controls, you'll get a reasonable attempt at implementing what you've described. You still need to understand the output code enough to know whether you explained those controls clearly enough. Or just update the code manually yourself, akin to pair programming. That also works.
To be fair, this is a lot like reality. I have never seen a shop that doesn't produce insecure code unless you keep on top of them for proper implementation of security controls from the planning on up.
- thefz 4y ago> You do have to know what you are doing well enough already to get good code from ChatGPT. Exactly. The fact that lots of inexperienced programmers who lack the critical thinking and code review abilities will copy-paste what GPT is creating as is, is horrifying.
- hammyhavoc 4y agoIt's really no different from people copy-pasting from forums or StackExchange. Same shit people have done for decades, new source of danger.
- ksaj 4y agoOld wine in new bottles. Blaming ChatGPT doesn't make sense, when no real coder would cut/paste code from anywhere, let alone unvetted code from a bot.
- hammyhavoc 4y agoIf anything, people heavily leaning on ChatGPT for coding are outing themselves as likely having been an inappropriate hire for their position if they're impressed with what it can do and find it useful. That's a strong take, and I know there will be very clever folks out there who make use of it who can apply common sense, but I think the majority of users have a strong Dunning-Kruger complex. I'm very unimpressed with ChatGPT as a tool for any kind of dev, and I largely consider myself to be a hack versus a lot of folks. I've mentioned it before on HN, but with all the hype for ChatGPT, I wasted days trying to get it to spit out a correct NGINX config based on documentation fed to it. Hallucinated functionality that wasn't there, didn't implement URL rewrites correctly, and was just a colossal waste of time versus just doing it properly from scratch. Validating its output is much slower than just not using it and writing things manually IME. Same goes for asking it for methods to export data from one program and import it into another, hallucinating all kinds of menu functionality that isn't there, commands that don't exist, and not considering file and format incompatibility. Whatever people are using it for must be incredibly basic, but I don't know what could be more basic than an NGINX config. I can't even get sensible Home Assistant stuff out of it. I can't believe people are asking ChatGPT anything instead of just reading the documentation when it can hallucinate some complete and utter garbage.
- thefz 4y agoExcept it's now turbocharged.