How can I tell if my coworker used AI for their code?
Asked by
CuriousCoder42
I'm currently collaborating on a React project, and I've noticed my teammate is making rapid progress, but their code has some major issues, like large files, poor component separation, and an excessive number of useState hooks. This makes me suspicious that they might be relying on AI to generate a lot of their code. I'm wondering if there are any tools available that can help me scan our codebase to identify files that are likely AI-generated. Additionally, I'd like to figure out the best approach hereโshould I enforce coding standards, or is there a case for telling them to stop using AI altogether?
Answers
Unless you have specific concerns like security, I don't see a reason to ban AI. Focus on enforcing coding standards instead. If they can use AI efficiently while sticking to the standards, then great! AI can save time, but itโs also crucial they spend some time refining their output afterward. Just avoid situations where theyโre copying huge chunks directly from AI without modifications.
Reply to this answer
One effective way to find out how your coworker is working is to suggest some pair programming sessions. You can observe their coding process and see how they approach problems. Itโs definitely important to enforce coding standards, but if their AI-generated code aligns with those standards, then it's really not a big deal since AI can be a helpful tool, much like autocomplete.
Reply to this answer
Add your answer
Answers are reviewed before publication.
CodeWatcher99: Exactly! AI can be incredibly useful, but the key is to use it responsibly. If theyโre just producing code by asking AI to write specific functions verbatim, thatโs a red flag. They should ideally be using it as a collaborative tool to enhance their coding, not replace their own skills.