Ride the Rails way
Ah, Ruby on Rails. The champion of the startup hustle, and the side project. That in essence describes a lot of why I think people enjoy the community as a whole, because they all appreciate those two facts.
You might find that Ruby on Rails is right for your big project, let’s dive into the basics and find out.
Ruby on Rails for beginners and startups
Ruby is a dynamic high purpose language that has all the benefits of Perl and PHP, without the syntax woes they bring with them.
Ruby was created by Yukihiro “Matz” Matsumoto, in the mid-1990’s. And it is used inside of the Rails framework, hence Ruby on Rails. Rails is an open source full stack web application framework that harnesses a lot of the power Ruby offers. It also offers organization, and great programmer methodologies all baked into one singular framework, and on top of that it is incredibly extensible.
Now, I won’t go into much more technical detail, after all, these are things you could find in a quick google search. So let’s get to the meat of the conversation.
Rails for beginners
It may be an over-exaggeration to say Rails will save your life, but the fact is that I have gotten more people to start programming through Rails and Ruby than any other language or framework. I think the environment as a whole is totally approachable for newcomers to programming. For instance, the community is rather homogenous and seems to be focused on the same goals. That really means a lot when it comes down to thousands of people trying to direct your attention.
So many people are trying to go in so many different directions that it can be hard for a beginner to decide who of what to follow.
On top of all that you get a beautiful programming language.
Rails image via Shutterstock.
Personal preference only here, but I think Ruby is the most beautiful programming language ever created. It is the most amazing thing I’ve ever used to code, and it really motivates me to create things on the side when I get home from a long day of programming at my job. That is when you know a language is fun for you, when you do it after 8 – 10 hours of programming at your day job. I realize that may not be the same for everyone, but as a rule of thumb, the creator of Ruby really strove for human readable syntax and not complicating things as he went. Very similar to the way the creator of Clojure approached the building of a language: process. They both chose simplicity over complexity, because we all know that in simplicity there comes great complexity; and typically vice-versa, hence the beauty of things like Ruby and Clojure (minus the over use of parentheses in Clojure, ugh).
Finding a path to follow in the Rails community is very simple. In other languages it can be a bit more difficult to know who the ‘tastemakers’ are so-to-speak, but in Rails it is very obvious. That isn’t to say that you have to follow those people, but from those people you can deduce where the heavyweights are playing around, and then go from there.
Typically heavyweights have projects or efforts in Rails that are at the center of a vibrant community supporting it. So those are always great places to jump into. Lastly, Rails is a very experimental framework, and a forward thinking experience to code in as you use it.
As a beginner you will not only enjoy the syntax and community, but also be pushed to learn new things. And it is all about learning new things in this world of programming.
Rails for startups
Ruby on Rails is one of the most powerful tools, and most enabling tools, the valley and startups alike all over the world have seen in years.
Be it the syntax, the ability to get up and running in hours, prototyping incredibly quickly, whatever it is, it has taken off.
Rails shops and startups all over have taken off as well because of it, and that is simply the sugar in the pudding to why it is a delicious treat for you. Not only do you have so many other companies adopting it, and possibly running into similar issues, you also have a battle tested framework.
This is not an Alpha product, it is not a Beta product. This is not an abstracted thought process for developers to organize code. This is some ‘in-the-wild herd of dogs style’ results from people that grouped together to form this community all started by a one DHH of 37signals.
Again, I will harp on the community, because it is so important. It is such an evolved and mature community (in a sense) that you can literally find help in any way you may need. Be it developers who love programming in rails or just people who want to consult to fix your problems. All the way to people who love using NoSQL in Rails environments, as well as love to hate on the Asset Pipeline ;)
Why Rails is useful (for individual developers)
Another place that Rails has really taken off is in the personal projects space.
A lot of developers are pretty similar, as in, they are intelligent and capable individuals. I know I know, that isn’t a rule, but it is still often the fact of the matter. And people of such a nature often want to have personal projects they can hack on to learn, or get revenue from. And everyone I know agrees that Rails is a perfect way to do that.
Rails image via Shutterstock.
Using tools like Heroku for deployment building and deploying a Rails app is literally a 1, 2, 3 step or rather a 1, 2 step. It is amazing. In fact, I use Rails and Heroku to handle my blog. Every time I make changes I compile production assets for Heroku, push to Github, and then push to Heroku. That simple. And if I have a new computer I want to pull down to, I just change some remotes with a little easy to understand terminal magic, and that’s it — you are ready to hack.
One of the often misunderstood parts of the development process is overcomplicating things by accident. It is just one of the magical things in development, it seems. You can without regard or happenstance literally overcomplicate anything. It is just what happens, and often times developers don’t even realize they are doing it. Well, you are in luck, Ruby has a lot of ‘convention over configuration’ action going on, which really implicitly helps us de-complicate things.
For instance, if you have a class of “Library” that inherits from ActiveRecord, then it’ll automatically look for a table called Library in the database. It’s little things like that that help us not have to write things over and over. In fact, it overly exemplifies the essence of DRY (Don’t Repeat Yourself). Which is amazing and very helpful. Why not save a little time, after all that’s more time for coffee.
Another thing I love about it is that the creator of the language is absolutely obsessed with code simplicity and beauty. So if he can do something simpler and in a more beautiful fashion then he will implement it, to the angst of many developers at that. But I personally love it.
Rails as an engine will also help you learn about frameworks in general without one stepping on your toes, and I think it does it in a perfectly balanced way.
Of course, people will say that PHP frameworks do that in a better way because you can still slam your head into a wall with PHP without finding ways around it (to learn from). But in fact I think Rails does that in a much more elegant way than PHP ever has, and probably ever will.
Rails image via Shutterstock.
You see, in Rails you still have to learn so much in order to be able to build a real or even small Rails application. It’s not like you can just use scaffolding for everything. In fact, you actively can’t do that, but you will at first and it will help you learn things like Views, Templating, and how Ruby interacts with HTML.
The simplicity makes the barrier to entry so low that even looking at the database schema makes sense, Oh I made that class so there it is. Not, Oh shoot wait, I did the class thing so now I have to do the database thing how do I do that. I don’t know about databases. Ugh. Screw this. None of that in Rails.
You learn without having your foot stepped on. And it is an incredibly beautiful thing.
I really think that learning Ruby can make you a happier programmer in general.
I can only speak from personal experience here, but it honestly reinvigorated life into my development. I was a PHP guy for over 8 years and it really was something I didn’t “love” but I did anyway. After finding Ruby I literally threw up my hands and never turned back to PHP. It was such a grandiose change in my life that I have created projects, gotten jobs, done consulting, and contributed to some great open source projects as well as the Rails core, all where previously I was just a student that knew PHP.
I could of course contributed and done those things in PHP, but the point is I never had the passion to do so, and passion is so important. If you don’t have passion for what you do, then you should stop doing it. Right now. And then you should go learn Ruby on Rails. It may bring it back.
Have you dipped into Ruby on Rails yet? Do you think there’s a better development platform out there? Let us know in the comments.