5 ms·
Ah yes, it's one of those articles again... First of all, Spring is not the only framework out there (even tho I really dislike it). If the title were "What I
by trinix912 6y ago
Ah yes, it's one of those articles again...
First of all, Spring is not the only framework out there (even tho I really dislike it). If the title were "What I hate about Spring", it'd be fine, but hating on an entire language because of one framework just misses the point.
> Java’s focus still appears to be on silly rules that dictate what class names should be, what packages they should be in, and if variables should be private or protected. Seriously, who cares?
This is the one thing that I like about Java. I can easily guess the names of classes/methods. Private variables are private so that they don't leak into the public API (ie. encapsulation). The "seriously, who cares?" at the end just discredits the entire article for me.
- sumanthvepa 6y agoI agree it's not the Java language per-se that is messed up, its the runaway use of annotations in frameworks and libraries that makes building an application a write-once never be able to debug problem. The real problems start when you start work on a existing codebase that you are not familiar with. Deep expertise with Spring is an absolute requirement for even minor work. That's what puts off management from investing in Java for new projects.
- gnusty_gnurc 6y agoIf there's something worth criticizing it's just how large and non-obvious it is to figure out what Spring(/Boot) does. And before you know it you're digging into some PostProcessBeanFactoryInitializerDooDad. I've come to appreciate some aspects, but it's not obviously good to me, like a lot of stuff it's just various tradeoffs. I like Java and the surrounding ecosystem/community because it's boring.
- cle 6y ago> The "seriously, who cares?" at the end just discredits the entire article for me. It doesn't for me. I can't keep track of all the times I've been frustrated by a "final" class or a private variable somewhere that, were it public, I could have trivially solved my urgent business problem in time, with full awareness of the tech debt being incurred. But I can't remember any time in the tens of thousands of lines of Python that I've written, where I had regretted consuming a variable somewhere. So at this point, based on my experience, it all just sounds like paranoia to me that doesn't actually add value in practice. I think many of these "best practices" in Java, especially those coming from "Effective Java", are over-paranoid for most developers, and just create more problems than they solve. Being paranoid about API contracts makes sense if you are writing a widely-consumed library like those that Josh Bloch worked on, where the cost of changing consumers is prohibitively high. But when you are working on a class that has a handful of consumers, it really doesn't matter--just go update the consumers if you really need to (which you probably don't).
- donmcronald 6y ago> I can easily guess the names of classes/methods. And if you're using something like IDEA it's even better. You can take a guess at the method name, look at the auto-complete options, pick one, and hit CTRL-Q to read the Javadoc for that method.