I'm tired of fixing customers' AI generated code
321–330 of 345 posts
Re: I'm tired of fixing customers' AI generated code
#322Someone mentioned "hallucination-based API design" on twitter (I cannot find it now). It's designing API by LLM hallucination. If there is a common hallucination API call, just add that API. This will make the API more "friendly" and resemble common similar APIs. Considering that LLM can hallucinate in different ways unpredictably, not sure whether it will work in practice.
Also commonly referred to as the robustness principle; “be conservative in what you do, be liberal in what you accept from others“. An approach that is now considered an anti-pattern, for such future compatibility reasons.
Re: I'm tired of fixing customers' AI generated code
#323I had a related episode at work when my coworker asked me why his seemingly trivial 10 line piece of code was misbehaving inexplicably. It turned out he had two variables `file_name` and `filename` and used one in place of another. I asked him how he ended up with such code, he said he used copilot to create it. Using code from a generative AI without understanding what it does is never a good idea.
We hired a new guy at work. In one of his first tasks he had chosen to write some bash, and it was pure nonsense. I mean it contained things like: if [ -z "${Var}+x" ] Where I can see what the author was trying to do, but the code is just wrong. I dont mind people not knowing stuff, especially when it's essentially Bash trivia. But what broke my heart was when I pointed out the problem, linked to the documentation, b…
It is not nonsense. You use that expression if you want to check if a variable exists or not (as opposed to being set to an empty string) which is an extremely common problem.
Re: I'm tired of fixing customers' AI generated code
#324Earlier quoted context omitted.
And then the customers will open support requests for code generated by an AI that misuse that very SDK. It doesn't look like OP's issue is with the code per say, only with the lack of skills of its customers, regardless of the code they write...
I don't really know how to point this out without sounding rude and obnoxious, which is not my intention, but it's "per se" (Latin for by itself), not "per say".
Re: I'm tired of fixing customers' AI generated code
#325Earlier quoted context omitted.
And this is why people continue to do it. And at that, with such a discrepancy, why not? Proof of concept, you know if it adds value and makes money, enough money to pay $20k.
I think the missing proof point is whether companies would fork out the extra $19,700 once they understand the actual cost.
Re: I'm tired of fixing customers' AI generated code
#326Earlier quoted context omitted.
We hired a new guy at work. In one of his first tasks he had chosen to write some bash, and it was pure nonsense. I mean it contained things like: if [ -z "${Var}+x" ] Where I can see what the author was trying to do, but the code is just wrong. I dont mind people not knowing stuff, especially when it's essentially Bash trivia. But what broke my heart was when I pointed out the problem, linked to the documentation, b…
https://stackoverflow.com/a/13864829 It is not nonsense. You use that expression if you want to check if a variable exists or not (as opposed to being set to an empty string) which is an extremely common problem.
But I agree I wouldn't extrapolate too much from one such brain fart
Re: I'm tired of fixing customers' AI generated code
#327Earlier quoted context omitted.
fair point again. i dont think this is the way to go in either case. of your api is easy to clearly document its good. if you struggle with that, a programmer trying to call it will also. regardless of what an LLM makes of it. it seems like trying to facilitate bad things. make good things instead.
> of your api is easy to clearly document its good If it breaks a lot of conventions or norms, no it's probably not good. But also the point here is *how much do you need to really explain?". If you have apis that require a lot of re-explanation to llms to force them to do the right thing "no getUsers doesn't exist use users(filter) where... YOU MUST USE users(filter)!" That's a sign your API might be going counter t…
That being said, its not always the case and you are right, 'make something good' is a bad advice, essentially it's not advice at all.
I would say as advice - don't do something alone if you want others to use it. Try to get feedback as early as possible from people you trust, and from people you'd expect to be your consumers/users. And always listen to that advice, don't throw it into the wind. I think that's the best advice if you want to make something 'successful', because the label of successful ultimately will be granted to your product by your users, not yourself.
Sorry to put a 'bad advice' if it was taken as advice :-). I don't mean to make bad things even in advice ^^.
Re: I'm tired of fixing customers' AI generated code
#328Earlier quoted context omitted.
programs call apis.
This is the silliest argument I write API calls. I am a user of apis. If you want to be more pedantic than this I simply do not care and you should evaluate what benefit you are bringing to this conversation.
- sorry if the comment was too silly. i'll try to keep it for myself.
Re: I'm tired of fixing customers' AI generated code
#329Earlier quoted context omitted.
Until I decided to start "reinventing the wheel" and just not using abstractions from popular libraries and frameworks I really struggled to actually understand what is happening. I feel like a week isn't anywhere near close enough but depending on what you want to do it gets you to start tinkering. Ironically I do wish that I had started working on embedded with microcontrollers than starting with web purely because…
Ironically I learned programming by playing with microcontrollers, which I got into through learning about electronics. So I had a really true "ground up" learning experience, starting with embedded C (not machine code, I wasn't that hard). I did a number of projects on AVR's and got decent at writing programs. When moved on to writing PC programs, I struggled so much because everything is so heavily abstracted and l…
Re: I'm tired of fixing customers' AI generated code
#330Annoying, but a good way to weed out bad customers. Life’s too short to deal with people who feel this entitled.