Telltale signs of Vibecoding in Java?
Someone recently flagged one of my mods as being "obviously vibecoded" (which it wasn't), so I appealed the decision. just out of curiosity, what exactly are the signs people are seeing when accusing code of being vibecoded?
98
Upvotes
View all comments
30
u/voronaam 5d ago
Another sign is unit tests that "hug" the code really close.
I once had a one-liner that changes default value of some flag in the application from
truetofalse- the PM changed their mind. The original code and tests were written by AI. Do you want to guess how many unit tests failed after this tiny change? I expected exactly one. Maximum two. I expected there to be a test for the default behavior that I'd need to update and a random unrelated test that relied on the default.Failed tests: 6. All directly related to the default.
AI wrote the tests and assertions for:
truefalseit isfalsetrueit istruetrueit istrueand no longer missingfalseit isfalseand no longer missingfalseand is deleted it istrueNo sane human would ever write that many tests for a trivial boolean flag. It was left configurable to begin with because the PM was not sure which way they want it It is not like we expected PM to be changing it back and forth all the time.
When changing 1 line of code leads to 40+ lines of unit test changes - the tests are "hugging" the code way too close.
AI loves doing that for some reason. I guess it was getting scored by the lines of code it produced...