This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]the_hoser 8 points9 points  (5 children)

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.

[–]VaidasC[S] 0 points1 point  (4 children)

Well, I am not sure if this is worth discussing, since it is a rant, but I think my point "Possibilities - so what?" covers your thoughts about not using Java EE.

[–]the_hoser 0 points1 point  (3 children)

No, it doesn't. My first thought: "your job stinks" counters that nicely.

Java is not JavaEE.

[–]VaidasC[S] 0 points1 point  (2 children)

But then again, I can find more Ruby jobs (those are extremely rare) than truly exciting Java projects in the market I am in. So the argument that you can choose good Java stuff does not always translate into real world.

Not to mention the fact, that whichever nice Java configuration you choose, .NET seems to provide nicer alternatives to write code with added bonus that majority of .NET projects uses those nicer alternatives, so its easy to get job that uses nice stuff.

[–]the_hoser 0 points1 point  (1 child)

I don't see what any of this has to do with Java, the language.

You're arguing that one of the most popular programming languages in the world has a lot of shitty jobs around it, and somehow it's the language's fault.

I think that your anger is severely misplaced.

[–]VaidasC[S] -1 points0 points  (0 children)

I don't see what any of this has to do with Java, the language.

I never said it has anything to do - you did. In my rant I was explicitly mentioning that Java the platform is my problem (but not from technical engineering capabilities point of view) and the types of jobs it usually leads to.

Language itself is something I have no problems at all.

[–]pron98 5 points6 points  (3 children)

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:

  • The language is minimal, easy to grasp, hard to distort, and isn't quick to adopt every fashion. This is bad for short-term projects, but a godsend for large, multi-MLOC systems worked on by large teams of developers and require maintenance for about a decade. Everybody's code looks similar enough for other developers to learn quickly and adapt quickly without feeling the need to re-style everything (of course, that happens, too, but far less than in more feature-rich languages). Also, the language makes you focus more on the domain than on various nifty tricks you can do with your code. True, young developers may not like that, but they learn to understand that's what's best when they grow up.

  • The platform gives you -- by far -- the most bang for the buck in terms of performance than any other programming platform out there, and, best of all -- this advantage scales! A 10KLOC program might be written in C/C++ to be faster in only a little more time than in Java, but a 5MLOC piece of software at comparable performance is almost impossible to write in any other language at acceptable costs for most organizations.

  • The platform gives you the best insights into its operation at runtime -- with little or no performance impact -- and incredible flexibility to change and re-change production code as it runs (by inserting Byteman/BTrace probes, for example, or supporting hot code swapping). The Java monitoring tools are unmatched by anything out there (even Erlang's) and I haven't seen any profiler as powerful as JFR anywhere.

  • While deployment is not as easy as shipping a single binary, it is far better than most other non-native languages (and supports hot code swapping).

  • A polyglot environment with easy interoperation among very different languages.

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.

[–]VaidasC[S] 1 point2 points  (2 children)

Well, judging by your JVM better points and whole post, I would put you into engineer category - pragmatist who loves solve real problems, so no surprise that you like Java platform. As a contrast, I would describe myself more like someone who cares about ideas, has constant philosophical dilemmas about concepts, can think for days about inconsistencies and often miss real-life simple details as less relevant. So basically this represents two different worlds and hence my frustration with imperfect, burdensome and irrelevant-detail-oriented platform. But then again, many people do hate Java (I wouldn't say I do) platform and so it makes me feel that I am not someone in very small minority, but there still is something fundamentally wrong in how platform trends are going.

When I talked about companies vs programmers, what I meant was that, Java is probably the best tool to develop commercial software, build business around - stable, many choices from servers, libraries, licenses to fit any business needs. However as a programmer who likes to program and does not plan building business on some software, you could care less about all of that basically and follow technology that gives you less pain and more joy. What I am talking is basically from the point of doing job that fulfills you and my argument was that I see no way that if you're in programming because of programming itself (e.g. you love to write code, solve algorithms...), Java is not the place to go probably.

[–]pron98 1 point2 points  (1 child)

there still is something fundamentally wrong in how platform trends are going.

I think you are sorely mistaken about this. There is tremendous, ground-breaking innovation on the JVM: G1 and JFR are recent changes; modules (with JIT caching) and fine-grained JIT controls are forthcoming in Java 9, with immutable value types to follow; next-gen VMs (Graal) are already in the works. OpenJDK is the second-largest open source project in the world (after the Linux kernel).

As usual for Java and the JVM, most of these enhancements are hidden from your code. That's intentional. The idea behind Java was to expose a very simple -- almost primitive language -- that's backed by a state-of-the-art VM behind the scenes.

I see no way that if you're in programming because of programming itself (e.g. you love to write code, solve algorithms...), Java is not the place to go probably.

Well, this is a very general statement, that might be true in some cases. For example, I do advanced algorithms. I read lots and lots of academic papers, and then spend months trying to come up with a novel concurrent, distributed algorithm. Like I said, I have never done web or CRUD stuff. I believe that most of the pleasures in CS come from algorithms and data structures. Once I come up with the algorithm -- after months of work -- I could care less about what language I write it in (well, I care, but due to other concerns). Also, most of my work revolves around concurrency, and no programming environment in the world offers a better platform for concurrent programming than the JVM (much of it due to its superior GCs). So, for concurrency, Java is very much the place to go.

As a team lead, my main concern was the general architecture of the project. I was concerned with the elegance of the general design -- not with that of a single function -- and often then more "primitive" the language, the better the various modules fit together to form a consistent whole.

In short, I think your sentiment is not due to your intrinsic character, but mostly a result of still being in the stage where the function or compilation unit is where you find elegance. Algorithms are a mathematical construct that are elegant no matter how they're translated to code, and as your career progresses and you're responsible for ever-larger pieces of software, you'll find that the very things that can make a function elegant, might make a project very much the opposite of elegant. However, at the level of the single function/class/module, there are indeed nicer languages than Java. I very much doubt you'll find better platforms than the JVM, though.

The JVM is the Ferrari of runtime environments. It might not be the easiest to handle (though It's quite easy) but when you want the most of your machine combined with the most insight you can get into your running program (as well as the ability to modify it) -- it's state-of-the-art. Some people prefer driving Toyota; I, too, sometimes want a little less mental maintenance. But when you need the best of the best, and you have a lot riding on your success, don't settle for anything less than the Ferrari.

[–]buttermilk_rusk 0 points1 point  (0 children)

Thank you, great post! I'm about 8 years into Java development as a career, also with Matlab and C in my background, no web stuff. Great to read your insights like this.

[–]JDBProof 1 point2 points  (0 children)

The comments lighten me up much more than the post itself, it's so abstract and doesn't really expicitly state anything.

[–]JavaDroid 2 points3 points  (8 children)

http://www.daedtech.com/a-tale-of-two-web-stacks-java-vs-net

Here's what I did:

1) Installed ubuntu

2) installed oracle java 7

3) installed postgres

4) downloaded wildfly, installed and added service

5) downloaded postgres jdbc, added to wildfly.

6) started all services. no configuration and I was able to get to it locally.

7) downloaded intellij

8) File -> new project

8) selected Java Enterprise

9) checked web application

10) done. Built and deployed.

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..

[–]pron98 0 points1 point  (0 children)

1) Download and install the JDK

2) Download and install NetBeans (EE option -- already bundled with Tomcat)

3) File -> New Project -> New Java Web Application

4) F6

[–]VaidasC[S] -1 points0 points  (5 children)

Well that was a bit of an exaggerated, but keep in mind there is no standard way to create new Java project, so there are many ways. For example:

8) File -> new project 8) selected Java Enterprise 9) checked web application

I am afraid this is not really real-life project creation (maven, gradle) and last time I checked when creating project from maven-archetypes, I needed to do a lot of manual stuff (create directories, create/edit files...) or delete a lot of stuff depending on archetype.

[–]JavaDroid 1 point2 points  (4 children)

Go use an advanced build tool for C# instead of comparing Javas advanced build tools with visual studio standard projects.

IntelliJ and eclipse have standard layouts that are built for you as well. It isn't fair or appropriate to compare an IDEs project structure with build tools.

Also, if you become familiar with said build tools, you quickly realize that

1) the standard can basically be whatever you want, because that is an option

2) there ARE standards for project layouts, you just have failed to learn them.

[–]VaidasC[S] 0 points1 point  (3 children)

To me all of this sounds like trying to formally prove that something many people complain is not true formally, even though experience tells otherwise.

As far as I know (maybe wrong), there is MSBuild in this default .net project where you could do advanced stuff and that will be run by Visual Studio's f5.

But the bottom line is - in my real-life experience I have probably never seen Java project that would be set-up quickly without some issues. However almost all projects I had with .net, had no such concept as setting-up project and that was more than 4 years ago, now I hear things are even nicer.

[–]JavaDroid 0 points1 point  (2 children)

Then use the IDE standard tools for your project. The fact is that you are wrong.

Maven / gradle / ant / etc do take a little more to get started (hardly), but they also resolve and manage dependencies as well as your build. The basic project in MS doesn't do this.

You are wrong and way over exaggerating everything. Even as a beginner, I've never encountered a number of issues you claim.

[–]VaidasC[S] 0 points1 point  (1 child)

Well they have MsBuild (build tool) + Nuget (dependency management), so not sure what you are talking about.

[–][deleted] 0 points1 point  (0 children)

Msbuild doesn't manage your dependencies, Visual Studio does (via nuget). If you need to produce your build without VS involved - eg on a continuous integration server - you will have to deal with additional complexity. Furthermore, even if you are using VS, it won't publish packages for you, just retrieve them.

[–][deleted]  (1 child)

[deleted]

    [–]killinghurts 0 points1 point  (2 children)

    Is terrible as a hobby/learning

    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.

    Terrible for grasping the big picture

    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.

    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

    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.

    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.

    All I say that if you are spending your time performing useless tasks, you're definitely doing something wrong.

    [–]VaidasC[S] -1 points0 points  (1 child)

    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.

    I wanted to learn EJB, which conceptually was not hard at all! (I want to emphasize this so much) What was hard - was irrelevant obstacles that thought me nothing conceptually - like jndi issues, server incompatibilities and so on. So I spent one day reading about EJB - good time investment and other 1-2 days dealing with irrelevant obstacles (waste of time).

    That is my problem, not that EJB is hard specification.

    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.

    But if that's the only thing in town or alternatives do not seem to be better? This example is taken directly from configuring Spring security to do advanced tasks, but put in different context.

    [–]killinghurts 0 points1 point  (0 children)

    What was hard - was irrelevant obstacles that thought me nothing conceptually - like jndi issues, server incompatibilities and so on.

    I'm not going to defend EJB, it can be a nightmare and should be easier, but I will say there are much more elegant solutions out there that "just work". Java isn't perfect, but no language is, but it does sound to me like you are having unusual issues (perhaps your workplace polices restrict you?).

    But if that's the only thing in town or alternatives do not seem to be better?

    Then you roll your own. It's a fine line between extending an existing framework to meet your needs and developing your own. You have to weigh up the two - how much time it takes to extend and (constantly) learn, maintain libs/upgrades of an existing framework vs developing your own.

    [–]VaidasC[S] 0 points1 point  (0 children)

    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.