r/java • • 15d ago

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?

105 Upvotes

167 comments sorted by

View all comments

150

u/repeating_bears 15d ago

Adding to what others said:

More tests than any sane human would write, LLM language in README / comments, few git commits, which are massive in size

20

u/raelik777 15d ago

The tests and LLM language are the biggest tipoff. I'm personally guilty of massive commits though, no AI required 🤣 Typically one huge commit followed by a bunch of tiny one-liners where I'm fixing shit I missed.

43

u/CorrectProgrammer 15d ago

Add to that tests no sane human would write.

20

u/DGC_David 14d ago

Lol I have seen some wild shit in tests on the enterprise level.

14

u/fluffytme 14d ago

Yeah same here. We have some legacy apps with many thousands of tests each, all hand written

8

u/shorns_username 13d ago

tests no sane human would write

You overestimate (underestimate?) humanity. Or at least, your definition of "sane" is wishful thinking.

Once saw hundreds (actually probably thousands) of tests that had been written to test every getter/setter in the app.

The code looked like something like:

public void testXxxGetYyy(){
}

Literally a bajillion test methods, to test manipulator methods... with no implementation.

And those'd been there for years before I started working on the project, which many allegedly sane humans had worked on.

9

u/Paxxi 12d ago

That's just how you get your test coverage to the magic number set by management 😂

3

u/DGC_David 13d ago

That's what I'm saying... I once saw a test that checked the Value of a const... I think the og forgot to change but idk what they were saying

5

u/paper-jam-8644 12d ago

Testing a const isn't as stupid as you might think. It prevents a one line typo from becoming a production bug, makes it two changes required to break things in two different files.

20

u/chabala 14d ago edited 14d ago

As someone who still tries to do TDD, it pains me that this is becoming the criterion.

Not that I could convince my peers to write any tests at all without LLMs doing the work for them.

21

u/hazel-blur 14d ago

I have my Agent do TDD. That however often leads to thing like

"Remove that icon"

"Ok, I first write a test asserting the absence of that specific icon..."

1

u/OddEstimate1627 1d ago

"optimize the performance of this method"

"The agent gave up after one hour. I told it to create a test that fails before and succeeds after,  but it failed to come up with one. No work was done"

Artificial Stupidity

4

u/RiceBroad4552 8d ago

TDD was always mostly nonsense. No wonder "AI" picked it up so eagerly.

You can do TDD only when you have a fully worked out spec in hand, which is for "usual commercial development" never.

1

u/chabala 8d ago

There's nothing about TDD that requires the world's most complete spec. It's about testing for your known requirements first: keeping the design testable, deferring choices until they're required, red/green/refactor, writing the minimal code to keep tests satisfied. Nothing stops you from refining the requirements as you go.

9

u/katieglamer 14d ago

Me over here forgetting to commit for 3 weeks

10

u/agentoutlier 15d ago

I confess I use LLMs for writing tests. (mostly) Worse case it is fuzz. It can get especially crazy if you have them do mutation testing which I recommend for some tiny isolated places like a parser (again fuzz).

Also I force them not write tests just to improve coverage and I have them try to write as close to possible permutation based end to end tests where I can overlook what the inputs and outputs are.

4

u/thephotoman 15d ago

Oh, I’ve done more tests than sane humans would write by hand out of malicious compliance before.

4

u/Gwaptiva 15d ago

I am probably not a sane perdon, because unless I prompt Claude explicitly, it doesnt write tests

1

u/Urtehnoes 14d ago

Tests that just say assert true; return true;

Like OK maybe AI has reached human intelligence, because it's making tests my coworkers make!

1

u/RiceBroad4552 8d ago

Massive commits are not a telltale.

It's usual to work locally until you have everything ready, pushing stuff only to some private repo for backup reasons.

The delivered single commit is then usually a long squashed branch. Depending on task it can be pretty large.

0

u/findus_l 15d ago

The few git commit part I have seen before ai and I tell my agents to make small commits because I don't like big ones.

-9

u/emberko 15d ago

One of the things I'm grateful to AI for is that it killed the TDD shit now and forever.

3

u/Rasutoerikusa 14d ago

? I've seen the opposite where humans write and specify tests, after which llm implements it according to it. At least I've seen a new rise in TDD in the past year

3

u/koflerdavid 14d ago

Now you actually gave me an idea. Most people don't like TDD because writing tests sucks. They prefer to write the implementation. But how about letting the LLM write tests only and thus isolate the slop to the test suite?