05 February 2009 ~ Comments Off

My thoughts on Ruby, Rails and where I got started

Since I was quite late to jump on the Rails bandwagon, I thought I’d share my experiences upto this point in time. “They say” learning Ruby first really lightens the load when learning Rails, consequently that’s what I set out to do in the late stages of 2008. This however, was not my first encounter with Ruby…

Backtrack almost 3 years ago

I was first introduced to Ruby by Lindsay Marshall as part of my second year at University. Being relatively new to programming at that point, my skillz weren’t very good, though to be fair they still aren’t.

If memory serves, that project entailed the creation of a regular expression to parse and perform a statistical analysis on a server log-file…pretty simple stuff. Since then I always intended to go back and use Ruby for some other projects of mine, but never really got the opportunity.

Fastforward to around September 2008

I had just finished my degree and stumbled across Project Euler after hearing about it on stackoverflow. I figured this would be as good a time as any to test my Ruby chops.

Project Euler

I got quite into it, learning lots of new math and programming stuff along the way. Part of the way through that, I came across the awesomeness that is the Enumerable mixin. Still being quite new to Ruby and programming in general, doing stuff without for loops blew me away, as a result I knew this was the way forward.

I also dragged Rob into doing Euler with me, which allowed us to build up some healthy competitive rivalry. For those of you still on Euler who want to compare or check out a few of my solutions, you can peruse them at your leisure on github.

After about a month or so, I had completed over 50 of them puzzles and thought it was time to make the jump into Rails territory. But what to make?

Suprise suprise…a blog

I started my first proper blog early last year and liked it for a grand total of 5 minutes. As mentioned in my first post, I was never happy about it being Wordpress powered, I hated all the updates, and any templates that I liked were purchase only…not cool! Sure I could roll my own, but at the time I was way too busy. I even did some more reading into Wordpress and kept hearing lotsa stuff about one giant loop wrapping all the code, and it got me thinking that Ruby can do that sort of stuff in one line! Clearly Wordpress and I didn’t get off on the best of starts, needless to say, it was time for a change.

The Rails

Evidently I wanted something which I could easily customise to fit my basic needs, and that’s where I thought Rails would come in handy. So I caught the famous, but dated screencast of Build a Blog in 15 Minutes with Rails to get myself and upto speed, bought a couple of books and away I went. It didn’t take me long before I was able mashup something which resembles what you’re currently looking at; very basic but I love knowing that I can customise this thing till my hearts content.

But yeah the Rails part is fun, I expected to see plenty of error pages on the way and I was not disappointed on this front. This was also my first experience utilising a framework which uses MVC architecture, a design pattern which I’m slowly warming to.

Where the blog itself is concerned, there’s still a fair bit more work I’ve got planned, some of the things on my to-do list include OpenID, adding a splash of AJAX here and there and a few other cosmetic changes.

In retrospect, do I believe that learning Ruby has reduced the learning curve involved for learning Rails, not so far, as scaffolding has done most of the heavy lefting for me. Then again I haven’t really had to do that much work, to be an authority on this matter. Saying that I’ll definately be using Rails again for some side projects of mine that I’ve got in the pipeline, so watch this space and I’ll keep you informed of my findings.

Comments are closed.

SEO Powered by Platinum SEO from Techblissonline