Archive for May, 2007
So you want to do something with Ruby but think there’s not much you can do? Rubbish!
Below is a list of just 7 things you can do with Ruby.
- Name your daughter or puppy Ruby - Peter Cooper reports that Ruby has become the 4th most popular name in the UK! Dan Kubb named his puppy Ruby.
- Draw Cartoons for Ruby - whytheluckstiff popularized Ruby with his excellent cartooning ability in his book Why’s (Poignant) Guide to Ruby.
- Become Famous using Ruby - Build a ‘killer’ application using Ruby like David Hansson did with ‘Ruby on Rails’.
- Write a book on Ruby - Bruce Tate, David Black, Hal Fulton, James Edward Gray II, Peter Cooper to name a few, have done it. If you have the knack and the knowledge, write one.
- Build a business around Ruby - Peerant amongst hundreds of other companies are doing it. Why not you?
- Have fun - My RubyLearning.com site’s motto is - ‘Ruby helps programmers have more fun…’ Why not?
- Blog about Ruby - And finally like me, if you have nothing better to do, blog about Ruby!
In conclusion: I could go on and on (and I probably will)…
Update: The 7 Things can easily become 10 or 25 or 50 Things -
- Teach Ruby - Like I do at the University level.
- Start a RUG - I started a Ruby User Group - PuneRuby. The experience has been satisfying.
- Monetize your Ruby site/blog - I use Google Adsense. Atleast it covers my domain and hosting costs!
Technorati Tags: 7 Things You Can Do With Ruby, Humor, Ruby, Ruby on Rails
Posted by Satish TalimChinmoy Gavini has a nice set of 6 videos that introduces you to Ruby programming. Do check these out and give your feedback.
Technorati Tags: Chinmoy Gavini, Ruby Videos
Posted by Satish TalimThis brief Ruby MySQL Tutorial shows you how you can connect to MySQL in Ruby. MySQL support in Ruby was made possible by Tomita Masahiro. He has developed a pure Ruby binding called Ruby/MySQL. We need to install the same on our PC and the installation (you need to be connected to the internet and it takes some time) is as shown below:
C:\>gem install mysql
Bulk updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i386-mswin32)
1. mysql 2.7.1 (mswin32)
2. mysql 2.7 (ruby)
3. mysql 2.6 (ruby)
4. mysql 2.5.1 (ruby)
5. Cancel installation
> 1
Successfully installed mysql-2.7.1-mswin32
Installing ri documentation for mysql-2.7.1-mswin32...
Installing RDoc documentation for mysql-2.7.1-mswin32...
C:\>
This installs mysql-2.7.1-mswin32 driver which is faster and supports MySQL 4.1 and later. The documentation for this driver is here.
I will assume that you’ve already installed mySQL 4.1 or above on your PC and that you have it running and are familiar with the basics.
Now, run the mysql client program from the command line, as:
C:\>mysql
You should get the mysql prompt. Next, create a database ruby as:
mysql> create database ruby;
Query OK, 1 row affected (0.02 sec)
Next, create a table student in the database ruby as:
mysql> use ruby;
create table student (id VARCHAR(2), name VARCHAR(20), rank VARCHAR(2));
As a first exercise we try to connect to the MySQL server and print all the names in the table student. Program p078rubymysql.rb
require 'mysql'
#my = Mysql.new(hostname, username, password, databasename)
con = Mysql.new('localhost', '', '', 'student')
rs = con.query('select * from student')
rs.each_hash { |h| puts h['name']}
con.close
It is as simple as that. You can explore this api further.
Technorati Tags: MySQL, Ruby, Ruby MySQL Tutorial
Posted by Satish TalimRuby is growing in popularity by leaps and bounds. For those looking at learning Ruby, there are many online resources available. In case you want to learn Ruby offline, then here is a list of all the free, Ruby eBooks available for download.
- Ruby Study Notes. A thorough collection of Ruby Study Notes for those who are new to the language and in search of a solid introduction to Ruby’s concepts and constructs. Download this Ruby eBook.
- The Little Book Of Ruby. It will guide you through the fundamentals of Ruby programming.
- Mr. Neighborly’s Humble Little Ruby Book. It walks you through the very basics of working with Ruby.
If you have come across any other free, downloadable eBook on Ruby then please post a comment with the url.
Technorati Tags: Ruby eBook, Ruby eBooks
Posted by Satish TalimSiddharth Karandikar a PuneRuby member and some of his friends are hard at work in creating paahijen.com - a suit of applications in Indian languages. I asked Siddharth to share some of his experiences with us.
Could you tell us something about yourself - your background, where you are based?
I am Siddharth Karandikar, a Computer Science graduate (2002) and based out of Pune. Most of my work experience has been in Java/J2ee and Linux scripting.
Could you tell us a little more about paahijen.com?
All of this started a few months back. Basically, Marathi being our mother tongue, we always wanted to be able to write a blog in Marathi, without having to download/install any software on our computers. Hence we started thinking about doing this. Then we realized that there is a lot more that can be done. While working on some specifics, we came up with the idea of Tag based advertisements called TagWise. We had applied to Y-combinator for this idea. Though, we got shortlisted, we couldn’t make it to the final funding. It was kind of a blessing in disguise for us! We decided to make paahijen, more than just one application, a suit of applications in Indian languages. We also decided that we MUST support all major Indian languages, as there is too much of fragmentation in the web apps today and there is not much of “critical mass” anyone is gathering. Also, doing this will certainly make the net more accessible to a larger community than is today.
Though paahijen is a Marathi word, there is really nothing “Marathi only” for paahijen.
Since we work on weekends only, the progress has been a bit slow on this front, but I think (or at least hope so) that the progress is not too slow.
It is heartening to see an Indian website that caters to millions of Marathi speaking people. Do you plan to introduce paahijen.com for other Indian languages?
As of now, paahijen supports Marathi, Hindi, Gujarati, Kannada, Tamil, Telugu, Bangla, Punjabi, Oriya, Malayalam and English. 11 languages in total.
Why did you choose Ruby on Rails (RoR) as a framework for paahijen?
I came across ROR when I was digging into some Python web framework on one of my projects. And in no time, ROR was the winner for me though the project continued to use Python. ROR is a very nice MVC framework with “good defaults”. Once you jot down the basic and important details of the application you are thinking about, ROR enables you to get started with the application development very quickly. When I introduced ROR to my friend Abhijit he also thought that ROR was a good choice.
Were there any surprises in working with RoR?
There were many good surprises. One of them is using ‘https’ while authentication. It got done in just few line of code.
What is your impression about the RoR scene in India?
Individual developers like me are using it because of personal interest, ease of use, small learning curve and supportive community. But my guess is, bigger IT companies are still not sure about going with these new platforms.
Getting back to paahijen.com, what are your future plans?
I think we’d be coming up with another application soon and a few more in the coming months!
Go on! Digg It !
Technorati Tags: India, Pune, paahijen, Siddharth Karandikar
Posted by Satish Talim



