I don't get Java...

July 31, 2007

Java vs Ruby book comparison

Seriously, I don't! I know everyone uses it, but I really think it's overrated. Java people come to me like "Java is very nice because it works on all OSs the same way". Well, on this Fábio has a really nice quote. I believe Python and Ruby are nice alternatives because they both run on a "virtual machine" (the interpreter) and best of all, they're dynamic! That is really programmer-friendly and more productive.

Well, you might say you want something more low-level. If this is the case, then it's because performance does matter. Then You should use C or C++ and make it OS specific. Or if only a part of it must be low-level, you can extend Python with C code. Oh, and check this chart!

Right now, the only target program that I will possible do in Java is J2ME, the Java for your mobile phone. Because it's the only engine that runs on most of current phones.

Well, you can say that if I don't understand Java, I wouldn't understand C# too. Well I do, both C# and Visual Basic are languages nice to work with. Not that I like them, but I really LOVE Visual Studio and how easy it is to make some program. And it's language number one when making stuff for Windows Mobile. With IronPython and IronRuby, I hope this changes and these new languages will replace C# and VB (No, I don't see future for VBx, maybe I'm wrong...)

So, if you do use Java, please tell me why you do it (my guess is that you just can't afford the time to learn some other language so well as you know Java).

Tagged with: en, java
This post has 11 comments. Feel free to read them and leave your own.
Thanks for the quote (source: http://bash.org/?338364)

I guess the main reason for Java is its cross-platform. Unfortunately its something others languages are still behind. Even with C# Mono, there still advantages in using Java for Cross-platform purposes.

There are lots other reasons to go Java way, but personally I still prefer C#, both for its VS environment and its flexibility...
Gostos... não se d-i-s-c-u-t-e-m.

Everyone has his favorite language. Each language has advantages and disadvantages...

Notice: you haven't said why you like RoR. :-) Maybe you should start there!
I'd rather do stuff in Python than Java, that's for sure...

Now, the same dynamic nature that make Python, or Ruby, such great languages, also put them at a disadvantage when compared to Java. Python/Ruby require programmers with self-discipline while Java imposes discipline on its own. In environments where schedules are tight and programmers are lazy, you really *need* Java.

Have you noticed how dynamic languages seem to be most popular with the best/most passionate programmers? That's because they are also the most disciplined and don't trip themselves all over the "looseness" of the language.
Pedro, I wasn't really talking about preferences, but about whereas Java had advantages today.

Regarding RoR, I haven't tried it out yet. (Okay, I made the layout for Take Off People, but Sérgio did all the coding and stuff)


Carlos, that was my point. Once you know Python (or Ruby) you will never want to code in Java again! (declaring types sucks!) But I see your point. If I were the boss, I'd set Python as the standard language for projects and give programmers a bonus for ending it up shorter than predicted ;) because Python will really raise your productivity. Thanks for your opinion!
Comparing Ruby to Java is comparing two languages, and on this each one has his own preferences but if you take a look at the books you pose in the picture we're not talking about Java the language, but Java all-in-all, as in frameworks. Bring your RoR, I'll bring my JavaEE and let's see what I can do that you can't and vice-versa :-)

Please people, stop harassing by talking of something you don't know nothing about :-)

Cheers,
PP
For me the great advantage of Java is the organization it forces. It's a shit to write that much code to make simple tasks, but if you are working with a 3000000 person team, that extra time coding making packages, classes, type declarations, yadayada, will result in a much easier to mantain group work. This said, i do believe java is too complicated, for medium to small projects, but that book stack is a bit exagerated, why do you need 3 books on struts and 2 on jsp? Is it that hard? =)
After reading your post, I get the impression that you don't like java because you don't know a good IDE for "doin' it". Am I right?

If that is the case, you might want to try out Netbeans 6 M10.

Now, if you just don't like java because of it's "verbose" nature, then welcome to the club!
João, I agree that the community it's a good reason to chose a certain language over other (That's the case of the PHP projects I do). I had no idea the Java community was so good (I only hear about the CPAN...).

JP, I've seen both Eclipse and Netbeans. They're good IDEs (I can't find so good for Python, and Pydev still sucks) but they don't give me the simpleness of Visual Studio. And yes, I don't like Java mainly for that verbose nature.

For those who are reading this thinking that I hate Java, well, that might be true but NOT my point here. I am just trying to figure out if there are real any advantage in using Java.
Thinking about Java, C# and IDEs, although I haven't (really) worked with java for some time now, I know for sure Eclipse is an IDE better than Visual Studio in many ways. I still think the debugger in VS is unbeatable, but I really miss in VS the support of all the automatic refactorings that Eclipse allows for, and the ability to easily integrate with a pretty wide scope of external tools.
"If I were the boss, I'd set Python as the standard language for projects and give programmers a bonus for ending it up shorter than predicted ;) because Python will really raise your productivity."

Well, the problem is they would finish ahead of schedule but the code would look like perl...

"Once you know Python (or Ruby) you will never want to code in Java again! (declaring types sucks!)"

Java isn't all that bad, I actually like the language. Sure, it is like playing the piano with boxing gloves but, like I said, that's a requirement in most projects (where there's always someone that doesn't like playing by the rules and has to be coerced into it).

My real problem with Java (like mentioned by another poster) is the framework mentality. Not only you have all the (needed) rules enforced by the language itself, but you also have ginormous amounts of useless scaffolding code mandated by the frameworks (plus all the XML configuration files that Java people seem to love so much). What's wrong with a simple library is what really bugs me about Java.
But yes, if it were up to me, and with a small team of "trustworthy" programmers... yep, Python would rule. :)

Comment:

Author:
Email:
Website:
Comment:

About

I used to write in this blog, but I've found a better format to express myself. From now on, you may read my writings on ideas, programming and politics on my new wiki.

hCard

Name: Alcides Fonseca
Email:
MSN:
Gtalk:
Nov 24, 1988 40.197958, -8.408312

Tagcloud

Archives

Other links