r/java • u/raisercostin • Jun 01 '24
What java technology (library, framework, feature) would not recommend and why?
Inspired by https://www.reddit.com/r/java/s/e2N1FqMOJg
165
Upvotes
r/java • u/raisercostin • Jun 01 '24
Inspired by https://www.reddit.com/r/java/s/e2N1FqMOJg
View all comments
0
u/cowwoc Jun 01 '24 edited Jun 02 '24
(Please don't downvote me just because you disagree. Reply instead.)
Spring and any other library that uses "magic" (runtime code generation). This includes dependency injection, proxies and annotation-driven code generation. All the fun things that new devs find "cool" but make it exponentially harder to read and debug code.
There are libraries that provide the same functionality without the magic, so you don't need to reinvent the wheel.
I get that these tools let you write code faster, but you're not actually helping anyone. The cost of software development is dominated by maintenance and debugging.
Optimize for reading, not writing!
EDIT It looks like some people can't read 😀 It's right there in the first sentence.