Failures of a Monolingual Culture
June 14th, 2008
There’s a joke that I’ve heard several times over the years. I don’t think I’ve ever told it for a laugh, really just as part of a larger discussion. It seems to apply here.
What do you call someone who speaks three languages?
Tri-lingual.What do you call someone who speaks two languages?
Bi-lingual.What do you call someone who speaks one language?
American.
Now, as an American who speaks only one language, I feel kind of offended but, I do get the bigger concept of the joke. That concept appeals to me as a developer. I’ve always found value in being familiar with multiple languages and tools; it’s always made it easier to chose the right tool for the job.
While the ideas here apply to developers in general, being part of the Ruby/Rails community I’m going to focus on that community.
Observing the Herd
I’ve always been bothered by the disdain shown for “foreign” technologies by the Rails community. The two biggest being the database and JavaScript.
The cheers I heard at the RailsConf MagLev presentation to someone shouting “screw relational databases” represent this problem well. There were many interesting aspects to MagLev but, what I heard the most about was the potential to do away with relational databases and do everything in Ruby. This is only the tip of the ice-burg as far as hating relational databases in the community.
The impetus for writing this post itself was a friend and fellow Ruby developer tweeting “wishing i could write iPhone apps in ruby.” Hearing something along those lines is all too common.
There are obviously exceptions and I applaud those exceptions but, I’m not talking about them in this post.
A Crippling Love For Ruby
The Rails JavaScript helpers have always been a sensitive topic for me. I’ve honestly never used them beyond the prototype phase in a project. I’ve always tried to go the unobtrusive route and hand-code my JavaScript. I do use jQuery though, I’m a bit insane but I’m not a masochist. Put simply, I’m a web developer and JavaScript is the language for programming in a web browser.
Another sore spot is the database. The common Rails idiom seems to be to do everything in Ruby and to avoid things that can’t be expressed in Ruby. This can lead to incredibly naive implementations that would run exponentially better in the database.
Before I hear the bellows of “premature optimization.” Knowing your tools and using them appropriately is not premature optimization. Things such as triggers and stored procedures can be incredibly powerful and should seriously considered.
Even indices seem to commonly trip up seasoned Rails developers. I’ve heard of at least a dozen instances of an application being sped up simply by properly indexing the tables. It’s just plain sad that something as simple as an index turns into a real stumbling block. This happens because the database is seen simply as a necessary evil that can be ignored until performance demands giving it a little attention.
To be continued…
I have a lot more I could cover here but, I see this post as simply the start of a much larger discussion. So, what do you think?
4 Responses to “Failures of a Monolingual Culture”
Sorry, comments are closed for this article.
June 15th, 2008 at 06:13 PM
I don’t think this is a good fit for an analogy, really.
Writing SQL in Ruby – Dumb. Why? Because SQL is a language custom-designed to let you express relations in ‘English’ text. It is way way better at its job than Ruby (or Java, or C, etc, etc) is. Using something else is dumb in the vast majority of RDBMS-backed apps. The only counter-example I can think of is the big catastrophe-ware stuff like Cognos WebReports, etc.
Writing an iPhone app in Ruby – Sounds reasonable to me. The ‘official’ iPhone languages are also object-oriented, imperative, Mac OS-framework-native languages, like Ruby. If you think Ruby is the best Mac OS-native, object-oriented language (I happen to think this myself), then wanting to program your phone with it probably makes total sense.
I hear what you are saying and agree with it, I just don’t think Ruby-on-iPhone is in the WTF territory that Ruby-as-SQL and Ruby-as-Javascript are.
June 15th, 2008 at 09:11 PM
Wilson, I don’t really disagree, that’s why I didn’t spend much time on the RubyCocoa side of the discussion. It was just what got me to write what I’ve been thinking about for a while.
I’m really just talking about the “I want to do everything in Ruby” crowd.
June 16th, 2008 at 05:57 PM
“The right tool for the job” Good old common sense. I thought it was only Java folk who clung to a single language. I assumed the Ruby community was full of polyglots :)
I would have chosen different examples, but I get your point. Perhaps this is a sign of the “mainstream” having moved to Ruby?
Java had a decent community once, then the mainstream turned up :)
There is a certain C->C++->Java culture that believes that one tool fits all, and everythng else is a pointless waste of space. The Ruby community doesn’t want to go down that route!
As for Maglev, given that it’s based on Smalltalk it could be considered a bilingual platform. Gemstone as an OODB is an interesting approach too. Its about time that the RDMS had some real competition :)
Paul
June 16th, 2008 at 10:10 PM
Yeah, I don’t think this is a problem in the Ruby community.
There was an initial Rails-driven fad to generate other languages from Ruby. It doesn’t seem to have taken hold as an idea, though.