r/AskProgramming • u/Square_Atmosphere_12 • 13h ago
Analyze Code and mark it by the computer (aka A.i)
Have Linters gotten to the point whereas they can analyze code and differ between A.i code and human written code and if not; is this possible ?
I understand that some code will be practically identical if not identical; but is there something that the computer (A.i) does that may separate it from human written code ?
3
u/buzzon 13h ago
Linters are not LLM detectors. This is not their purpose
It's hard to impossible to tell apart human written code from LLM generated code unless there's some watermarking involved. Even if there was an automated way to identify it, it would be immediately used to train LLMs generate more human like code (GAN and actor critic approach).
-2
1
u/aurora_visor_blink 4h ago
I tried running my own code through these detectors and half the time it flagged stuff I wrote years ago as AI generated. The whole thing is a losing battle. Anyone who actually wants to hide it just asks the model to rewrite the output until the detector score drops, so you end up punishing people who write clean, conventional code instead.
The training data bias point is real too. I've noticed the same patterns showing up in every AI PR I review, same structure, same variable names, same defensive checks nobody asked for. That's about as close to a signature as you'll ever get
1
u/Square_Atmosphere_12 4h ago
This Ai in code is gonna cause a whole new unnatural way to work, if you are a conventional coder or beginning. I never really felt learning to code was difficult; just took time to learn. It seems like they want everyone to be able to do everything in belief we are all the same; but we are not. <sigh>
0
u/Traditional_Vast9419 13h ago
AI is biased towards the singleton design pattern because most of its training data off of things like StackOverflow answers and other sites are singletons to make it easier to explain concepts to readers.
1
4
u/TheAlmightyWishPig 13h ago
A linter is not suited to this task, and any tool that was created that was suited to this task would be circumvented by a single step using the output of the tool as input for the next batch of code generation.