4 ms·
I use Java in my day job and it's easy enough to write code in. The problem with it for me is, it's totally unusable for writing quick command line scripts/app
by djhworld 14y ago
I use Java in my day job and it's easy enough to write code in.
The problem with it for me is, it's totally unusable for writing quick command line scripts/applications because you need to either
a) Run java -cp <classpath> <class-with-main>
b) Write a shell/batch script to do the above.
Then there's the lack of good stuff found in modern languages like first class functions.
It's not all bad though, recently I've been learning Go and the lack of generics makes me pine again for Java like a long lost love.
- jjohns 14y agoI'll be honest, though I have my issues with Java, I've been following along with James Gosling as he's transitioned through different projects and I have to agree with one thing that I think really differentiates Java from newer languages--when you really need to scale in orders of magnitude (like Twitter), then Java is beast. It doesn't make it easy, but then again, the solution to difficult and large problems wasn't going to be easy to begin with.
- lucaspiller 14y agoI'm not familiar with scaling Java, but I've worked with the language itself on Android. What makes it so great for scalability as opposed to something like Ruby? If you are using Rails, the database is the problem 99% of the time, not Ruby. MySQL can easily* be scaled / denormalised / sharded then if you need to you can just horizontally scale your app servers. (*As easy as MySQL can. It isn't a black magic though, there is plenty of documentation, e.g. http://www.mysqlperformanceblog.com/ http://www.mysqlperformanceblog.com/)
- ehsanu1 14y agoRuby just sucks for vertical scalability, rather than horizontal. Ruby's just slow, and I say that as someone who works mostly with Ruby: http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=java&lang2=yarv http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...
- randomdata 14y ago> when you really need to scale in orders of magnitude (like Twitter), then Java is beast. The core Twitter service is still a Rails app though. There is nothing inherit to a language that makes it scale better than another, but different languages are better suited to different problems. As a result, Twitter does make use of Java in some capacity, but they also use a plethora of other languages where they make the most sense.
- sbanach 14y agoReally? requiring a shell alias or a one line shell script to shorten your invocation makes the entire language 'totally unusable'?
- jjohns 14y agoYou kinda have to agree that writing anything in Java isn't exactly... "fast". That said, I don't use Java for "quick answers" -- if I want something that super easy and needed tomorrow, I'll do it in Ruby (especially if I know that it's not going to need to scale massively or get tons a hits and requests).
- djhworld 14y agoIt makes distribution a PITA and faffing around with the classpath string is also a PITA