I've spent the past few months deeply exploring AI-assisted coding, specifically tools like Cursor. I prefer this approach because it allows me to actively monitor and collaborate with the process, rather than relying entirely on no-code solutions.
Here are the biggest issues I've observed, along with some small solutions you can implement:
1. Security Risks
Sensitive secrets/API keys often end up in frontend files. Inexperienced developers might easily overlook this, leading to significant vulnerabilities.
Solution: Use secure vaults or environment variables and implement automatic detection for exposed secrets.
2. Code Hallucinations
Occasionally, the coding assistant completely rewrites entire pages, even when tasked with minor or unrelated adjustments, causing unnecessary disruptions. This can be really frustrating especially if rewrite occur unnoticed. This can lead to role-backs, wasting time.
Solution: Set clearer context boundaries and limits on AI-generated changes. The prompt is the key. The clearer the instruction the better, even if you have to mention what you don't want to happen.
3. Lack of Structural Clarity
The assistant sometimes confuses backend logic with frontend operations, complicating app architecture and maintainability.
Solution: Clearly separate backend and frontend contexts within AI prompts or instructions.
4. Library Overload
Assistants tend to introduce unnecessary or redundant libraries. This results in heavier, slower-loading pages and complicates dependency management, negatively impacting performance and maintainability.
Solution: Enforce stricter checks or approval workflows for adding new libraries.
5. Repetitive and Bloated Code
Generated code can become repetitive and bloated, rather than efficiently leveraging simple, reusable components.
Solution: Encourage AI assistants to identify and reuse existing components rather than generating repetitive code.