Please, do not generate code using AI then ask an actual programmer to fix it.

I've been away from the support forum, but I recently learned that this has become more common practice. For those who do, you can stop right now.

To make this matter simple, it is almost a similar reason why some programmers just refuse to fix someone's code such as bug fixing or making a compatibility patch. A code to solve a particular problem can be written in many ways. So, to fix someone's code, we have to understand people's way of thinking and how it becomes code. While outside, it looks like it works, under the hood, it has a certain implication depending on how the code is written. These implications are what the programmers are for.

As bad as someone's code can be, it was a thoughtful process. Even as "I don't know I got this from here and the code breaks if I remove it". Maybe we can help you understand that part.

Now replace "someone's code" with AI, if you generate the code using AI, you are not trying to learn. You're just trying to find a quick way to skip the critical process. Some generated code might even write a function call that does not exist (they do not understand the context of the code), no real human would do this except if they are making a pseudocode (which is not a code that is ready to run).

If you start asking an actual programmer to fix the code without admitting that you're using AI, they will start to ask every line that you "write", why you decide to write that way and what you're trying to achieve, or even asking "where this function comes from?". As soon as you are unable to defend yourself, you start admitting that it was from AI, then it just shows that you don't want to learn.

Unlike AI art (in which you can dismiss any anomaly from generated art unless you really pay attention to the detail), code is meant to decide how the machine runs. So, precise detail on how the code is written is important (and why people paid us for this).

So, what can you do?

If you want to learn:
Do: Learn from the proper source. Ask what you don't understand.
Don't: Ask AI to generate code and ask us to explain what it does.

If you want to request:
Do: Describe what you want in as detail as possible including what plugin you have.
Don't: Ask AI to generate code and ask us to fix it without explaining what you want.

Don't get me wrong, AI code can be useful, but the usefulness of AI can only be used by actual programmers. So, in the case you're lazy to write some codes, ask AI, then you can fix it themselves if you already know the context and how to fix it. It isn't meant for non-programmers.
I will readily sign my name to this as well. If this is the future of programming I want no part of it.
I think people can ask if they want... You don't have to answer if you don't want to.

That being said, I don't think it is a smart move. Even if you have decent javascript knowledge. When you create code like a plugin or a formula, it is just too important to know what it does, how it does what it does, and why it does it the way it does it.

Those details are just too easy to miss when you let someone else write your code, specially if that "someone" is an AI.
I think people can ask if they want... You don't have to answer if you don't want to.

That being said, I don't think it is a smart move. Even if you have decent javascript knowledge. When you create code like a plugin or a formula, it is just too important to know what it does, how it does what it does, and why it does it the way it does it.

Those details are just too easy to miss when you let someone else write your code, specially if that "someone" is an AI.
They can ask if they want, sure, but I don't see the point in it. Generating your code via AI has three possible outcomes:

1) you understand enough code to analyse and fix it
2) you don't understand enough code to analyse and fix it and post on the forums for help
3) you don't understand enough code to analyse and fix it, so you accept that you can't use the plugin

The thing with 2 is that it's functionally identical to having just come here in the first place and gone "I want a plugin that does X, could anyone help me write one?" except we can answer that by starting from scratch with our own styles instead of trying to parse whatever the AI churned out and shoehorning a solution in that fills the holes in it.

And with 3 there was just no point in generating the code in the first place.
The thing with 2 is that it's functionally identical to having just come here in the first place and gone "I want a plugin that does X, could anyone help me write one?" except we can answer that by starting from scratch with our own styles instead of trying to parse whatever the AI churned out and shoehorning a solution in that fills the holes in it.
Sometimes a fix is simple and easy. Bugs are not always complicated and hard to solve. 😛 In fact, most bugs I encounter are just stupid little mistakes.

Don't get me wrong, I am not a fan of AI making our codes or art or anything. I love the idea of AI, but not as a creator.
If you start asking an actual programmer to fix the code without admitting that you're using AI, they will start to ask every line that you "write", why you decide to write that way and what you're trying to achieve, or even asking "where this function comes from?". As soon as you are unable to defend yourself, you start admitting that it was from AI, then it just shows that you don't want to learn.
I experienced this a few days ago. I was trying to help by asking about some of the choices that were made - the user claimed it was badly spliced-together code from different sources, but some of it was so nonsensical that I strongly believe it was AI-generated and they didn't want to say.

(especially since some of the things I was asking about were idiosyncrasies I've never seen in anyone's RPG Maker plugin, so I don't know where it could've been spliced from)

2) you don't understand enough code to analyse and fix it and post on the forums for help

The thing with 2 is that it's functionally identical to having just come here in the first place and gone "I want a plugin that does X, could anyone help me write one?" except we can answer that by starting from scratch with our own styles instead of trying to parse whatever the AI churned out and shoehorning a solution in that fills the holes in it.
Exactly. As I pointed out earlier today, the effort it takes to examine a piece of AI-generated code that we know doesn't work is close to what it takes to just write it. Just post the request in the first place.
Sometimes a fix is simple and easy. Bugs are not always complicated and hard to solve. 😛 In fact, most bugs I encounter are just stupid little mistakes.

Don't get me wrong, I am not a fan of AI making our codes or art or anything. I love the idea of AI, but not as a creator.
I should have clarified that that's a *possible* situation we find ourselves in, not one that always happens. I know sometimes the bugs are simple, but if I'm refusing to assist with this stuff on principle, I can't make exceptions for the ones that don't take long.
I experienced this a few days ago.
This was my reference actually 😛
As long as people are upfront about the fact it's AI generated, I see no harm in them asking. There's a good chance that I won't help, but I mean, it doesn't harm me in any way, since I've got free will and can easily ignore threads that I don't want to participate in.

But people definitely should be upfront about it being AI generated, so that other people can make an informed decision about whether or not they want to help.

The reason I don't help with AI generated code isn't because I have anything against it. It's simply because if I'm going to expend the effort to wrap my head around someone else's code, it's so that I can help the person that wrote it learn. But if you generated the code with AI, then you probably don't have the desire or necessary context to learn, so I don't consider it a worthwhile endeavor for me to help.
@ATT_Turan Don't know which thread you're talking about specifically, but I have seen this a few times. The "Oh, I used AI, LOL." 8 posts later.
I had taught people how to event, and I had people who had no interest in learning eventing ask for help, and so here is my view about the whole they-dont-want-to-learn stuff.

All I need, as the helper, is to know what they want their system to do whether it be eventing or coding. Unless it's something major, I can't care any less. If they want to learn, then I will teach, but I'm not going to be like "well, since you don't want to know why this solution works, I'm not going to give the solution" because that gets in grey territory.

For example, if someone asks how to make Script X and Y compatible because they want both scripts but is getting an error, them wanting to learn scripting shouldn't be a prerequisite to getting a patch. Now, with AI scripts, I can't relate (yet), so I'm just commenting on the they-dont-want-to-learn argument for now.
@Lord Vectra because the way they said it is like "Hey, I want to get this script to work" *posted an AI-generated code*. That really looks like someone wants to learn. Especially if they never said if it is AI-generated code. The moment we discover it was an AI code, we lost interest in helping them.

Now if they are upfront about the AI code, we might ask "what exactly do you want?" because the AI code may or may not actually cover what they need.

Requirement gathering is a thing in the IT industry, and our clients obviously are people who don't want to learn.
I think people can ask if they want... You don't have to answer if you don't want to.

I think the point was the "real" programmer has already invested a substantial amount of time trying to help before it becomes apparent that it was AI generated. If the person asking for help isn't up front about that, you don't have the option of ignoring or saying no because it was AI generated until you've already wasted your time.

I didn't even know this was a thing!

But I totally agree ... I find it hard enough understanding code from some REAL people. I don't want to touch anything AI generated!
@Lord Vectra because the way they said it is like "Hey, I want to get this script to work" *posted an AI-generated code*. That really looks like someone wants to learn. Especially if they never said if it is AI-generated code. The moment we discover it was an AI code, we lost interest in helping them.

Now if they are upfront about the AI code, we might ask "what exactly do you want?" because the AI code may or may not actually cover what they need.

Requirement gathering is a thing in the IT industry, and our clients obviously are people who don't want to learn.
Ah, okay; that's a lot more clear. In that case, I agree. It's best to be upfront about it.
Another, shorter argument:
If it was easier to make plugins by fixing AI code than writing them from scratch, we would be doing that instead. We have access to those tools too.

If your goal is to have a working plugin, just ask for it. You'll save both your time and ours.
I think the point was the "real" programmer has already invested a substantial amount of time trying to help before it becomes apparent that it was AI generated. If the person asking for help isn't up front about that, you don't have the option of ignoring or saying no because it was AI generated until you've already wasted your time.
Oh yes, that I would agree on. So the issue is not: "Don't ask for help debugging AI made code" but the issue is: "If you ask for help debugging AI code, be clear and honest about it being AI generated code". 😛 Yes, that statement I do completely agree with. That wasn't the vibe I got from the original post, though (Probably mainly because of the title), but now I see how that could have been the intent.

---

When people do use AI to generate code, I think it should be used in baby steps. Ask the AI to to write a few commands, which you (the programmer) use when building a script/plugin. This wouldn't be much different then using google to find out how to make a certain command, yet youd still be fully in control of building the script.

When using the AI, use it as a tool for the programmer, don't make the AI the programmer.
No, the title stays. It serves as a "warning" that we are likely not going to humor you even if you're upfront about it. So, while it implies that you should be upfront about it, it might as well as "don't ask, don't even try, you won't get the answer, here's why". Of course, you can ignore the warning. 😛

When using the AI, use it as a tool for the programmer, don't make the AI the programmer.
This is what I'm saying in the last sentence.

People are free to praise AI because it helps them to write a spaghetti plugin that works for them. Good for them if it works. We are not going on a crusade to make you stop using AI codes. We simply don't want to get involved with any of them.
As somone who can read code quite easily and quickly, but has no idea how to write it...

I learned something new today.

There are actually people who code that take the job of coding seriously. After 17 years of reading code written piecemeal by programmers at my job...

I had lost all illusions of coders actually caring that their code makes a semblance of sence and was straightfoward without easy exploits and bug creation.

But, it's nice to know that some of you out there care.

Hat's off to you!
I had taught people how to event, and I had people who had no interest in learning eventing ask for help, and so here is my view about the whole they-dont-want-to-learn stuff.

All I need, as the helper, is to know what they want their system to do whether it be eventing or coding. Unless it's something major, I can't care any less. If they want to learn, then I will teach, but I'm not going to be like "well, since you don't want to know why this solution works, I'm not going to give the solution" because that gets in grey territory.

For example, if someone asks how to make Script X and Y compatible because they want both scripts but is getting an error, them wanting to learn scripting shouldn't be a prerequisite to getting a patch. Now, with AI scripts, I can't relate (yet), so I'm just commenting on the they-dont-want-to-learn argument for now.
Very correct words. Such people are simply lazy and will remain so throughout life. They won't achieve anything.
I'm late to the party.

Yeah I can really see this being a huge problem for Programmers going forward, especially the ones who dedicated decades of their lives to programming.

Frankly, there's enough plugins out there that you don't even need to code at all, unless you wanna do something really unique.

However, Javascript is very much in the same boat as Python in terms of exposure on the internet. It's truly thrived and the documentation is well written, perhaps one of the most well written documentations for a programming language on the internet.

I know how it feels to look at a language, have an idea what you want to do and think "I can't do this..." because you can feel the level of skill required to do thing you believe you can't do. Long time ago I didn't even know how to work with JS's canvas API and I thought it would take me years to do something with bitmaps. I took the time to learn how to work with the canvas though and I started doing some really crazy crap with it. Those turn order plugins you see where it shows pictures of the turn order? It took me 2 weeks to be able to code my own, not years like I thought. Then I moved onto MZ's sprite class and just working with sprites, making my own encounter meter(the one which I had help with right on this very forum).

My point is that you should give yourself a chance and not rely on a machine to do it for you.

Original thread: https://forums.rpgmakerweb.com/threads/please-do-not-generate-code-using-ai-then-ask-an-actual-programmer-to-fix-it.154757/