This post originated from an RSS feed registered with Ruby Buzz
by Antonio Cangiano.
Original Post: On Ruby and Rails Criticism
Feed Title: Zen and the Art of Ruby Programming
Feed URL: http://programmingzen.com/category/ruby/feed/
Feed Description: Antonio Cangiano's blog about Ruby development.
If there is one thing that politics teaches us, it is that humans have different views on how to approach and solve problems. In politics no party has the solution for all problems that affect society. Some ideas are objectively more promising than others and have a track record of being implemented with success, greatly benefiting the general population. But typically it’s not possible to state that party X offers the perfect solution for each problem, nor that any single ideology is the panacea for society. Granted that this holds true, the humanist imprint of modern society and centuries of history show us that an ideology like democracy appears to be a much better choice for most people than, say, a totalitarian regime where communism or fascism is in power.
In the programming world things are not that different after all. There are more “liberal” philosophies such as dynamic typing, Open Source, and Agile development â just to name a few. And more “conservative” ones like static typing, proprietary software, software patents, and languages entirely promoted by big corporations. Just like in politics, none of us holds the absolute truth. It’s a matter of applying the more appropriate philosophies (or in practice, methods and tools) to the art of solving complex software development tasks and problems.
Warren Henning wrote an article titled If Ruby is so great and opportunely filed it in the âPoliticsâ category. He asks a few rhetorical questions – nothing terribly new to be fair â in order to somehow question the value of Ruby. Articles like that always cause me to smile, and Iâm often tempted to just move on. But I feel compelled to use it as inspiration for a broader topic, the handling of criticism in the Ruby and Ruby on Rails communities.
The Ruby and Ruby on Rails communities have a lot of passion. We love our language, created by a very cool guy (and maestro of humbleness) in Japan. We love our framework authored by a Danish GAP model, and we really enjoy the spirit in the community which grants refugee status to all PHP and Java developers out there. We have the best non-paid marketing department in the world. We started the revolution which is powering most of the new social websites out there. All these points may cause some people to consider us Ruby and Rails developers as being âreligiousâ about our tools of choice. Religious as I intend it, implies a dogmatic acceptance of a supposed truth. A religious attitude can be seen as blind acceptance without questioning, and Ruby and Rails developers are definitely not âreligiousâ according to this perspective.
Most of us have experimented a lot with other languages and technologies before declaring that we love programming in Ruby, and quite a few of us donât merely settle and continue to explore the world of possibilities offered up by the software development field. It may sound pretentious, but most Ruby developers know what theyâre talking about and are just âpassionateâ about it, not âreligiousâ.
A passionate community is emotionally easy to attack and may produce inopportune responses in defense of whatever has been questioned. Over the past three years Iâve heard a few bad things about Ruby and Iâve seen all sorts of responses, which in some cases were simply overreactions. After a while you start always hearing the same complaints or excuses for not adopting Ruby or Rails. My bottom line is: let me show you something cool, but feel free to use whatever you like. I think that itâs important to promote valuable technical solutions, languages and tools for software problems; but the acceptance of these is not a passive process. We can encourage and show the benefits of a given technology, but we canât force it down the throats of developers whose primary language preference is different than ours.
Sometimes the accusations towards Ruby or Rails are just ridiculous and are factually inaccurate. It is important that as a community we debunk these myths and unjustified criticisms. But itâs just as wrong to react with denial towards genuine criticism. For example if a blog states for the nth time that the Ruby interpreter is slow, there is no point in saying thatâs not true, and that the benchmarks on the language shootout are bogus. Sure they are not accurate and may be considered worthless by some, but letâs be honest, we know that Ruby is slower than many other languages, why deny it? Iâve no problem with recognizing that Haskell is much faster than Python and that Python is faster than Ruby in most scenarios. There is nothing to hide or get upset about; Ruby is a wonderfully designed language whose main implementation is currently suboptimal.
Generally speaking, Rubyâs shortcomings arenât sufficient enough grounds to discredit the language as a whole. Pointing this out in an argument is a better strategy than denying the problem a priori. As a matter of fact, I find Ruby to be fast enough for most tasks (on modern architectures), while still recognizing that an equivalent program in C would most likely be much faster. An even better road to take would be to provide examples of how computationally complex problems can be dealt with efficiently in Ruby, highlighting the best practices and the existing workarounds to deal with Rubyâs current weaker points.
My favorite approach is the one taken by brilliant people like Ola Bini and Koichi Sasada, which provides concrete answers to Rubyâs main criticism by working on optimizing Ruby (at this point you can consider it a language with multiple implementations). We should listen carefully to valid criticisms because they are a reminder of where we should focus our attention in order to improve what is an already capable language. With the expansion of the Ruby and Ruby on Rails communities, Iâd love to see a trend towards the adoption of a compromise between the excellent marketing of DHH, and the humble and objective nature of Matz (it’d be dangerous if you got it the other way around ;-)).
The short post “If Ruby is so great” is not conceptually far from a hypothetical and rhetorical post entitled, âIf Democracy is so greatâ, in which the validity of democracy as a political basis for society is questioned. In such a post one could point out the defects, drawbacks or even limits of democracy, but democracy wouldnât be any less important and valuable. I sincerely believe that democracy is a great achievement for humanity and the cornerstone of a more equal and fair society, but there is no implication that itâs perfect and that itâs the final solution for all of the worldâs problems. Ruby, in the field of general purpose programming, and Rails in the Web development arena, are no different.