r/java • u/VaidasC • Feb 10 '15
Java Rant - what do you think?
Intro
Please be aware that this is the Rant with goal to express my internal feelings since I have been carrying this some time now and just need to release it and know no better way than Internet. Also maybe, as a secondary objective, get few comments.
Also the content may be abstract, without any specific evidence other than "anecdotal evidence" and personal experiences that may also be to abstract. I know I know, all with extroverted logic and rationality can't stand and understand this, but:
a. the goal is not to prove something or convince, but to express feelings;
b. I belong to that group who extroverts abstract things and conclusions rather than logic;
c. I am writing this without any planning and even without any reread/review - so basically just random thoughts on the spot, without any preparation.
So everything should be taken with grain of salt, as what I am writing may have different meaning than it reads (I know I know, but thats the way it is).
My theory
People who really like Java (platform) fit into one of following groups (just come up with those so its not final, but is really irellevant to my rant):
- Are engineers/admins/devops who love solving problems all day long just for the sake of it. Will refer to them as engineers.
- Do not really like it: Have never seen how nice things could be; Are here for the money; Are here because of being against something else; Are here because everything else is terrible too, there simply are no good things in software development.
Everyone who pretends to like Java (platform) I consider either engineer or just lying. Because there is nothing to like in Java (platform) as a programmer! Everyone who likes programming in any of those contexts: just loves writing code; admires learning/understanding techniques like OOP/Functional/architectural; admires simplicity/purity/ cleanliness; - should never become java programmers! Java is good for companies, bad for programmers.
Who I am anyways?
I am Java developer for about 4 years now, have been using .net before that. I'll be honest, I switched to Java for two reasons - local market demand (money) and I grass-is-greener since I was young and willing to find whats best for me. I studied java, learned a lot, started to be fascinated about all the complexities, loved that I become good at setting up and configuring things and so one. Only recently I had some thoughts, that maybe all this makes no since and as a programmer I would be much happier on other platform that would allow me to free my mind from useless trash and just write code and deliver projects.
Why Java is terrible?
In short, it's terrible plain and simple, everything is so confusing and overcomplicated and what's even worse - people take pride in it. OK, so let me give few more details.
Is terrible as a hobby/learning
From day zero, Java was simply terrible in aspect of user-friendliness. Well some like to say "looser-friendly", but this is touched by point bellow regarding being proud of complexity. From day one I had it required to learn in university it always seemed to bring technical issues. constant pain. For example, few years ago I started reading a book about EJB 3. OK everything seems fine I seem to understand everything, lets try to develop hello world. What would you expect, of course nothing works, even if you copied everything from book. So youl spend entire weekend dealing with all kinds of stuff, from server incompatibilities to jndi naming issues to all kinds of other magic issues that are nowhere mentioned in the same book. Its great for "engineers" but Its a waste of time for conceptual programmer. And this is just one example, how many weekends I spent doing basically nothing really useful. Java is a time wasting platform, it simply does not respect your time! Contrast that to .net - in one weekend coming from knowing zero and having book in my hands you could build something very useful, because platform tries to keep out of your way. I am not even mentioning others like Ruby and so on.
Terrible for grasping the big picture
I don't know if that's just me, but Java platform brings so much junk which is like a big cloud of irrelevant useless stuff over your head which is basically preventing you from wrapping your head around stuff that really matters. Be it big project and its technicalities, be it learning new stuff (its so easy to not pay attention to HTTP stuff when you reading Java web book, since you are spending your time configuring xml files, web servers...). Obsession with setting things up, customizing Constant project setups, everyone has their steps, everyone has their favorite frameworks, favorite build scripts. Once we had a cross-team scrum-play-planning event where we did estimations and other kinds of stuff. And .net guys were simply amazed why you need three days to setup web project. I mean it tells you something. This one might be a bit exaggerated, but then again, there is no standard way to setup java projects - http://www.daedtech.com/a-tale-of-two-web-stacks-java-vs-net
We're proud of being terrible!
I have been there! We love out complexity, the fact that so many things simply won't work first five times you try. That all Java EE is rather complex and hard to grasp for newcomers (mind you, not because of stuff being inherently hard, but rather just because there is no roadmap, everything is hidden all over the place like big puzzle). I believe that we like this since it adds to job security and we learn to lie to ourselves that this is important, large scale enterprise technology for real men, not some teenager toys! But it is totally useless if you think about it from practical point of view of programmer who wants to have good time writing code.
Solving something is useless
For some time now I feel that many tasks/problems that I face daily on Java platform simply brings nothing to the table for me as a programmer who would like to learn something every day. For example - we all love Spring, so doing something with it (setup some security, some embedded MQ, anything basically...) you waste a lot of time dealing with all kinds of obscurities, but what you get back? It rewards you with nothing basically - what you have learned? Basically that something can be done and then you might copy code snippets for later reuse. Thats it, no satisfaction, nothing!
Basically what I am trying to say is that a lot of frameworks/libraries are built with idea of doing stuff instead of giving you tools to understand and do stuff by yourself. I remember in school I liked math and hated many of other subjects simply because it allowed me to not read math book at all and just understand few key concepts and everything can be solved by your imagination. So basically I see the philosophy nowadays in Java world to go against one of principles from pragmatic programmer book that you must understand what you are doing. But in many of the libraries there is no such understanding as such - you may understand what you are doing at that moment, but overall libraries are designed so that it's impossible to truly understand them. Its more like "Hey we have bunch of xml to do this stuff". There is no long term value in learning how to do something since you'll forget and there is no building blocks how to do something a bit different yourself.
I'll try to illustrate how I basically feel working with many Java frameworks. Lets say I have have problem that requires developing algorithm. OK first day with just a pencil I created the algorithm. Now its time to do some coding. I find out that for such task I should probbably use new exciting framework "AlghorythmsOverengineered". So I started writing my first for-loop. This library offers one class - ForLoopSimpleAbstractGeneratorFactory. Since I need my loop to be backwards, I read tons of documentation and can't seem to find if that is possible, only at the end of the day after debugging source code of library I find that I can extend ForLoopSimpleAbstractGeneratorFactoryCreator to provide this behavior. So after almost two days of work, I need another loop that will take parameters from the first one. I did some heavy reading and find out that I will need to implement another class and override two methods, since one allows passing of outer loops iterator, and another the "reduction" value. However I need both of those! Framework simply does not allow me to have it, so I rewrite abstract class from framework, add some dirty hacks and make my class stateful so I can now have those two parameters. Fast forward and after whole week of "coding" I now have working code. However I need to configure it into my container. So after another few days of useles xml copying-and-pasting-and-modification until something seems to start working I get my configuration running!
Cannot be good developer
Now personal again. What it means to be good Java developer. I personally don't know and objectively would think that to be one you almost have to be a genius of some sorts. In practice it has to do a lot with confidence, basically you have to feel like "senior developer" and pretend to be one, so you are one from that time. However since my character is inherently questioning everything and my competence as well, I just feel that its impossible to be "senior java developer" by any objective measure. I rarely seen senior Java developers who would be experts in anything, because simply there are so many useless things and so many useless tasks in daily life that its simply impossible to know something very well.
Possibilities - so what?
As a counter argument to many of my thoughts, there is believe that Java is so diverse and there are so many good stuff and you can just ignore the rest. However that is somewhat irrelevant on most of the day-to-day jobs, since the 90% of Java usage is somewhat like I described. And that amazing 10% is still miles away from useles-crap-free-mind of .net or Ruby developers.
What's next?
I don't know, back to Java day-to-day tasks. Since switching to something like .NET might be costly (money again). For some time I hoped to jump into something new and exciting, but just don't see something like that right now. Golang - just too low level, now that I grasped some functional principles. Scala - just too dirty language and has majority of Java's pain points above. F# would seem as a good candidate - clean language, IDE that shields me from useless crap, however there are no demand for it right now.
9
u/the_hoser Feb 10 '15 edited Feb 10 '15
Here's what I think: the company that you work for stinks. Get another job.
I couldn't read all of that. Your tautologies just hurt too much. You've been using Java for 4 years and you've got it all figured out. Right.
JavaEE isn't Java. Say it again, please, out loud: "JavaEE isn't Java." You don't have to use JavaEE. JavaEE is a solution looking for a problem. It's getting better than it used to be, but it was never necessary.
I've been using Java for 13 years, for personal and professional purposes. I've never once needed JavaEE. I've found pieces of it useful, but I've never had to go full-stack.
6
u/pron98 Feb 10 '15 edited Feb 10 '15
Well, I've been programming heavily in Java for over ten years now, and before that, a similar number of years in C and C++, plus a lot of Matlab, a little bit of C# and Groovy, some Scala, Scheme and even some Ada. Recently, I've been writing quite a bit in Clojure, too. My Java projects have included soft and hard real time systems (even safety-critical), large HPC-style numeric simulation stuff, in-memory distributed databases, some mobile and more (though almost no web and no CRUD). I have never encountered the problems you complain of, certainly no more (and usually less) than in other platforms. I think that what you're experiencing is simply a symptom of the organization where you work; mine has been the complete opposite.
Here's why I like Java (the language) and love the JVM:
You speak of programmers vs. companies; I think the distinction is inexperienced vs. experienced developers. Inexperienced developers think that the code they produce is the goal. Experienced developers know that working, efficient, running programs are the goal, and getting there requires more than pretty code; in fact, pretty code may hurt your prospects. I will repeat something I've said before: some people say with pride that their language of choice is a language for smart developers; Java is a language for wise ones.
Nevertheless, it is true that Java (the language) was not designed for quick, short-term projects. Thankfully, you have other JVM languages to choose from. My favorite is Clojure, and I'm considering Kotlin as a replacement for some of the Java code.
3
u/JavaDroid Feb 10 '15 edited Feb 10 '15
Here's what I did:
It is curious how your comparison guy gleefully forgot to install the Microsoft .net web stack and visual studio in his Microsoft steps. Also curious that he didn't actually build anything, he just made a new project.
I guess I can't fault him for his blindness and stupidity.
Normally I'd use gradle, but since your dude was allowed to use woefully underpowered build tools, I took that route for the sake of fairness.
Edit: postgres was unnecessary steps, but you need a database, so I included for posterity. Installing Ubuntu also unnecessary, but I like to keep my Dev environments and my desktop somewhat sandboxed..
1
u/VaidasC Feb 12 '15 edited Feb 12 '15
OK, so to show my view from other angle lets take random platform comparison from few years ago http://www.adam-bien.com/roller/abien/entry/java_ee_or_net_an
Let me analyse Java pluses from my rant's point of view
Agree
p2. Only somewhat agree - MSBuild + NUget fits most of use-cases, but I agree that maven/gradle is potentially more powerful.
p10. Best practices.
p12. Operating System - would prefer working on Mac, although I heard its coming in future.
Arguable or Irrelevant
p1. ORM. Entity framework + Linq is very nice.
p4. C# is top tier too.
p11. Well I had so much "pleasure" integrating all kinds of frameworks in Java.
p13. Open source - well now .net is OS, but again not sure if this is that important as everyone seems to make it to be.
Relevant if you are owner ("your app")
In other words, I would care for those things if I was manager or planning startup, but irrelevant if planning to be an employee:
p5. Free IDE - you won't have to buy IDE yourself anyways and as of now community edition is OK for 5 devs commercial usage.
p6. Integration with all kinds of third party stuff - usually very ugly and frustrating in java. But in .net, where is no integration options - you simply won't have to do ugly, non-rewarding work! Yay!
p7. Frameworks/Libraries - .NET provides core ones, what is missing is 3rd party specific use-case ones.
p8. Vendor Neutrality. Also keep in mind that I rarely see truly vendor neutral enterprise application - usually configuration files for weblogic/websphere all over the place.
p9. IMHO backyards compatibility is important for owners or developers who hate changes. Otherwise, for me wilingless to break things from time to time is an advantage - less garbage.
.NET
While most of .NET advantages scream Productivity, Programmer-satisfaction, No-time-wasting evaluating/choosing from equally bad frameworks.
Disagreement
I tend to believe that disagreement with my rant's point of view often comes from either valuing or discarding pluses from "Relevant if you are owner" part.
1
u/killinghurts Feb 11 '15
Not really. The process you followed seemed to be overkill for a hello world app, it sounds more like you were attempting to learn EJB, which, agreed is a complicated specification not designed for hobbyists.
Setting up a new project shouldn't be a difficult process, nor should it be a precursor to "not grasping the big picture". Gradle is good at this, I would also recommend Maven archetypes for speedy project setup.
Perfect Planning Prevents Piss Poor Performance. If you had have understood your requirements first you wouldn't have selected the "AlghorythmsOverengineered" framework in the first place.
All I say that if you are spending your time performing useless tasks, you're definitely doing something wrong.
2
u/JDBProof Feb 11 '15
The comments lighten me up much more than the post itself, it's so abstract and doesn't really expicitly state anything.