Live data from Hacker News

I'm tired of fixing customers' AI generated code

medium.com

241–250 of 345 posts

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

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

> 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. If you're surprised by reality, that says something about your mental model, not about reality. People don't want to "learn programming", they want to "make a thing". Some people learn programming while making a thing, but why learn about how…

> People don’t want to “learn programming”, they want to “make a thing”.

Hahaha, I wish that were true, but it’s not. Lots of people want to learn programming for learning and programming’s sake, or because programming is more lucrative than sausage making. I think I’ve worked with more programmers that care more about programming than the end result, than making something. It’s constantly frustrating and a huge source of over-engineering mistakes that have proliferated through engineering.

> why learn about how the sausage is made when all you want is to eat it?

Then why do sausages get made? It’s because not everyone only wants to eat them. There’s a variety of reasons people make sausages and also like eating them, from making money, to making high quality or interesting variety sausages, to being self-sufficient and not paying others for it, to learning about how it’s done. It’s been my experience that the more someone cares about eating sausages, the more likely they are to dabble in making their own.

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

#242
post #88

Earlier quoted context omitted.

A week is not anywhere close to enough to learn programming in any meaningful way for someone with no experience.

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 languages like python have so much ability embedded in them already. I kinda had to toss a lot of intuition and learn things new.

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

#243
post #60
post #55

I 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.

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.

I knew someone similar. They would just get free templates and sell them as a website to customers, with almost no changes, aside from logos and text. Most had no Javascript or css and looked terrible, even by 2005 standards.

His clients were usually older small business owners that just wanted a web presence. His rate was $5000/site.

Within a few years, business dried up and he had to do something completely different.

He also hosted his own smtp server for clients.It was an old server on his cable modem in a dusty garage. I helped him prevent spoofing/relaying a few times, but he kept tinkering with the settings and it would happen all over again.

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

#244
post #55

I 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…

Wait until a manager who's evaluating a technical decision you're making copies and pastes ChatGPT's "analysis" of your proposal and asks you to respond to it.

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

#245
post #60
post #55

I 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.

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"

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

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

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.

The expectation of „quickly gain“ is the problem.

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

#248
post #141

Earlier quoted context omitted.

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.

    for line in f:
is multiple mistakes in a single line.

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

#249
post #60
post #55

I 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.

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.

At least AI comments their code.

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

#250
post #55

I 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.

And any decent IDE will highlight a variable that is declared but unused. We already have "artificial intelligence" in the form of IDEs, linters, compilers, etc. but some people apparently think we should just throw it all away now that we have LLMs.

Unless you're using Python and said variable was meant to be reassigned, but you used a different name instead. E.g. file_name = 1 filename = 2
Post reply on HN