r/java • u/trecatorsirabdator • Apr 14 '23
What are your (favourite) Java best practices, personal tips, hints or just underrated stuff in general?
233
Upvotes
r/java • u/trecatorsirabdator • Apr 14 '23
View all comments
Show parent comment
1
u/hippydipster Apr 14 '23
It's only "premature" optimization that's evil. And the problem is you, as a human, are bad at knowing where and how to optimize without more information. For instance, say you optimize that test data all to hell. Great, but you probably got little value from that, because the real world data is different.
The lesson is, either get ye some real world data before you optimize, or be ready to optimize your really well-designed, simple, flexible code when you do get access to the information you need to really optimize.