Java People, Stop Worrying and Start Coding!
Ruby is being hyped pertty hard right now, just like Java was ten years ago.
I classify myself as one of those developers who don't get Ruby, just like I don't get Perl. Both are too hard for me. And there seems to be something in my brain that prevents me from learning both. It's strange I never had the problem with C or C++ or Python or Lisp or awk.
So, the hyper-enthusiasts have left the building. They went for another programming language. They claim that the other language is five to ten times more productive than the current languages, even though the other language does not have very good stories in terms of IDEs, GUI toolkits, multi-processor/multi-thread support, or distributed transaction management. They claim that the other language supports object-orientation far better than the current languages. They claim that the other language handles a big chunk of the tedious work we do in the current languages automatically. And they have a fifteen minute demo that anybody can download from the internet and fire up and be in awe.
Am I talking about Ruby? No!
I'm talking about Java—ten years ago. Yes we did all these when we were young. We downloaded HotJava, the world's first Java-enabled browser, fired it up and saw the animated website and liked it. We wrote our first Java applet in AWT 1.0 and it felt just so right! We were hooked. We left C++/COBOL/Fortran behind without ever looking back, proclaiming them "bad memory that is mercifully fading away."
Yep. That was us. Now ten years later, it's our turn to be on the other side of the flood gate. And it can be a scary time. What are we to do?
Well, you can follow the hyper-enthusiasts to the new pasture where the grass seems greener, if you believe them and you can stomach the new language. It will be fun. It will be exciting. For a while. But you won't be more productive than you are now. All the new things take time to learn. All the new missing features will need to be added into the mix. You will also constrain yourself into the narrower domain—Rails based webapps. If this is what you choose to do, I wish you luck.
Actually that's what I did when Java came around. And it has worked out great for me. But I was looking for another language anyway. My old language, a proprietary 4GL for developing client/server applications on Windows that everyone in the team loved, died, edged out by a language that's inferior but cheaper.
Or, you can stay with Java. That's what I would like to do this time. Let me explain why.
One, I just don't like Ruby. This has more to do with how I think and work than with the true quality of the Ruby language. I'm sure Ruby is a fine programming language offering good OO features. But there is something in it that rubs me the wrong way. I tried to learn it when the first edition of the PickAx book came out. But somehow I can't get past the "we are so OO, we write 3.abs instead of abs(3)" noise. I'm sorry. It's not for me. There. I said it.
I used to be afraid of saying such things publicly. Fearing other people would say "this guy is an idiot, can't even learn Ruby." I've been doing this line of work long enough to know that I'm not an idiot. Just like there are people who like Java and people who don't like Java, I think it's only natural that there will be people who like Ruby and people who don't like Ruby.
Two, I'm a slow person. It took me years and years to become really fluent and comfortable with the whole Java environment. My experience tells me learning the syntax is the easiest part, and learning the standard library and third party libraries takes a long long time. Even if I liked Ruby, it will be years before I can be as efficient in it as I am in Java. The at least ten times increased productivity that's cited last year, has been reduced to 10%-50% this year. My fear is that even the 10% number is for hyper-enthusiasts only. For the rank and file, it will more likely be no productivity for the first six months, reduced productivity for the next year and a half, and on par productivity for the next two years. By that time, the Ruby hype should have already died down. There will be a new media darling on the horizon making outlandish claims. What do you do then? Abandon Ruby for this other new thing?
Three, I think Java has a very bright future. Not as glorious as in the past ten years, but bright nonetheless. Java's fundamental strengths in OO, multi-threading, security, networking, dynamic remote class loading, distributed computing, GUI development and advanced and relatively performant runtime make it a strong contender as the language of choice for a wide variety of computing tasks.
The recent raft of proclaims—such as this one: Java is so Nineties—should be read under some critical light. They sound very much like press hits to me. The press has an internal need to hype something. Something new and exciting. They also has a tendency to get tired of them fairly quickly. When something goes off the radar screen of the press, it's not the end. It's just a new beginning. The beginning of the next phase in maturity.
With the hyper-enthusiasts gone, Java enters into a new age. The age of calmness, clarity, and confidence.
Re: Java People, Stop Worrying and Start Coding!
There is absolutely no shame in admitting not understanding a certain language. These things are completely personal and everybody's brain is different.
And interestingly, this very fact is one of the reasons why despite my deep fondness for Ruby and Ruby on Rails, I still think they will not become mainstream. They fit and please my mental schema very well, but they have an undeniable "foreign" taste that I bet will not work with a lot of developers.
Re: Java People, Stop Worrying and Start Coding!
Re: Java People, Stop Worrying and Start Coding!
It appears to me that the original hype was about Rails and it extended to Ruby and scripting/dynamic languages, but it's really Rails where productivity gains come from. I completely agree that Rails is much more suited to a CRUD web application than Struts, Wicket, JSF, etc.
Re: Java People, Stop Worrying and Start Coding!
Re: Java People, Stop Worrying and Start Coding!
And ouch. It would sure be great if this site did paragraphs without me inserting <p> tags. Ah well, my fault for not previewing. Second try:
"you can stomach the new language. It will be fun. [...] You will also constrain yourself into the narrower domain—Rails based webapps. If this is what you choose to do, I wish you luck."
Will you? By knowing two languages you can now pick up Rails jobs as well as Java ones. And ones requiring you to know both languages.
Also, every language you learn will broaden your mind. You will learn things. You will be able to use these new things even in languages you have learned in the past.
Learn a new language and learn its idioms. You might learn something new, after all. Something that is useful in situations you have been before or in ones that you haven't been in before.
By only really knowing one single language on the other hand you risk yourself to mono culture. (Please note that I'm not talking about you here. I'm just going to the opposite side of the earlier sample.) To blindly following what others consider to be hip. Believing the hype without understanding the reasons.
I liked the part where you talked about how Java has used the same hyping that made Rails so popular. This is enlightening.
I think it is a bit sad that you can not wrap your mind around Ruby, but I won't dislike for it as long as you don't just dismiss Ruby as being a fad. The language has good sides. This doesn't mean everyone has to use it, but I think it is important to have a look at it before deciding whether it is useful for one self or not.
You have already tried Ruby, I know, but there is other people out there who haven't. So I'd suggest trying Ruby to those people. It doesn't take long. It will actually give you facts you checked yourself to base your opinion. And it only takes a few minutes...
TryRuby makes trying out Ruby amazingly simple.
Oh, and please: Learn the language before you startd picking up frame works. You don't want to start reimplementing the standard library after all...
The truth is: Ruby works. For some people. Python works. For some people. Java works. For some people.
Sometimes multiple languages even work for the same people at the same time. This is great.
So let's stay open and friendly towards new ideas (this is IT after all, right?) and let people use whatever they feel most comfortable with. :)
Re: Java People, Stop Worrying and Start Coding!
> TryRuby.
> The truth is: Ruby works. For some people.
> Python works. For some people.
> Java works. For some people.
That's exactly what I'm talking about. I agree with you here.
Re: Java People, Stop Worrying and Start Coding!
TryRuby.Try Yu-Shiang Pork.
I tried to try it, but unfortunately that link just points at a comment briefly mentioning that "it's the best food in the world". Now I would like to genuinely try it, because honestly that sounds like a very bold claim.
Of course I remain sceptical, but it could be true after all...
:)
Re: Java People, Stop Worrying and Start Coding!
Re: Java People, Stop Worrying and Start Coding!
Re: Java People, Stop Worrying and Start Coding!
There's a difference between being just honest and flat out insulting.
You are appearing like a troll right now, but I'll give you the benefit of doubt despite posting anonymously and with so much aggression.
May I then ask what kind of sample code it was that you were confronted with?
Sorry, but that posting just sounds like you never seriously tried the language out at all.
I'm not sure how I'm starting my career over when I pick a new language. Is all my old knowledge just going a way all of a sudden?
It's true. You will be new in the language and some of the concepts but it, but that is a good thing.
Also APIs won't be the same, of course, but I don't see how that would spoil your experience coding in other languages.
Also would you rather work with people who have spend 10 years getting familiar with the most obscure areas of Java or ones that have shown to quickly adapt to new languages and circumstances -- people who have knowledge of what else is available out there and how and when to use it.
I'm just not sure how you can seriously believe that Java is the best match for everything one might ever want to do. Are you sure that this really is your opinion?
Re: Java People, Stop Worrying and Start Coding!
Re: Java People, Stop Worrying and Start Coding!
Re: Java People, Stop Worrying and Start Coding!
The great thing about Ruby is that now, as Java guys, we can see how annoying we were ten years ago with some of the claims we were making about it.
Rhetorically speaking, if you are a rubyist and you are convinced that Ruby is going to take over the world, then go for it! You don't need the permission of current Java developers and you don't need our agreement that it is the true light (TM).
Re: Java People, Stop Worrying and Start Coding!
You can easily find 3000 lines of (say) Java which are more comprehensably than 10 lines of PERL. Though I haven't seen the reverse, I'd guess it'll be somewhere out there.
Stop claiming "yours is shorter", cleaner or whatever, just provide your users with nicer solutions and win the race.
Re: Java People, Stop Worrying and Start Coding!
One really simple one: RegEx. Java does not have a special string type that will allow programmers to avoid the standard escapes, especially \\. This renders most RegEx impossible to read. Indeed, several folks have build "converters" that let you type a RegEx without the \\'s .. and other vanilla string problems, converting the more readable form into the Java nightmare.
Other issues: billions of maps and lists with awkward iterators. Redundant declarations like:
Foo foo = new Foo().
Couldn't we get rid of one of the Foo's!!
IDEs help enough that we are starting to ignore these problems, but Gawd, java is verbose.
In other words: I love Java. I hate Java. Dear me!
Great article and comments, btw.
Owen