This is my brain on reason.

Deaf Grandma – Ruby Code

May 18, 2008   written by Chantal
I’m working on Learn to Program by Chris Pine. This is one of the exercises mentioned in chapter 7 (chapter 6 in the online version).

Poor Grandma can’t hear very well. You really have to scream at her, but even then, she doesn’t quite hear what you’re saying. You have to be careful too because she often tries to plant sloppy, toothless Grandma kisses on you.


99 Bottles of Beer on the Wall – Ruby Code

May 17, 2008   written by Chantal
Here is my (very simple) version of 99 Bottles of Beer on the Wall in Ruby. I the only fancy thing I am doing is “while”. I don’t like the fact that the song is duplicated to handle one bottle, so I will eventually change that. I have a couple of ideas, but I am not sure which I want to use.


Twitter problems due to Ruby on Rails scaling?

May 15, 2008   written by Chantal
I’ve noticed that Twitter has been going down quite a bit lately. I have heard that the Twitter people are looking into switching from Ruby on Rails to something else. Since I am learning Ruby (with the intention of learning Rails as well), I am interested in knowing why Twitter is having problems with RoR.

Everything that I have read so far indicates that they are having scaling problems. They feel that you have to give Rails more and more CPU power and resources to keep it going with such a large site. I wonder how Rails compares to other frameworks in terms of how much resources it needs as the applications and databases get larger. (more…)

UC Berkeley Ruby on Rails 1-Day Course

May 10, 2008   written by Chantal

I found a one day Ruby on Rails course from UC Berkeley on YouTube. I haven’t watched the videos yet, but hopefully they will help improve my understanding of Ruby and Rails. With any luck, they won’t be 1 hour rickrolls.

I’m fairly certain that a short course won’t give you a full understanding of how Ruby on Rails works, but this should be a good start. To go from video to video, click the arrows at the edge of the player. There are five six videos.

Edit: The slides can be hard to see at times, so you can download the PDFs to follow along with the videos here.

Ruby Course – Lesson 1

May 6, 2008   written by Chantal

I’ve reviewed lesson 1 of Satish Talim’s Ruby course, along with Yukihiro Matsumoto’s “The Philosophy of Ruby” interview. The most difficulty I had was with the modulus operator, which I posted about yesterday. I also learned that Google Calculator is incorrect in its calculation of the number of seconds in a year! Always make sure you check, double-check and triple-check your sources when you are declaring constants in your programs.

To make sure I have a solid understanding of the fundamentals of Ruby, I am going to read Chris Pine’s “Learn to Program” within the next couple of days. It seems to be mentioned everywhere I go, so it must be good. After that, I am going to start reading “The Ruby Programming Language“, which I purchased in PDF form the other day. That should be a good start.

Before I get too tired, I am going to listen to Geoff Grosenbach’s Ruby Basics.

That’s about it for today. I’m back at work this week, so time is a bit limited.

P.S. I am really liking ScribeFire for posting blog entires within Firefox.

Technorati Tags: , ,

Ruby resources for n00bz

Mar 19, 2008   written by Chantal

I am learning Ruby. As such, i r n00b. Here is a list of resources I have found to be helpful so far.
Try Ruby! (in your browser)
This site allows you to get a decent overview of how Ruby works in an interactive manner. Definitely the first site I would suggest to anyone starting out.
Ruby in Twenty Minutes
Once you have Ruby installed, this is another very nice tutorial that gets you working with Ruby right away.
Ruby on Rails Screencast 1 – David Heinemeier Hansson
Watch this screencast on YouTube to see the creation of a basic blog from start to finish in 15 minutes.
LearningRails Podcasts
Okay so youíve played around with Ruby and watched someone create a blog, but you still have no idea what to really do with it or why you should bother learning about it. Listen to a couple of these podcasts. Start with Episode 1: Why You Should Learn Ruby on Rails.
Whyís (Poignant) Guide to Ruby
Just look at the first page and you will quickly realise that this is not your typical guide. I came across this a while back when looking for Python learning resources. I remembered it because itís so unique. Be prepared to see strange animals and even stranger people during your visit here.
Free Online Ruby Programming Course
You can learn Ruby through this online study course. Iím still waiting to get in to the May/June session. If itís anything like the Ajax course I saw, it should be great.
Ruby/Ruby on Rails Tutorials
A large collection of the history of Ruby, what Rails is, why Ruby and Rails go together, command line, arithmetic, loops, recursion, etc. Some of it might be too difficult for those who have never had any programming experience, but at least the first few pages will be okay.

“Learn to Program” (Chris Pine)
It’s now easier to learn to write your own computer software than it has ever been before. Now everyone can learn to write programs for themselves–no previous experience is necessary. Chris Pine takes a thorough, but light-hearted approach that teaches you how to program with a minimum of fuss or bother. Starting with small, simple one-line programs to calculate your age in seconds, you’ll see how to have your webpage send you email, to shuffle your music more intelligently, to rename your photos from your digital camera, and more. You’ll learn the same technology used to drive modern dynamic websites and large, professional applications.

“Programming Ruby: The Pragmatic Programmers’ Guide” (Dave Thomas, Chad Fowler, Andy Hunt)

Book Description

Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer’s Guide.

Now in its second edition, author Dave Thomas has expanded the famous Pickaxe book with over 200 pages of new content, covering all the improved language features of Ruby 1.8 and standard library modules. The Pickaxe contains four major sections:
An acclaimed tutorial on using Ruby.
The definitive reference to the language.
Complete documentation on all built-in classes, modules, and methods
Complete descriptions of all 98 standard libraries.
Ruby on Rails Talk – Google Groups
This is — you guessed it — a group that focuses on Ruby on Rails. They seem to be newbie friendly so far. Check it out.
HINT: If you are using a tutorial made on an earlier version of Rails, do the following when they tell you to create your application.
Instead of typing:
rails my_application
Type this:
rails _1.2.6_ my_application
This has worked for me (on Rails 2.0.1) so far.
Thatís about it for now, but I will add more to this article as I go.


Mar 17, 2008   written by Chantal
Today I went through the Developing Rails Applications on Mac OS X Leopard tutorial. The tutorial from Apple was much easier to digest than some of the other ones out there. Yikes. Iím not afraid of terminal, but I started to get extremely confused when many of the tutorials I found were made for an older version of Rails.Iíd like to play around some more, but Iíve only slept for 20 minutes in the past 31 hours. Iím not sure how much more my brain can handle before it explodes.If you want to know what Ruby on Rails is, feel free to watch the screencast.