Live data from Hacker News

I'm tired of fixing customers' AI generated code

medium.com

221–230 of 345 posts

Re: I'm tired of fixing customers' AI generated code

#221
As the author says, the errors are very easy to fix. Easy enough for GPT! He should set up a support chatbot. Only seems fair? ;)

I'm half joking, but in most cases I found that GPT was able to fix its own code. So this would reduce support burden by like 90%.

I hate chatbot support as much as the next guy, but the alternative (hiring a programmer to work as a customer support agent on AI generated code all day?) sounds not only cruel, but just bad engineering.

Re: I'm tired of fixing customers' AI generated code

#222
post #221

As the author says, the errors are very easy to fix. Easy enough for GPT! He should set up a support chatbot. Only seems fair? ;) I'm half joking, but in most cases I found that GPT was able to fix its own code. So this would reduce support burden by like 90%. I hate chatbot support as much as the next guy, but the alternative (hiring a programmer to work as a customer support agent on AI generated code all day?) sou…

I’ve found that it’s often able to fix its own code when I’m able to understand that problem and state it clearly. On its own, it tends to just go in circles and proudly declare that its solve the problem, even though it hasn’t. It needs a knowledgeable person to guide it.

Re: I'm tired of fixing customers' AI generated code

#223

Earlier quoted context omitted.

At least for me stupid bugs like this turn out to be some of the most time wasting to debug, no AI involved. Like accidentally have something quoted somewhere, or add an 's' to a variable by accident and I may not even correctly process what the error message is reporting at first. Always feel a bit silly after.

These kinds of problems are often avoidable by linters or asking ChatGPT what is wrong, though I was just tearing my hair wondering why TSC_COMPILE_ERROR wasn't skipping TypeScript because I spelled it TSX_COMPILE_ERROR in my environment variable.

Not only asking ChatGPT what is wrong, but also using an agent which does self-reflection by default. I'm sad every time I see people using the bare chat interface to generate code. We've got API tools which are so much better at it today. Use Aider at the very least.

Re: I'm tired of fixing customers' AI generated code

#224

Earlier quoted context omitted.

I read a "Teach yourself $language in 10 days" book in a weekend, and was banging code on Monday to create the first v0.1 in a week. Of course the code was absolutely horrendous, but it worked. I still have a copy of that old database that was used, and over the years, I have turned to it as I've learned new things and have even rewritten the UI a couple of times. It has helped me stay up to date with new trends as i…

Perhaps you're a genius then. I am quite sure most people who have only learned programming for one weekend would write much worse code than ChatGPT.

What part of "the code was horrendous" did not click with your sentiment? It was horrible. The entire database was one table. Every SQL query was a SELECT *, and filtered everything downstream in the code rather than WHERE. It was absolutely horrible code that I am shocked actually worked with any kind of speed that actually felt responsive. Of course I didn't have millions of records, but the fact that it worked at all was encouraging enough to me that I'm still doing it to this day in the same language. Only now I've been doing it for 20+ years and I'm much less embarrassed about my code, or maybe more. At least back then I could use "I'm a beginner" as an excuse.

Re: I'm tired of fixing customers' AI generated code

#225
post #141

Earlier quoted context omitted.

Show me 1 example.

There's more than one mistake in the code given, and I tried just once. "Create Python code for iterating a file with a cache." class CachedFileIterator: def __init__(self, file_path): self.file_path = file_path self.cache = [] # List to store cashed lines self.current_index = 0 # Index for the current line to read def _read_lines_from_file(self): """Read lines from the file and cache them.""" with open(self.file_pat…

What do you see as mistakes? I see some weirdness, but the spec is just not complete - there was no requirement for rewinding, multiple users, etc. in the request so it's not implemented.

The only thing I'd call an actual mistake is using an empty list to mean both an empty file and an uninitialised value.

Re: I'm tired of fixing customers' AI generated code

#226

Earlier quoted context omitted.

I think you overestimate the amount of skill a newb can quickly gain on their own. I taught myself to code, but it took a whole summer (aka free time that adults don't get) and I had access to my dad (who was a software engineer himself) to answer lots of questions.

I've been programming since I was 4 years old but with literally zero resources or assistance beyond "take books out from the library" for 20 years. It wasn't until I was about 28 until I had the chops to get into the industry (largely down to never having a need or opportunity to learn SQL -- also I mean as a developer, I had a prior career in IT) and even then it wasn't until I was 31 before I had the confidence en…

Sorry, are you saying it takes 20 years for a self-taught developer to learn enough programming, especially when they start as kids? No offense, this is a you problem.

I dabbled with PCs since I was 8, around 14 I had enough brain to start to understand BASIC and enough free time to get good enough to write half a decent mini OS by the time I was 17 [1] and got my first paying job (sysadmin and PHP dev) at 19. I'm 37 now.

All you need is free time and being interested enough in the subject matter. And kids learn 10x as fast as adults anyway.

Not sure why you are trying to discourage people from learning on their own based on your time line.

1: https://github.com/1player/klesh

Re: I'm tired of fixing customers' AI generated code

#227
post #186

Earlier quoted context omitted.

> Ah, sorry, totally didn't get that it was using them as users of the API. Originally, it wasn't. From the GP post: > If there is a common hallucination API call, just add that API. This will make the API more "friendly" and resemble common similar APIs. If it's just users, you wouldn't be adding the APIs.

Users were calling their API.

programs call apis.

Re: I'm tired of fixing customers' AI generated code

#228
post #184

Earlier quoted context omitted.

Ah, sorry, totally didn't get that it was using them as users of the API. I would recommend API fuzzers here, which cycle through all available possibilities, and generate 'garbage' inputs as well as structured inputs regarding the specifications the APIs implement (http, and the underlying structures provided to the api endpoints). an LLM would likely not perform an exhaustive test. There are several projects freely…

I think you're picturing this differently again. It's not testing the API for bugs, it's asking whether the API you have follows typical norms and isn't missing things. Is your API confusing or incomplete ? Imagine you have a library dealing with chat rooms, and LLMs keep trying to call "room.getUser(id)" and "room.getUsers()" when your API is actually "room.user(filter:{id:id})[0]" and "room.user(filter:None)". Mayb…

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.

Re: I'm tired of fixing customers' AI generated code

#230

Earlier quoted context omitted.

These kinds of problems are often avoidable by linters or asking ChatGPT what is wrong, though I was just tearing my hair wondering why TSC_COMPILE_ERROR wasn't skipping TypeScript because I spelled it TSX_COMPILE_ERROR in my environment variable.

Not only asking ChatGPT what is wrong, but also using an agent which does self-reflection by default. I'm sad every time I see people using the bare chat interface to generate code. We've got API tools which are so much better at it today. Use Aider at the very least.

does aider have an executable installer yet? i tried installing it but the python experience is terrible. last time i messed with python installs on my mac everything worked like shit until o reinstalled the OS.
Post reply on HN