Only sorta related, but now I have an excuse to tell my anecdote…
One job ago I had a manager who decided that he would convert some of our helper scripts from bash to Python for reasons. I was new there and so didn’t realize what he was doing, or that he had started the process just as I was going through orientation. However, I ended up being the reviewer for the PR.
This was the worst Python I had ever seen but in such odd ways and it mostly worked. It almost felt like it was written by someone who knew bash really well but had never learned any other languages, or thought that bash was just so damn good that he wanted to turn every other language into it. For example, instead of using argparse he was manually looping through argv and parsing them one at a time. And instead of using a standard foreach in foo loop, there were index variables and while loops. And certainly there were no comprehensions or any understanding of the basic built in data structures other than using lists as arrays.
So I did a review, assuming that this person was just really new to python and tried to gently coach him towards basic Pythonisms. His response was: “Oh yeah, I just ran them through ChatGPT and assumed it was all ok.”
Yeah, that’s kind of my least favorite part about the existence of LLMs. Before, when someone wrote some code, there was a non-zero chance that they understood what they were doing and that the code is at least sane on a basic level. If they did some complex shit or even just wrote rather verbose code, you could be reasonably certain that they tried something simpler first.
Now, all of those assumptions are out the window. The biggest dumbass can generate code that looks alright at first glance and if you have to review it, you really don’t know how to interpret it or how much to explain when you find fairly obvious mistakes.
Only sorta related, but now I have an excuse to tell my anecdote…
One job ago I had a manager who decided that he would convert some of our helper scripts from bash to Python for reasons. I was new there and so didn’t realize what he was doing, or that he had started the process just as I was going through orientation. However, I ended up being the reviewer for the PR.
This was the worst Python I had ever seen but in such odd ways and it mostly worked. It almost felt like it was written by someone who knew bash really well but had never learned any other languages, or thought that bash was just so damn good that he wanted to turn every other language into it. For example, instead of using
argparse
he was manually looping throughargv
and parsing them one at a time. And instead of using a standardfor each in foo
loop, there were index variables and while loops. And certainly there were no comprehensions or any understanding of the basic built in data structures other than using lists as arrays.So I did a review, assuming that this person was just really new to python and tried to gently coach him towards basic Pythonisms. His response was: “Oh yeah, I just ran them through ChatGPT and assumed it was all ok.”
I quit about two months later.
Yeah, that’s kind of my least favorite part about the existence of LLMs. Before, when someone wrote some code, there was a non-zero chance that they understood what they were doing and that the code is at least sane on a basic level. If they did some complex shit or even just wrote rather verbose code, you could be reasonably certain that they tried something simpler first.
Now, all of those assumptions are out the window. The biggest dumbass can generate code that looks alright at first glance and if you have to review it, you really don’t know how to interpret it or how much to explain when you find fairly obvious mistakes.
Thats sounds a lot like C, in bash you cans also do
for item in list; do echo $item; done
That twist at the end. Bloody hell.