Live data from Hacker News

I'm tired of fixing customers' AI generated code

medium.com

231–240 of 345 posts

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

#231
post #23
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…

> You see this all the time in the more newbie-friendly game engine games tend to attract young people (read: beginners) but at the same time game programming's barrier to entry is pretty high with maths & physics, low-level graphical programming, memory management, low level language and dependencies, OOP... It's almost obvious that this should be the case, every kid who's interested to coding I talked to wants to d…

This is not the case any more and have not been for a very long time. There are plenty of game engines, and some of them are specifically targeting beginning game devs and abstract a lot of that stuff in really high level concepts that require no much more from the developer than some really basic arithmetics and geometry intuition.

In fact, there are so many beginner-friendly gaming engines out there for most languages, that I am convinced that we should start using games as the entry-point for teaching programming languages. It is a beatifully self-contained domain.

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

#232
post #144

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

And you didn't sack him?

I don't have hiring privileges. Either way. I like the guy, and I'd rather work to build him up. That doesn't mean it's not frustrating, but I have a process that seems to build a pretty good culture.

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

#233

Earlier quoted context omitted.

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.

    python -mvenv aider
    aider/bin/pip install aider-chat
    aider/bin/aider
And you're done. There's also a docker version https://aider.chat/docs/install/docker.html

Just don't mess with the system-wide installed version of python and it will be fine. This isn't a python specific issue though.

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

#234

I've been saying for a while now that there's an absolute gold mine waiting for people who want to specialize in fixing AI generated applications. A lot of businesses are going to either think they can have generative AI create all of their apps with the help of a cousin of the wife of the accountant, or they unknowingly contract a 10x developer from Upwork or alike who uses generative AI to create everything. Once t…

>I've been saying for a while now that there's an absolute gold mine waiting for people who want to specialize in fixing AI generated applications.

The real savvy ones will use later generations of LLMs to fix the output of early ones

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

#235
post #226

Earlier quoted context omitted.

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…

wow its crazy that different people have different experiences

(as it turns out, writing code for yourself is a different skillset than writing code for a boss!)

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

#236

Earlier quoted context omitted.

Some people forget how easy programming can be when you know nothing and just try stuff to see what works. Working in a procedural manner with everything in a global scope is simple to get stuff working. Not everything has to be extrapolated out into namespaces, functions, classes. It's nightmare code to maintain later, but going from blank page to working code is totally possible. I think sometimes we forget not eve…

I agree with you. In the 2000s, what you describe was normal for Excel/VBA. The trick to learn VBA from nothing, was to use the macro recorder, then slowly modify the code. And, arguably, Excel formulas was/is functional programming.

I learned C by using gcc directly and Python by using IDLE. Both with single file project. The actual software engineering can take time, but simple projects are very easy for beginner to reason about. Everyone can build a shed, it’s building a house that requires professional expertise.

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

#237
Seems to me like you have an opportunity to develop a couple SDKs in your customers' favorite languages (probably python and typescript) and a simple "Get Started" template that could alleviate a lot of these requests. Show them the base case, let them figure out how to work with your api via an SDK instead of directly with an API and let the advanced users build their own SDKs in whatever language they prefer. Since its, as OP claims, a simple HTTP API, the SDK could be generated with OpenAPI client generation tools.

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

#238

Seems to me like you have an opportunity to develop a couple SDKs in your customers' favorite languages (probably python and typescript) and a simple "Get Started" template that could alleviate a lot of these requests. Show them the base case, let them figure out how to work with your api via an SDK instead of directly with an API and let the advanced users build their own SDKs in whatever language they prefer. Since…

Seems like a good way to have a bunch of new products to also support

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

#239
post #238

Seems to me like you have an opportunity to develop a couple SDKs in your customers' favorite languages (probably python and typescript) and a simple "Get Started" template that could alleviate a lot of these requests. Show them the base case, let them figure out how to work with your api via an SDK instead of directly with an API and let the advanced users build their own SDKs in whatever language they prefer. Since…

Seems like a good way to have a bunch of new products to also support

Maintaining an OpenAPI spec when you make changes to your API and regenerating the client SDKs through CI is really not a ton of extra work. A template to show a dead simple usage of your API can pay dividends as it lowers the barrier to a customer adopting your product over a competitor's.

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

#240
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.

In my experience this is exactly the kind of mistake an AI would not make.
Post reply on HN