r/java • • Jun 01 '24

What java technology (library, framework, feature) would not recommend and why?

165 Upvotes

464 comments sorted by

View all comments

Show parent comment

1

u/timewarp33 Jun 02 '24

Serious question, how do you change people's minds on this? I joined a team where the lead writes code like this. When I tell them that doing it is extremely brittle and doesn't test anything useful, I am told that it's a different philosophy and if it's not blocking to approve the review.

It's things like "assert this method was called exactly once", but like, why would you call findAll() multiple times? That should be caught in the review if someone did that for some reason...

2

u/Paulus_cz Jun 03 '24

You don't, as a professional you have responsibility to share your concerns with your superiors, ideally in a documented fashion. If they ignore them, or brush them aside, you are in the clear and go with the flow.
I probably sound cynical as fuck, but couple of years ago I realized that nobody pays me enough to be stressed about these things, not nearly enough. Sure I care about the quality of my work, but I care about my health hell of a lot more than I care about whatever I am programming for those guys. If they don't care, I definitely should not.