hraness
Theme
Appearance

saved

Agents wrote terrible unit tests

by José ValimXpublished

Hraness republishes this public post from a saved copy. The post is the author’s own words.

José Valim @josevalim

Creator of @elixirlang. Chief Adoption Officer at @dashbit, where we build http://tidewave.ai and http://livebook.dev.

Agents wrote terrible unit tests in every OO language I have used, with excessive use of mocks most times.

I am not surprised to be honest. To quote Joe Armstrong:

The problem with object-oriented languages is they've got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle

So unit testing objects either rely on good design (yay) or mocks (boo), otherwise they cosplay as integration tests anyway.

This is not a “funcional is better” spiel. But we have to be aware the death of unit tests is a failure in design and AI automating the bad practices human have been doing for decades.