18 ms·
> Java can be programmed as lightly as Python or as a full-on J2EE monstrosity. The difference is cultural ("idiomatic") not brought about by types. I wish I h
by Sohcahtoa82 8y ago
> Java can be programmed as lightly as Python or as a full-on J2EE monstrosity. The difference is cultural ("idiomatic") not brought about by types.
I wish I had the money to burn to buy a billboard in Silicon Valley to broadcast this.
I find that the extreme majority of the hate Java gets isn't really about Java itself, but the extreme adherence to the worst paradigms and idioms I've ever seen in the programming world.
Stop writing so many classes. I'm sure everyone here has seen FizzBuzz Enterprise Edition [0]. Sure, it's a parody, but a lot of truth is said in jest. There's too much Java code that looks like FizzBuzz EE, and there's no damn reason for it.
> I'd say that "half the code only existed in order to" use patterns and OO hierarchies for the sake of it.
I really wish I could understand why so many Java programmers feel like you can't just write a class. Nope, you have to make an Interface, with an abstract class that implements it, followed by your Implementation class that extends the abstract. But directly calling that constructor is verboten! You need to create a Factory class (With associated abstract class and interface, of course!) that returns instances!
[0] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
- goalieca 8y agoJava itself makes things a pain. Compare establishing a tls connection with a client certificate in python and in java. Guess which language has a secure one line way to do it.
- coldtea 8y ago>Compare establishing a tls connection with a client certificate in python and in java. Guess which language has a secure one line way to do it. Nothing in Java prevents a Java network lib from doing it in one line. In fact many third party network libs do just that. (And Python had more or less a similar unwieldy network lib, which is why they now say "Requests is suggested" on their own standard lib documentation: https://docs.python.org/2.7/library/urllib.html https://docs.python.org/2.7/library/urllib.html ). So again it's not the language (syntax + semantics), it's what's considered "idiomatic" and what's prevalent.
- pjmlp 8y agoStill it is possible to write J2EE on any language (wrote J2EE on purpose). I have it seen done in Clipper, C, C++ and I bet even Go will one day have its Go2EE, it just needs a bit more enterprise love.
- Sohcahtoa82 8y ago> Still it is possible to write J2EE on any language Right. The difference is that for some reason, writing Java in the J2EE style seems to be the default, and rather than stopping the practice, people choose to hate the language instead, as if they think the J2EE style is required by the language.
- pjmlp 8y agoYep, I love how Java bashers get to deploy micro-services at scale, using Docker containers, managed via Kubernetes, with DSLs written via Terraform APIs.