iA


Starting with Ruby

by Vijay Kiran

Ruby language has been the talk of the town for the past one year or so. Its a scripting language like Perl, Python and TCL. I’ve programmed with perl and also had entry level experience with Python. So I started off learning Ruby recently. Coming from the Java world, where even for simple operation we have to write all the nonsense code to get to to the actual stuff, Ruby surprises me with its simplicity. Just for example consider the following code fragment in Java:

public class test{
   public static void main(String[] args){
	String[] fruits = { "apple" , "mango" , "banana" };
	for(String s : fruits){
		System.out.println(s);
	}
  }
}

Which can be done in ruby with :

    %w{ apple banana mango}.each  { |name| puts "#{name} \n" }

I’m not arguing here that you can reduce all your java code to lesser lines using Ruby. It’s just one example how Ruby handles the stuff elegantly. I’ll find out more about ruby before talking more about it!



  • Anonymous

    Hi All,
    This message is to all those who believe in PARITRANA and its ideology.
    As Tanmay had been telling in his intervies that ‘DAND’ should be regulated properly else theres no meaning in the governing body, a straight example of that is the Jessica Lal murder case where the murederer is aquitted inspite of bieng identified as killer by a fashion designer who was present on the scene.
    All these incidents make me believe more in paritrana and i have started working towards it. my first job is creating awareness about paritrana in my city(hyderabad) and secondly meeting Tanmay and his partymen. I tried to visit Jodhpur and called up Chandrashekar to fix appointment, and he informed me that nobody is there in Jodhpur and they are visiting chennai for an open debate session. So people close to chennai if you wanna meet the partymen and have a word or a meaningful discussion do contact Gopal Vasudev(Chief Advisor,paritrana) who is in chennai @ 9381202545.Tanmay(National President of Paritrana) and others will be in chennai in the first week of march.

    Regards,
    Cyno.