Learning Ruby On Rails

Learning Ruby On Rails


At the moment, I believe that there are two environments out there that are actually real possibilities if you want to develop web applications without Venture Capitalist funding (that is, without the possibility of burning money) and without going completely insane.

They are Django and Ruby On Rails.

I don’t know Django well; I became interested in it, and then I discovered that it was based on Python. I hope I don’t start a “religious” war when I say that I don’t like Python at all. I say that knowing that I am being thoroughly unfair, because I didn’t really give Python a chance to settle into my brain. However, too many things in Python just don’t work for me, and no, I am not gonna give out a list, because it’s a matter of (I repeat unfair) personal taste.

I am personally left with Ruby On Rails. I got this contract about 3 months ago, and while the first whole month was spent defining the data structure (a scary 48 table, complex database), over the last two months I’ve eaten, breathed, dreamt, you-name-it, Ruby On Rails.

I now have a theory on how it works when you are learning Ruby On Rails. The first and most important thing, is that the book—the fantastic Dave Thomas—is a little too good. Especially version 2 of the book is getting a little too close to perfect. Fortunately, the first part with the famous “Depot application” is now a little too complex for my liking. However, the book as a whole is simply too good. Ruby On Rails needs to be experienced, and not just read about. I think one of the mistakes people make is that they stick to the book a little too much, and forget that the real Master (with a capital “M”) is the API documentation. You will get frustrated at some absurdly complicated sentences sometimes—and in those cases you will probably go back to the book, read in English what the parameter does, and think “Thank (whatever) I’ve got the book”. However, that should be about it. It’s a book people should read 15 to 25 times, but while they develop and while they read the API documentation.

The second problem is that Ruby On Rails is huge. And I mean: HUGE. I thought I sort-of knew it, and I then discovered RJS templates. Then I thought I mastered those, and discovered something else... the story went on and on, until I realised that there was just no way for me to know it all. It was just too big. All I could do, was know a reasonably large subset of it quite well, and discover in the meantime that my memory was getting better and better (to me, that was a nice side effect of learning Ruby On Rails).

The third thing, is to persevere. After about one month of development, my brain short-circuited and decided that it would start to reject RoR. There was just too much: there was a huge big-picture to keep in mind; there was the syntax; there were the little “twists”; there was Ruby—yeah, you know, the language RoR is based on!—that posed more challenges; the list goes on and on, and at one point I honestly thought I just wouldn’t manage. I must admit, the only reason I did persevere was because I was getting paid for it. People were waiting to see the results. I had to deliver. (I am writing in the past tense, but this project is still going on at the time of writing). So, I stuck with it—and eventually, my subconscious started processing things, and everything became more and more familiar. Now, two whole months after day 1 in development (when I knew absolutely nothing about Ruby On Rails, I can finally say “I know it”. Yes, I still need to read the RoR bible (the “Agile book”) about 19 times, but things look familiar now, I know what to expect, I can even do some meta-programming without going insane. That’s the big secret, I think, if you want to learn Ruby On Rails: stick with it, allow it to become more and more familiar, let your subconscious absorb it and spit it out once, twice, three times.

So... right now, I am a Ruby On Rails “believer”. I would still use Drupal to create Free Software Magazine’s web site (what do the experts say? The right tool for the right job...), but I would only use Ruby On Rails for web applications.

Hopefully, if you are one of those people who stopped learning it because they got discouraged by RoR’s size, this short article will give you some extra tools to go back to work with so you can actually enjoy being a programmer.

Category: 

Comments

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

i've been hearing a lot of my friends who happen to be great programmers that RoR is great and all that... besides that, i see all the big boys in the IT industry praising it as well.

i tried it.. but somehow didnt really appreciate it much.. exactly the same feeling as u get.. but as u mentioned.. perhaps i need to spend more time with RoR.. :)

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

Thanks for posting this Tony. This would be the equivalent of an O'Reilly "no spin", only in a software context. It's good to hear something that is strongly anecdotal and fair without hype or unnecessary bias. I don't know about Django or Python either but I was never interested in learning it for some reason.

I think you've nailed the secret of Rails. It's kind of like crossing a lake in the dark. At first it seems so shallow, no sweat. Then you hit a quick drop-off where you think you're gonna drown. But if you relax and start making steady strokes you eventually swim into comfortable water again and realize that you're floating.

Mastery must be exciting. I can't say I've gotten to that point yet; meta-programming still scares me but it's coming together. But I think I've held on to the floatation device too long. Anyone know if there are sharks in this lake?

Greg.
(BTW, not trying to be anonymous, just don't know how to identify myself on this comment. Email: greg@tkraftsmen.com)

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

Just wanted to past and say thanks for taking the time to write this up. I'm at the phase probably where you were after 1 month of programming with it. I unfrotunately haven't found a "paying" job in Rails so instead I make up applications to work on in my spare time (and also sometime during time when I should be working on java code). I really like RoR. Am hoping to get a paying job in it and be able to devote 100% of my time to it. Someday. You post does explain it well.
I've also done a number of drupal sites and am hoping that a solid CMS comes out soon. I've played around with Typo and currently with Radient, but they aren't really on par with Drupal. Sometimes though Drupal can be a pain.

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

It may be better to code with tools you aready know than suggest to others to fly by the seat of their pants by trying out unknown frameworks on unwary clients. Let's all say out loud "Mythical Man Month". A client pressed for time may end up blowing out the budget once your deadlines have passed by 1) ending the solo artist's contract, and 2) shopping out the job to a php, c#, flash, or java house for web development. On the other hand I wouldn't object to selling a contract to a customer based on a fully working Rails demo that completely addresses their goals.

Jenn's picture

Thank you for the post. I am going to get my own "copy" of the "fantastic Dave Thomas" book then. If you say it is perfect, then everyone should have one!! whoohooo!

Cheers,

Jenn,

Ruby Designer and Developer @ www.techcfl.com

mindaslab's picture
Submitted by mindaslab on

I gave up on ROR twice, and this is he third time I'm trying it. Thanks for your article.

Author information

Tony Mobily's picture

Biography

Tony is the founder and the Editor In Chief of Free Software Magazine

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!