Java Schools

by Zef Hemel

Joel Spolsky argues that, now that more and more universities switch to teaching Java instead of Lisp/Haskell/C, it becomes harder for him and his “generation” of computer scientists to find the talent.

In “his years” computer science was still a hard study where most people dropped out, simply because it was too hard. They learned pointer arithmetic, recursion and lambda calculus, these days, as there’s a lack of well-educated computer scientists, colleges are somewhat pressured to lower standards. One of the ways to do that is by switching to simpler languages like Java. There’s no pointer arithmetic there, it’s all a lot simpler.

The difficulty of these courses is astonishing. In the first lecture you’ve learned pretty much all of Scheme, and you’re already being introduced to a fixed-point function that takes another function as its input. When I struggled through such a course, CSE121 at Penn, I watched as many if not most of the students just didn’t make it. The material was too hard. I wrote a long sob email to the professor saying It Just Wasn’t Fair. Somebody at Penn must have listened to me (or one of the other complainers), because that course is now taught in Java.

I wish they hadn’t listened.

Therein lies the debate. Years of whinging by lazy CS undergrads like me, combined with complaints from industry about how few CS majors are graduating from American universities, have taken a toll, and in the last decade a large number of otherwise perfectly good schools have gone 100% Java. It’s hip, the recruiters who use “grep” to evaluate resumes seem to like it, and, best of all, there’s nothing hard enough about Java to really weed out the programmers without the part of the brain that does pointers or recursion, so the drop-out rates are lower, and the computer science departments have more students, and bigger budgets, and all is well.

However, he argues, if people don’t learn functional programming anymore, how can one come up with MapReduce, the one thing that made Google so massively scalable. It’s a (fairly) straight forward principle, coming from functional programming.

So do I agree with Joel? For the most part I do, the most controversial part of the article, arguably, is:

Instead what I’d like to claim is that Java is not, generally, a hard enough programming language that it can be used to discriminate between great programmers and mediocre programmers.

All I that comes up in my mind is: I don’t give a shit. Since when have programming languages become a recruiting tool?

I suppose I’m “old-school” myself, even though I graduated this (depending on when you read this) year only. My university still taught functional programming, recursions, we did do some pointer arithmetic and stuff and I’m quite happy that they did.

Be sure to read Joel’s essay. And the responses that showed up in my (Google Reader) aggregator (sometimes in feeds where I hadn’t expected it):
* Language Log: Old School
* ongoing: Recursive Spolsky
* Frans Bouma: Teaching only Java is bad?

Google Reader

by Zef Hemel

It doesn’t usually happen, but somehow I missed the launch of “Google Reader”:http://www.google.com/reader, Google’s RSS/Atom feed aggregator. I’ve been waiting for this a long time now and it seems it was worth the wait.

I’ve been playing with it for a day now or so and it’s a bit different from what I was used to, but still worth a try. You can login with your Google account, import your subscriptions and start reading them. The interface is fully Ajaxified, and feels a lot like Gmail.

Here’s the normal reading page, with a list of all new posts (right now ordered by “relevance”, don’t know how it determines the relevance):
Google Reader startpage
(Click to enlarge.)

And here’s my list of subscriptions, you can label feeds (like you can label messages in Gmail) and you can filter a la iTunes, by typing a part of a feed’s name in the filter box (it will filter as you type):
Google Reader subscriptions

So far I’m pretty happy with it. It does what you expect, the keyboard shortcuts work well (those are also what I like about Gmail so much), but some things could be improved, there’s no feed discovery for example, you actually have to type in the feed’s URL when you add a new feed, but that’s minor.

Merry Christmas

by Zef Hemel

I’d like to wish everybody a very Merry Christmas.

Enjoy!

Beyond Java

by Zef Hemel

Lately, the most talked about book in the programming language related blogosphere seems to be “Beyond Java”:http://www.oreilly.com/catalog/beyondjava/, a book written by Bruce Tate, published by O’Reilly. If I knew I’d have time to read it in the next couple of months I’d buy it, but I know I won’t.

Luckily, as I mentioned, there’s this thing called blogs which at least give me the gist of the book. Let’s first have a look at how O’Reilly describes the book:

In Beyond Java, Bruce Tate, author of the Jolt Award-winning Better, Faster, Lighter Java, chronicles the rise of the most successful language of all time, and then lays out, in painstaking detail, the compromises the founders had to make to establish success. If you are agree with the book’s premise — that Java’s reign is coming to an end — then this book will help you start to build your skills accordingly. Beyond Java will teach you what a new language needs to succeed, so when things do change, you’ll be more prepared. And even if you think Java is here to stay, you can use the best techniques from frameworks introduced in this book to improve what you’re doing in Java today.

Ok, first thing, this book is not really about Java in the sense in that you’ll learn neat Java tricks or to learn the language. It’s more about what’s “not great”:http://www.zefhemel.com/archives/2004/08/16/why-java-sucks “about the language”:http://www.zefhemel.com/archives/2004/09/03/a-better-java and particularly, it seems, why Ruby is much better.

Yes, Ruby seems to be the answer, at least that’s what all the blog posts I read seem to focus on. Why not Python? Well… I don’t know, probably because it’s lacking the killer app which Ruby does have: “Ruby on Rails”:http://www.rubyonrails.org. If you haven’t started learning or using RoR yet by the way, start now, all the cool kids do it. Ok, I’m sounding too cynical now, but actually I’m pretty happy RoR is taking off. Ruby is so much better than PHP and RoR truly is an amazing web framework.

But I’m getting off track. As I haven’t read Beyond Java myself, the purpose of this post was to link to some opinionated people that have, such as “Bruce Eckel”:http://www.artima.com/forums/flat.jsp?forum=106&thread=141312:

Where did the hyper-enthusiasts go? To Ruby, apparently. This is chronicled in Bruce Tate’s book “Beyond Java,” which should probably be titled “Why Ruby is Better than Java.” The book is roughly edited; you’ll find yourself thinking “haven’t I read this paragraph before?” in any number of places, but that’s a disappointing experience I’ve had with several O’Reilly books of late. In many places he plays fast and loose, and almost at the end of the book he declares that he doesn’t have time to learn these other languages in any depth — although he has no trouble condemning the same languages in his rush to Ruby. Such a statement should be in the first paragraph of the book: “I’ve decided that I love Ruby, so I will condemn other languages without fully understanding them” (in one sentence repeated in a number of places in the book, for example, he declares that C# is no more than a clone of Java). I’ve been on the rollercoaster of language-love myself in the past and have made similar mistakes; one error in particular was dismissing Python’s scoping-by-indentation when I first saw it (months later realizing that we always indicate scoping by indentation anyway, even when we have curly braces available). Now I try to investigate and support my ideas about these things more thoroughly. It takes a lot more time and effort to do so, but it also leaves a more lasting impression.

Just incidentally, in this post Bruce links to an “interesting page where somebody comments on Ruby’s Array API”:http://www.cafeaulait.org/oldnews/news2005December8.html, which is worth a read.

And “David Heinemeier Hansson”:http://www.loudthinking.com/arc/000551.html (the driving force behind RoR) replies:

I’m losing track of the ill-conceived comparisons, but I do know what’s astoundingly clear: Bruce Eckel doesn’t like Ruby, he doesn’t like the attention its getting, and he doesn’t like people such as Bruce Tate fueling that attention.

No beef, that’s cool. But why not just say it like that? You could even have presented yourself as the polar opposite to the so-called hyper-enthusiasts: A hyper-detractor! The label comes complete with a cape, an evil smirk, and long tirades about how the other side is no match for your master plan.

What I think? I still don’t know. I’ve been working with Python for a while and a while ago started using Java again. I must say I love how Eclipse seems to understand my code, helps me with code completion, adding try/catch blocks and refactoring. I hate the idea to lose all that in a language like Ruby or Python. But it is pretty clear that in a language like Ruby you can achieve more with a lot less code. So, yeah, I’ll keep my spectator seat for now.