Definitive Proof of the Blub Paradox...
...has arrived in the form of a blog post by one Lawrence Kesteloot. In this post, he attempts to show that languages are distinguished as either “production” or “toy” languages (troll terms if I’ve ever heard them) and then proceeds to slam SICP and Lisp and generally anything he doesn’t understand.
My biggest problem with this article is not the fact that someone with a masters degree in computer science doesn’t know what a fixed point is, but rather the fact that it nearly proves the Blub paradox to be true all by itself. Clearly, this author has become “institutionalized” in the Java mindset and construes brevity of expression with inscrutability. He maligns powerful languages features and elegance in favor of “understandability” by the average programmer and then implicitly marks himself as such by misconstruing boilerplate code that an IDE generates for him with readability. Ever read the code generated by Axis? No… why would you? That’s the least readable Java can be, in my estimation, but the point is that I don’t have to read it. Lisp excels at that kind of code generation task. The author seems to believe that thinking about the code you’re working with is a bad thing and that if it takes any effort at all to understand it must be bad. This thing we’re in is an art, people, not a science.
The speculation about Yahoo!’s rewrite of Viaweb also does not help his case. Yahoo! trucks in average programmers galore. Surely, there are many good and great ones there, too, just not in as great a number. As such, its not unbelievable that they could not find Lisp programmers: you typically have to be looking for something before you find it. Also, why would a Lisp guy want to work at Yahoo!? The coolest project they have going right now is written in Java. The kind of guy who hacks Lisp is unlikely to be pining for a job at Microsoft or IBM or even Yahoo! these days, nes pas? I do know some excellent “production” people (around Philly, even) that hack on Lisp and Scheme in production, but they appear to be the exception rather than the rule. Finally, I’m assuming that the author has never heard the fact that lots of the big financials choose a very high-level functional language when they need to make sure their systems are right. I bet this is partially so they can attract the very best people to those positions, as well.
I suppose the author might have also taken Amazon’s choice to dump Lisp as a sign that Lisp is not production. (assuming he was aware that it was, in fact, originally built in Lisp and C) I, instead, would take that as an indication that Amazon outgrew the ability to employ only the best people they could find. Business growth has a way of doing that to you. The distribution of talent and passion appear to be two somewhat uncorrelated power law curves and finding people at the top of both curves simultaneously is a task that will make anyone’s hair fall out and liver get harder. Plus, there are many business realities that make Blub languages more attractive for any number of reasons: talent pool, employee turnover, ramp-up time mitigation, cultural integration, etc. I write this article after having just dumped Ruby on Rails in favor of Java at my startup for some of these very reasons.
To this author I would only say that a language does not make something “production”. People do. Throw Alan Cox , Ingo Molnar and Guy Steele in a room and I bet they could write a better mousetrap in Brainf*ck if they were excited enough about it. Its never about the language. Its about the people. Full stop.
Scala presentation slides are up
Last night I gave a presentation on Scala to the Philly Lambda group. The slides are available here. It was a pretty good time and about 15 people or so showed up for the talk. The space was graciously provided in the really cool-looking Cira Centre down at 30th St. by Aaron Feng of Algorithmics. Thanks to Aaron and all who attended; I had a great time presenting!
"Sometimes you need more than one programming language"
Someone had said the above statement to me today and it stuck in my mind for some reason. I was thinking about it tonight and something occurred to me.
I’ve heard a bunch of variations on this statement before today as I’m sure we all have. Often, when I hear this statement its coming from people who would like to be able (or allowed) to use Ruby in their work projects. These places are invariably ones in which Java is the primary language and any others are either frowned upon or outright barred. The management at these places, either technical or not, typically characterize this decision as smart given the large market for engineers that know Java, the availability of quality libraries for many purposes and the inherent generality of the language. All of these are certainly true and are pretty good business reasons to use Java.
These arguments ignore the ease of use of Ruby and the speed of development one can achieve with it. They are also a form of premature optimization, as well, although in this case of business interests, not source code. Most of these shops are doing 3-tier Web applications and, as such, they are missing out if they skip over Rails because it doesn’t run on Java. (it does, but whatever)
However, it was the statement that really hit. People saying that are indicating that different languages have different strengths. Even though Java now has regular expression capabilities, you’d still want to use Perl or Ruby for a big text processing job given how many built-in facilities those languages have for that task. You’d want to use Erlang for very-long-lived server applications over Java because it was tailor-made for that purpose and Java was not. All of these points lend themselves towards a heterogeneous language environment, using a language for what its good for and not for what its not.
I wonder, though: when people tell me this, they are usually rationalizing the use of Ruby with this statement. Not “rationalizing” in that they shouldn’t be using Ruby, but rather they are seeking to get leverage for Ruby so that it might one day be in the position that Java is now. I can certainly sympathize with this; Ruby is a sweet language. Alas, you can’t get there from here today, though. The main Ruby interpreter has major problems with memory and stability and its successors are still in their nascent stages. The runtime situation is just not that good so you can’t drop Java for everything yet if you need speed/low-memory in places.
How many of the people who have said this, though, would then reverse their position and advocate for Ruby being the only language for “maintainability” or “ease of introduction to the junior guys” reasons once a strong Ruby VM was available? And how many people said the same thing in reference to Java when C and C++ were king? It seems to me that these language trends are cyclical. The new hotness challenges the old-and-busted and eventually wins, only to become the new old-and-busted.
The irony here is that the statement is true in an absolute sense. One should use languages for the things they are good for and find different ones for things they are not. To not do so is to arbitrarily shorten not only your toolset but your very range of thought. (big up, Sapir-Whorf) Attempting to use one language for all your programming needs leads to ridiculous situations like the Kingdom of Nouns phenomenon. The other strangeness with this statement is that the people who say it generally never mention the really out-there languages like Lisp, Ocaml, Prolog or Smalltalk that are orders of magnitude better at certain things than more mainstream languages. Personally, I just hope people remember the irony when 10 years have passed and all new development at JPMorgan is in Ruby running on a Gemstone derived VM.
The Rock and Why Its Bad for Your Mind 2
It would seem that Sun’s new chip, dubbed the Rock, will support hardware extentions for software transactional memories.
I tend to think of this as not such great news.
Now, I’m all for helping programmers in their work (being one myself) and making it easier to work with the parallel systems coming down the pike. However, I don’t see hardware STM support as a big step forward.
I do realize that people don’t change overnight and that all of that legacy code can’t be rewritten in a flash to take advantage of the newer, better ways always being introduced. I also realize that Sun is making the right business move in allowing their customers to “port” their code to these more parallel machines with the minimum of effort. That’s all well and good and I applaud them being the first to market on this, both from a business and a technical perspective. I’m sure it wasn’t an easy task, what they did. But making a big deal of this advance belies the ultimate truths involved here.
Its no secret that I’m a fan of message-passing concurrency in general and Erlang in specific. I believe that this is the way to go for the industry going forward. You are free to disagree, but I feel that MPC is a safer and cleaner way to go forward for the future of the industry. It removes a lot of the issues that are still problems with STM, just hidden so that only the VM and compiler guys have to worry about them. (at least initially) Not that it doesn’t introduce some of its own, but I find these to be preferable to the alternatives.
However, in the end, using STM doesn’t force programmers to write concurrent code. They are not thinking concurrently, only thinking about what to mark as atomic. This is still sequential programming. People using SQL have been thinking this way for years and I’d hardly call it concurrency-oriented. Raise your hand if you’ve worked on a project where someone kills database performance with some poorly-written transactions. All hands up?
We’re just going to have to go through this again later when the STM abstraction starts falling apart. Optimistic concurrency (the underlying premise of STMs) is only as good as the care taken to prevent lots of and/or many long transactions. Without this care, performance will suffer both in speed and concurrency. It is, after all, optimistic. Optimism just doesn’t seem to scale.
You can argue that the best programmers will do this beautifully, and I agree. But how many of us get to work with the best programmers? How many more of us have to deal with a bunch of code written by people who couldn’t wait to jump in their cars at five o’clock? To me, message-passing concurrency solves this problem in a more direct (if more initially brutal) method: it just plain forces the programmer to think concurrently. That’s the real key. Don’t mask it, make them face it.
STMs are essentially a stop-gap measure to stem the pain coming from the rise of multicore. But, like any drug, the effects will wear off and that pain will be felt. By using STMs, you’re borrowing from the future. Personally, I would think it better to just rip off the band-aid now and start learning and using the message-passing concurrency mindset today.