Ruby

Ruby, Squeak and Alice

A few months ago my 11 year old son asked me to teach him to program. Now I’ve tried this before — last time I pointed him to the Squeak website and said go forth and program. Unfortunately it wasn’t that easy. So over the last couple of months we’ve tried the following environments:RubyRuby is an industrial strength programming language and coupled with Ruby on Rails it is a great web app development environment. These were the steps we followed:1. Tried Ruby in your browser. My son crashed the browser environment — I’m still not sure how he did it.2. Completed the Ruby in Twenty Minutes tutorial. It took us more than 20 minutes…3. And now we are busy with a great Ruby tutorial by Chris Pine.4. Our goal is to write a Ruby on Rails app. I’ll publish the link as soon as we get there.Ruby is included in Mac OSX, however you can also download it from the Ruby website. It’s available for most operating systems. On the Mac we are using a great development environment called TextMate. A neat dashboard widget is available to view Ruby documentation. A Ruby plug-in is available for Eclipse.And finally you can download Locomotive, a complete Ruby on Rails environment for the Mac.SqueakOK, if you read my previous blog entries then you know that I’m a great fan of Smalltalk. Unfortunately my son doesn’t share my enthusiasm for Smalltalk so we haven’t spent time playing with Squeak or the etoys environment. Check out the squeakland website. Btw, this environment is included in the One-laptop distribution.AliceAlice is a 3D interactive development environment developed by the great folks at Carnegie-Mellon University. This is an excellent environment to learn OO concepts while directly interacting with your virtual world. Really cool stuff. It’s available for Mac, Windows and Linux.My son is doing great and he loves Ruby and Alice. I will keep you posted on his progress.

Read More

Ruby on Rails – Build a blogging engine in 15 minutes!

With Ruby on Rails (RoR) it is possible to develop a blogging engine in 15 minutes. Watch this 15 minute video demo-ing RoR. The Ruby language was developed by Yukihiro Matsumoto (Matz) in 1994. According to Matz:

“Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, extensible, and portable.”

I have to admit that I’ve not heard of Ruby until recently. I programmed a lot of Smalltalk and C++ in my former life as a programmer and Ruby seems to be a great OO language with great reflective capabilities. Matz also mentions that Ruby was inspired by Eiffel and Ada — languages that I studied as a student in the late 80’s and then forgot about. Reflective features and MVC are now commonplace. These features were very esoteric in the 80’s.Well back to Ruby on Rails. This framework was developed by David Heinemeier Hansson and released in July 2004. David is from Denmark and a partner in the 37signals.com company. I really appreciate the simply, yet powerful design of the 37signals web applications. Do yourself a favor and learn a few things from these guys.RoR is a framework to quickly develop and deploy enterprise web applications based on Web2.0 principles. It uses Ruby as a scripting language and quickly and easily generates a web application framework. You can quickly link this application to a database back-end. The beauty of RoR is the interaction with the application while developing and the rapid deployment when you are done. Rapid prototyping is back! Rapid prototyping or agile programming involving the user is a great way to quickly develop an application that is highly usable and valuable. I really enjoyed Hasso Plattner’s (SAP co-founder) recent keynote at SAPPHIRE 2006 in Orlando called (re) design (scroll to the bottom of the page for Hasso’s keynote).At some point I would like to compare RoR with SAP’s Webdynpro technology. You can find an interesting discussion on this topic and AJAX on SAP’s SDN website. This is your first hint that my plan is to relate some of the new Web2.0 technologies back to enterprise software, specifically SAP. Watch this space…More links: Attend a RoR conference in a city close to you. You can also find a number of books on Ruby and RoR on Amazon, e.g., Ruby and Ruby on Rails.Oct 26, 2007 update: Ruby and Rails are now standard in Apple’s OSX LeopardPlease give me your personal experience using Ruby or Ruby on Rails.[amtap book:isbn=0974514055][amtap book:isbn=0977616606][amtap amazon:asin=B000FK88JK]

Read More