Live data from Hacker News

I'm tired of fixing customers' AI generated code

medium.com

281–290 of 345 posts

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

#281
post #157

Earlier quoted context omitted.

There are signs of a decline in people asking and answering questions on sites like stack exchange: https://meta.stackexchange.com/questions/387278/has-stack-ex... So I hope you're right, but the evidence is currently that you're wrong. Let's see how it plays out, I suppose.

- Which might be a different matter: of specifically SE declining. (A very different, and long-running, tragedy, but one that began long before the current AI boom and prompted by very different, non-technical issues.) - That said, surely traffic will decline for Q&A sites. "How do I connect tab A into slot B" is something that people are likely to query LLMs for; the response will surely sound authoritative, and cou…

But what happens with the next generation of questions? The reason LLMs can answer how to right-align a paragraph in HTML is at least in part because it has been asked and answered publicly so many times.

Now imagine that HTMZ comes along and people just go straight to asking how to full justify text in HTMZ for their smart bucket. What happens? I doubt we’ll get good answers.

It feels like the test of whether LLMs can stay useful is actually whether we can stop them from hallucinating API endpoints. If we could feed the rules of a language or API into the LLM and have it actually reason from that to code, then my posed problem would be solved. But I don’t think that’s how they fundamentally work.

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

#282
post #60

Earlier quoted context omitted.

I knew a guy that made a good living as a freelance web developer decades ago. He would pretty much just copy and paste code from tutorials or stack overflow and had no real idea how anything worked. Using code without understanding it is never a good idea, it doesn’t need to be from AI for that to be true.

>a guy that made a good living ... never a good idea Arguably the term for a bad idea that works is "good idea"

Or maybe "good" and "bad" aren't useful descriptors in this context.

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

#283

I can empathize, but am also wondering if some of these are feature requests in disguise. For “how to call api” docs, sample code, and even client libraries can be generated from your OpenAPI specs. Link to the docs in every reply. The more complex asks could be translated “build this endpoint and charge me for it”. If all else fails, set up partnership with devs who want to fix/build customers crap and figure out so…

Agreed, client libs and sample applications have fallen by the wayside and could provide a solution here. It makes it very obvious to the customer when they download and run something that works, and then their changes break it, that the issue is with their changes.

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

#284
post #60

Earlier quoted context omitted.

I knew a guy that made a good living as a freelance web developer decades ago. He would pretty much just copy and paste code from tutorials or stack overflow and had no real idea how anything worked. Using code without understanding it is never a good idea, it doesn’t need to be from AI for that to be true.

>a guy that made a good living ... never a good idea Arguably the term for a bad idea that works is "good idea"

There are plumbers who make a living but whose work results in leaks in people's homes. They're making a living, but I don't consider the way they work "a good idea".

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

#285
post #134

Earlier quoted context omitted.

You are getting downvoted but you are right, a typo in a variable that already exists in a file like this is not the failure mode for LLMs. The failure mode is logic bugs, making up methods / functions.

No, you can get variable names "mutated" on follow up requests. The thing is like sculpting with toothpaste.

I've been using copilot for as long as it has existed and what you are describing has not happened to me once. Literally on in the background 8 hours a day. Excuse me for not trusting the internet hivemind that hates everything that is hyped just a little bit.

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

#286

Earlier quoted context omitted.

Copilot wouldn't make a typo. He just made that up and / or broke the code himself.

would someone invent that and bother the author with that? I mean I suppose it's possible, but that seems like such a waste of time to me that I find that more unlikely. and while it's a typo, it's not fleinaem or something that's totally wrong, just a choice in breaking up the word filename. having written file handling code, the various permutations of filename and path and dirname get to be a bit much sometimes.

People are unhinged about AI so yes I think someone would invent a scenario like this for internet points

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

#287

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…

Similar experience, except I have never worked professionally writing software as my primary task. I've always stayed in operations/systems roles or other periphery roles, and now am a PM. I am constantly amazed at how many "senior" engineers actually have no understanding about how a computer actually works. Once I went corporate I moved up the ranks on the systems side of things very fast, and was widely regarded as one of the best engineers in the company everywhere I went, and yet I can see absolute chasms in my knowledge and really try to ensure I identify SMEs I can work with to overcome my own gaps. It is really shocking though how little most working engineers actually understand about technology.

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

#288
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…

[dead]

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

#289
post #184

Earlier quoted context omitted.

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.

> 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 to a broad estimation of existing code.

> it seems like trying to facilitate bad things. make good things instead.

I have seen so many people make something that is obvious to them and so few others that "simply write good things from the start" is pointless advice.

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

#290
post #3

I'm always a little surprised at how many people out there want to develop software yet haven't put in the effort to gain even the most basic computer nerd programming chops. You see this all the time in the more newbie-friendly game engine communities. Maybe you don't want to pursue a career in software, but anyone can spend a week learning Python or JavaScript. I suspect/hope a lot of these people are just kids who…

Seems like the natural progression from end goal to breaking it down into the smaller and smaller pieces required to see the goal through, as people have always done.

Before LLMs you'd probably have to reach for learning Python or Javascript sooner, at least if StackOverflow didn't have the right code for you to copy/paste, but I expect anyone who sticks with it will get there eventually either way.

Post reply on HN