Archive for the 'ruby' Category
5 sins of ruby
By Justin Silverton
Introduction
Ruby has become more and more popular over the past couple of years. This month, I decided to start coding a few smaller apps to see if there was something I was missing. The following are a few issues with ruby that I feel need to be changed, before it really becomes a mainstream language.
1) Horrible syntax
It looks like a mix between Visual Basic and Pascal. I can’t imagine coming back to a large project with hundreds of files and functions and trying to keep everything organized. It would be even worse coming back to a project that someone else created.
2) missing/lacking documentation
Most popular languages are documented very well. For instance, you can go to the main php website and find out how to do pretty much anything (in english or almost any other language). Ruby’s documentation is available, but needs a lot of work to help out developers that are learning the language.
3) slow
Ruby is noticeably slower than other interpreted languages. I am not the only one that has seen performance issues. More on this can be found here. Jruby, a pure-Java implementation of the Ruby programming language, might help increase execution speed.
4) lack of libraries
Just searching google for ruby libraries or extensions doesn’t return many results. This also might be because it is a relatively new language compared to much older languages such as Java or PHP.
5) poor unicode support
Although there are Third party libraries that enhance ruby unicode support, it should be built into the language itself.
11 comments5 reasons not to use ruby on rails
By Justin Silverton
Introduction
wikipedia defines ruby on rails as the following:
Ruby on Rails, often called RoR, or just Rails, is an open source web application framework written in Ruby that closely follows the Model-View-Controller(MVC) architecture. It strives for simplicity and allowing real-world applications to be developed in less code than other frameworks and with a minimum of configuration. The Ruby programming language allows for extensive metaprogramming, which Rails makes much use of. This results in a syntax that many of its users find to be very readable. Rails is primarily distributed through RubyGems, which is the official packaging format and distribution channel for Ruby libraries and applications.
I have worked on a couple of projects with ruby on rails and in my experience, it is not ready for large-scale applications and other languages should be considered (asp,asp.net,PHP, or perl) before taking on a project.
Here are the 5 reasons why I am not going to be using ruby on rails for my next project:
1) it’s a buzz language
As a consultant, I’ve come across many clients that only want to use ruby on rails simply because they’ve heard about it in the latest issue of their favorite tech magazine. Just because a language is the latest buzz doesn’t mean it is more powerful a better choice for the job.
2) The language is young
It was released to the public in July of 2004 (source: http://en.wikipedia.org/wiki/Ruby_on_rails#History). Many other languages have a better history and track record.
3) Poor support for IIS
Even though I personally use apache+linux or freebsd, there are still many corporations and sites running IIS. Although there are docs explaining how to configure it properly, the difficulty and lack of information leads me to believe that it is aimed at a *nix crowd.
4) creates dirty code
Here is an simple example of ruby code (it takes the factorial of a number):
if n == 0
1
else
n * fact(n-1)
end
end
This may work for small scripts and apps, but large applications with thousands of lines of code and hundreds of source files will be very difficult to manage with this type of syntax.
5) scalability
I’m not saying ruby does not scale, it’s more of a question: Does it scale? this one also ties in with #2. I have not come across any large, feature rich, and popular website or service using ruby on rails as its main powerhouse. Until I can be confident that it is indeed possible, I am going to focus my attenion on other languages.
Conclusion
I believe that you should always use the right tool for the job. Many people get caught up in the newest buzz words and languages, but aren’t looking at the overall picture. Ruby is a promising language, and works well for small scripts and utilities, but shouldn’t be used it large-scale applications until it is a proven technology.
24 comments





