Essentially, you need to stringent the code review and testing processes. You cannot have AI doing code generation and code review and/or testing together. Either you have code generated by AI, and have Humans review and test the code, or have humans write the code and AI supporting with code review and/or testing the code. Never both.
I find the second approach better - AI supporting with testing and code review processes. Code generation is still Developer's domain and I don't see AI writing Production level code anytime soon. Developers can use AI to generate snippets of code which is then adjusted to make it production ready. That is probably best of both worlds at the moment.
[1]: https://rdel.substack.com/p/rdel-57-what-are-the-most-common
If they are still looking to have humans maintain the code, and hire people to optimize it, the at use case needs to be taken into account. From that perspective, I would argue that it doesn’t work.
You could/should charge a higher rate for companies that have a bigger mess to clean up. A cleaning crew is going to charge more to clean up a hoard than to do some light cleaning and re-organizing. The price reflects the effort involved, and I don’t see this as any different. They can choose to pay to write clean code up front, or pay for it later with difficult or impossible maintenance. The choice is theirs.
Personally, everyone on my team hates AI and it’s rarely used. I probably use it the most, which is maybe 4 or 5 times a month to write a single line here or there, mostly to save me a search for syntax.
Increasing my per-hour rate until I'm comfortable spending hundreds of hours unspaghettifying code.
(When I tried with Zig it was a disaster..)
Stick to the scams and whatever else, or go work at a PE firm.
Source: my experience working with such types.
As the founder of AI2sql, I’ve found that balancing AI assistance with human oversight is crucial. By setting clear guidelines and regularly refactoring the code, it's possible to harness the speed of AI while maintaining a clean and manageable codebase.