Hacker News new | past | comments | ask | show | jobs | submit login

I noticed that the people who have a strong distaste for Java are largely application-developers. In most cases, these developers usually just work with the available libraries or APIs to build a website backed by database (some of them are consultants that build similar apps over and over again).

Back-end developers seem to (maybe?) prefer to use Java.




I don't know if my anecdotal evidence bears this out, but I admit that it is just that...anecdotal.

People are still using C and C++ to write low level code. Databases, package managers, games, etc. Then there are the 'application developers' as you named them, writing http service endpoints, web apps, and the like.

It seems java still owns the colossal corporate stacks. I hear things like "it is easier to hire" and "java is faster/better for extreme large scale". If you think about all the languages and tools available, only the first makes much sense.

* C/C++/D is faster than java.

* statically compiled code is easier to deploy.

* Erlang is arguably more scalable than java.

* Haskel/Ada is 'safer' than java.

* I think several languages are more fun to write in than java. Ruby, python, golang, coffeescript, etc, etc.

So java may not be the best language for large scale, but maybe one of the best or good enough? When combined with the first point of ease of hiring, I can certainly see why large companies are attracted to it. If your language of choice lends itself to your workers being more easily replaceable, then as a company that is probably better/safer.

Other than that, I can't see why someone would prefer to use java. I don't work in/at/for huge companies though.

I admit that my own personal 'java bias' is based on dated interactions with java. Whenever I hear 'java' I think: good performance (vm), eats memory like candy, painful ecosystem of xml files and outdated/abandoned random libraries. I have tried dabbling in scala, and while I enjoyed the language to a fair extent, I still found myself wrestling with the JVM and the ecosystem (library version incompatibilities, obscure compiler errors, namespace wrangling, etc).


My opinions are anecdotal at best as well and that's the reality of software development. There's no research that can state that X is better than Y whether it is programming languages, methodologies, architectures, patterns, etc.

I don't deny the reality that people are still writing C/C++ code in the field of embedded devices, games, something that requires fast performance with a very low memory usage. On the other hand, there are a few NoSQL solutions built using Java: HBase, Neo4J, Cassandra.

In some cases, JVM Hotspot optimizes code on-par with C/C++. I don't know much about D performance. If the speed improvement is not night-and-day for projects other than being mentioned above, and if writing readable code is much better in Java, I'm not sure if we should compare C/C++ vs Java. On the other hand, many people seem to come out and say that Ruby is _very_ slow. Is it heaven-and-earth slow?

There are advantages and disadvantages of compiled vs dynamic code when it comes to deployment. It all depends on the tools and ecosystem too sometime.

How is Erlang more scalable than Java? In what area? horizontal vs vertical scaling? developer's productivity (or team performance) scale? performance? speed? Erlang seems to excel in a niche area (in a positive speaking).

What about Haskell/Ada, how are they safer than Java? Do they have better type-systems? handles NULL better than Java? Bulletproof from developers? detect more bugs?

Keep in mind that Java ecosystems have grown and matured a lot since 2004. The tools and libraries are staggering. Most of your concerns are no longer relevant except "eats memory like candy" in most Java desktop apps. Having said that, have you heard about Java ME? that thing runs in mobile devices albeit a different distribution of JVM.

Outdated/abandoned random libraries seem to happen in our neighboring ecosystems: Ruby (and Rails).

I have to admit that sometime other languages are more "fun" to dabble with. I use Python and Ruby. I like Python because I don't have to argue when it comes to code-style. Pythonic (PEP-8) or GTFO. It's not that I hate innovation or artistic coders, it's just that I'm a discipline person. Best practices in most cases, pragmatics when needed, hacks when the world ends tomorrow.

Companies chose Java for varieties of reasons and yes, one of them is the available pool of talents. I'm sure we all have heard the old phrase "enterprise developers". Some of them are bad, while others are quite sharp when it comes to the typical enterprise stack. Some of them can design systems/libraries quite well. Spring Framework comes to mind. Google Guice, Google Guava, Android are next (yep, crazybob used to do EJB and enterprise Java stuff yet he's one of the sharpest Java dude I've known).

I noticed that some of the well-run enterprise systems do have a better infrastructure planning thus forcing people involved around it to know better when it comes to certain technology choices. I'm sure there are web startups out there that just keep on hacking PHP code and use MySQL without having plans for backups, recoveries, etc.

Of course these are anecdotal experiences of mine.


    > On the other hand, many people seem to come out and say that Ruby is _very_ slow. 
    > Is it heaven-and-earth slow?
Comparatively, I would say yes. Granted, most of the time it won't matter because you are waiting on IO (disk/network), but if you are doing cpu intensive work, it is slow and you probably need to drop down to C or offload that work to another service.

    > How is Erlang more scalable than Java? In what area? horizontal vs vertical scaling?
    > developer's productivity (or team performance) scale? performance? speed? Erlang seems 
    > to excel in a niche area (in a positive speaking).
My guess would be in single server scalability. Erlang's write-once variables and actor model, combined with a good VM ("green processes") make it very single-server-scalable (verticle). It also has good built in node-to-node communication mechanisms (horizontal). Performance is probably slower than Java though. And I imagine the developer pool is much more limited than that of Java.

    > What about Haskell/Ada, how are they safer than Java? 
    > Do they have better type-systems? handles NULL better than Java? 
    > Bulletproof from developers? detect more bugs?
I meant safer in the type-safety sense, yes. There are also classes of static analysis tools for both. Granted, my knowledge of these languages is quite limited.

I certainly see your points (especially about liking the code hygiene of python), and agree that Java is not going anywhere soon. I guess I don't understand why a startup, or individual developer, would choose Java over other languages, even other languages on the JVM, for new projects.

Thanks for the good discussion. :)


Java ecosystem has a lot of static analysis tools that can integrate to almost all popular IDEs and Continuous Integration systems. Findbugs, PMD, JDepend, Sonar (recommend to check Sonar).

Checkstyle is another tool that I use since I'm kind of the annoying dude when it comes to code-style. (Have you seen GWT API code? it's like written by one person as opposed to a few developers with different perceptions of "readable" code. I like that kind of thing).

There are a few reasons why startup/individual dev would choose Java:

1) Previous experience in Java

2) Java fits better for the type of problems to solve (intensive computational that requires Hadoop like infrastructure)

3) Emotionally attached to static/compiled language with nice IDE so that one can navigate the source code easily whether the code base is large or small (sometime not all decisions are rational and I'm okay with that because developing software requires more than technical skill; it also requires passion).

4) Marketing (if you're targeting the enterprises). Zimbra, Jive Software, Compiere, Alfresco, Day software, Liferay, Salesforce used to be startups.

Java ecosystem seems to learn and grow in a much better speed thanks to the following actors:

- Rails (Spring Roo, Spring MVC, JPA 2.0, and possibly MVC framework from the upcoming JEE releases)

- C# (Java 7 new features, Java 8 closures/lambda. Yes, Lisp does this first, but I think C# forces Java to implement closures more than any of its competitors).

- REST/JSON/WS (Check out the latest JAX-RS, supports REST, JSON, XML, Atom-Feed, and JAX-WS)

- I/P/SaaS + Cloud Computing (Targeted for Java EE7, deployment, infrastructure to support multi-tenant, etc).

NB: Just so that I don't sound like a Java fan-boy, I use Java by day but I use and help to promote and organize Python community overseas (of course by not comparing Python vs Java :)).


Where are you pulling your hunch from? If anything, most of the ruby & node developers came from the back-end world of Java. I know I'm one of these people. Backend java developers have to use configuration heavy IOC frameworks like Spring, Guice, Hibernate, etc, whereas most of these ideas can be emulated in a more flexible language like Ruby.


Guice is configuration heavy? That's the first time I've heard about that. The last time I used Spring, I only have to provide one applicationContext.xml file that contains the XML header (XSD stuff) and 1 line of configuration to inject _every_single_injection_required_for_my_app_

Things changed.

Perhaps I was misusing the word "back-end".

When I refer to app-developers, I'm pointing toward people who build web-apps using Struts, Spring, JEE, EJB (I see where you think that back-end means completely EJB/Service/Hibernate).

The non-app-developers seem to keen on building infrastructure around the Java ecosystems:

Hadoop, HBase, Cassandra, ZooKeeper, custom server using Netty or Apache Mina. Or even building platforms such as GWT, Android.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: