Stephen Provis

Previous Post: Walkthrough for installing Ruby and Rails on a clean (new) installation of Ubuntu.  

Ruby, haml and sass make everything ok

As a relatively new coder of Ruby on Rails the last few months have been a big learning curve, the MCV (Model, Controller, View) approach is new to me and getting my head around the way RoR deals with this coding model has been long and confusing, the amount of time I’ve spent trying to work out why my code isn’t working is ridiculous. A lot of the problems have been due to me trying to rush into things without really having the background knowledge to know what I’m doing.

But after a few months I’m getting the know the basics and have been able to produce some stunning results that would have taken a lot more time/effort in other programming languages. With the help of Ruby Gems like Inherited Resources and Formtastic a lot of the more mundane code has been completed for me - this is a good thing!

I’ve always found coding in HTML really boring and so with a bit of assistance and guidance I’ve managed to get into using haml and sass instead. For anyone interested go take a look - it’s very nice, saves you a lot of time as you no longer need code fragments such as html closing tags and has a lot of powerful features (many of which I haven’t had the time to look into yet but am planning on getting into sass calculations (basically CSS + Maths)) allowing for further time savings.

I’m currently working on a php projects and the amount of code I’m having to write for simple features like adding a basic CMS system is crazy - I keep forgetting to add a ; to the end of php lines, try to use haml indentation on html and generally getting annoyed with the amount of key presses needed for code that shouldn’t need to be written.

Ruby on Rails, along with the gems available, are almost zen-like when it comes to writing code - give them a look if you haven’t already done so.

Posted in Ruby on Rails 1 month, 3 weeks ago at 2:22 AM.

Add a comment

No Replies

Feel free to leave a reply using the form below!


Leave a Reply