Friday, November 28, 2008

R for Ruby, R for Restless, R for Remodelling, R for Ridiculous!

Oh Well, I had never been interviewed by software major Google but I read in some blogs that they ask for the candidates favorite equation. My favorite equation is that of a rectangular hyperbola xy = c^2 (Read C squared)

Because this explains life. As you see, this is the equation of trade-offs. And pals, what is life ? Isn't is a conglomerate of several trade-offs?

Well, take newly popping up programming languages for example, Ruby. The creator of this language claims that it is "Beautiful", because it is script like (Almost a close cousin of MATLAB).
MATLAB and Ruby scripts both lack the details about the variables involved in the code, which makes it reasonably and arguably difficult to debug.

People say, Examples are better taught. Let me try!

int x = 10;

x = {}

In the first declaration, the programmer will know right away that x is nothing but an innocent integer which is initialized with a "Ronaldinho Gaucho's Jersey No" or my "Grandpa's Shoesize" or something that can take up the value 10.

But, dear Ruby coders, the second statement can mean anything. x can be a simple array, can be a hash table, can be a string. Unless we use it, you will not know our intention.

It is like, I give you a box and ask you to wait like "Pandora" until late. Then you know....
Abstraction is good as far as the users can make out what is the interface. Nothing more is judicial.

Other bad feature is everything in Ruby is an object. For example

type of code is possible in that language. Which is Ridiculous and Redundant. Because a simple age old function like

DateTime AddDays(int)

would do the trick.

These features will only make the code more unreadable.

So brevity is not always synonymous with beautiful. These are the basic reasons I don't use Ruby or that kind of cryptic (Yes you read it right) languages.