learning ruby

, posted: 24-Jul-2007 11:38

this morning, i went to the "Learning Ruby" tutorial. it started off quite borring - it really was a beginner's tutorial it picked up pace after the break. Some interesting tidbits:
5.times { print "hello" }
This works because EVERYTHING is an object - even the integer 5.
["apple", "banana", "cat"].each_with_index {|fruit, i| printf "num %d is %s\n", i, fruit }
go through an array, and print each. Interestingly ruby puts the value before the key. Also, penny found a good explanation of symbols in ruby http://glu.ttono.us/articles/2005/08/19/understanding-ruby-symbols

Other related posts:
Google Code Jam
ANZ's Internet banking goes to insane lengths to be more insecure..
microsoft supporting old edition of ODF




Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.

Your name:

Your e-mail:

Your webpage:

taniwha's profile

Wally (Brenda) 
Te Whanganui O Tara
New Zealand