r/java • • 6d 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?

100 Upvotes

163 comments sorted by

View all comments

148

u/repeating_bears 6d 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

18

u/raelik777 6d 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.

40

u/CorrectProgrammer 6d ago

Add to that tests no sane human would write.

20

u/DGC_David 6d ago

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

14

u/fluffytme 6d ago

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

7

u/shorns_username 5d 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.

8

u/Paxxi 3d ago

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

3

u/DGC_David 5d 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 4d 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 6d ago edited 6d 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.

19

u/hazel-blur 6d 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..."

2

u/RiceBroad4552 7h 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.

9

u/katieglamer 6d ago

Me over here forgetting to commit for 3 weeks

10

u/agentoutlier 6d 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 6d ago

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

4

u/Gwaptiva 6d ago

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

1

u/Urtehnoes 5d 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 7h 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 6d 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 6d ago

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

6

u/space-bible 6d ago

It killed TDD?

1

u/repeating_bears 6d ago

TDD as a methodology is to write the tests before the impl, so that you learn what the interface should be, basically. There are not many people prompting an LLM to write the tests before the impl. It all gets done together. (tbf there were not many people doing "true TDD" before AI either)

2

u/Tasorodri 6d ago

I've specifically seen a lot of people that work extensively with an agentic workflow to specifically have the agents work in TDD.

→ More replies (1)

3

u/Rasutoerikusa 6d 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 5d 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?