4 ms·
I agree. One of the engineers on my team came to me with a script (maybe 20 lines of bash) like "hey isn't it cool that I got ChatGPT to generate this?" and af
by rjbwork 4y ago
I agree. One of the engineers on my team came to me with a script (maybe 20 lines of bash) like "hey isn't it cool that I got ChatGPT to generate this?" and after studying it for a few minutes I was like "it is cool, but now spot the bug". It was near the end of the day so I asked them to follow up with me in the morning after they'd found and fixed the bug.
I ended up having to point it out directly the next day. It was a spurious -A NUM argument that would, in a production scenario, cause it to recognize valid data as invalid because the full context of the data would be missing.
All this to say, it is a very useful tool, but we should be highly suspicious of its output, and really make sure we understand what it's giving us. The ability to read and mentally parse and execute code will become extremely important, and give people with that ability a leg up.
- boringuser2 4y agoGive me the snippet and I guarantee I can get GPT-4 to identify the bug with no hints and minimal prompting.
- 8n4vidtmkvmk 4y agoit often works if you yourself can spot the bug, you can coax it to fix it but if you don't know it's there...
- int_19h 4y agoWith GPT-4, quite often, if you just ask it to review its own result for correctness, it'll spot the issue without further prompting. So you can just always ask that, although then you risk dealing with hallucinated non-bugs.
- deleted 4y ago[deleted]
- rjbwork 4y agoI won't do that...but I will try it myself. Give me a few. EDIT: Well I'll be damned. "However, there is a bug in the script as it only checks for the tags attribute in the first 10 lines of the resource block using the grep -A10 command. "
- boringuser2 4y agoIt takes GPT-4 perhaps 25-30 tries on the API to help me write an entire class with complex functionality, including testing, correcting and asking for new output. Sometimes, it can one-shot the problem. Gonna go with Carmack and say that "hand-coding" isn't going to last. Another thing it can do is reliably debug a file, or point me in the right direction, if I explain the bug and provide the code. It's scary as hell because I can reliably assume that it will always understand the nuance to the content I provide.
- dizhn 4y agoHow do you interface with gpt4? Using chatgpt free mode (so gpt3.5) when i try to have it reitarate it usually changes the whole approach after a while. One example is when writing a CI file it starts with a node image but later while fixing something unrelated it switches to an alpine image.
- noduerme 4y ago> The ability to read and mentally parse and execute code will become extremely important Scarily, it'll probably become more scarce at the same time. It's a lot easier to parse code in your head when you're writing it every day from the ground up. Even a couple weeks away from your own code makes it harder to follow, no matter how well commented it is. Working with other people's code is always an order of magnitude harder, but there's an unspoken trust that they at least put their mind to it and tested it against the tasks it was supposed to perform. Reading mostly-AI-generated code to spot bugs could be a specialty indeed, but it's one perfectly adapted to black hat hackers.
- boringuser2 4y agoCommented?
- noduerme 4y ago//explain what I mean : No. //damn you, explain why I wrote this code. : Who knows, meat dummy?
- boringuser2 4y agoHonestly, I feel that the code I write is self-documenting unless there's an obscure gotcha that necessitates a comment.
- ChatGTP 4y ago…hint the code you write yourself is not self-documenting. Signed, yourself from the future.
- noduerme 4y agoTrust me, if you're lucky enough to get to sharpshoot your own code and refine it every couple years, you really want as many comments as possible to get you into the headspace you were in when you reduced it the first couple times. If its logic is still readable without any comments, then it probably isn't very dense code. I go back and look at shit I wrote ten or fifteen years ago and feel like it was written by a super intelligent alien. The again, I feel a weak version of that when I look at code I wrote last month. So yeah, commenting
- 8n4vidtmkvmk 4y agomy friend asked it a c++ question and it produced a smart sounding answer and syntactically valid code but utterly wrong. i think it just borrowed semantics from other languages. but it gave him the answer he was hoping for so he bought it.