3 ms·
> The biggest issue, though, is that Java programmers won’t use the new features. My old CTO boss swore he wouldn't ever use annotations because they were too
by latchkey 1y ago
> The biggest issue, though, is that Java programmers won’t use the new features.
My old CTO boss swore he wouldn't ever use annotations because they were too much magic for him.
"No! Writing out gobs of XML to configure Spring DI is the only way!"
- tombert 1y agoI generally hate when people use the “magic” excuse for not doing things. Most of these tools are open source and/or can be readily viewed in IntelliJ. It really isn’t hard…cmd+click on what you want to look at. If you’re an engineer you should be able to easily read the code to see what’s going on. Most of the time the “magic” can be understood in less than 30 minutes and then it’s not magic anymore.
- latchkey 1y agoYou're right, "magic" is generally when someone doesn't take the time to understand things. A busy CTO may not have time, so more things seem like magic to them. What's inexcusable is to inflict the rest of your team with your nonsense.
- tombert 1y agoYep, completely agree. I got in a bit of a disagreement with teammates at a previous job. I liked these teammates, they were very smart and nice people, but for a specific project I wanted to use LMAX Disruptor, and the excuse for not using it was very literally “we don’t want to make people learn anything”. That stuff blows my mind; aren’t we engineers? If we’re not willing to learn new things and adapt, what exactly are we offering that a high school kid who bought an “Intro to Java” and “Intro to Spring” book can’t?
- kleyd 1y agoI wouldn't dare say XML is better in this regard, but a good reason to be conservative with the use of annotations is exactly that cmd+clicking them doesn't easily lead to where the behavior is implemented.
- tombert 1y agoYeah, fair enough, though it's still not too hard to find where the behavior is implemented if you have access to the source code. But you're right, cmd+clicking on the annotation just shows where the annotation is defined, not where the behavior is implemented.
- latchkey 1y agoSure. It is just another keyboard command in IDEA.
- deleted 1y ago[deleted]