Lakshan Perera

I want to be a Ruby Hacker...

In the past couple of months, I heard this from number of my friends. I hope there will be more joining the club in the coming days. For the benefit of the freshers, I thought of sharing some tips I learned about Ruby hacking (though it may sound as obvious to many) .

  1. Write something that scratches your itch - Rather than blindly following some tutorial someone has written, try to solve one of the problems you have (such as simple todo list) and try to grasp the concepts during the process.

  2. Learn to read source code - Reading code is one of the best ways to learn how to code from great programmers. Especially in Ruby, the syntax is very easy to comprehend, so you could read code as you're reading a fairytale. If you are looking for a good book to begin with Ruby idioms, I recommend Why's Poignant Guide for Ruby, which inspired me to learn Ruby.

  3. Pragmatic Programming approach and Agile development is the way to go - If you are still accustomed to write a SRS and draw UML diagram before you begin to code, then you will not feel comfortable with the concepts of Ruby. Find and read Pragmatic Programmer of Andy Hunt and Dave Thomas, it will help you to refresh for a good start.

  4. Use a text editor - If you are coming from .Net or Java environments, you may be so obessed to use an IDE. But adopting to a lightweight text editor such as Emacs, Vim, Textmate (Mac only) or Gedit is a bliss. Because Ruby is all about crafting code, not dumping auto-generated piles of shit.

  5. Learn Git - Ruby community loves Git, for source code management. Many Ruby frameworks, gems and plugins use Git as their SCM. Besides Git can make your development workflow more flexible, productive and reliable. You may like to bookmark GitHub. Don't complain me if you are browsing it more time of the day than Facebook in 6 months.

  6. Use a nix Operating System - Ruby and related tools plays really nice in Linux, Mac and in other nix based Operating Systems. That doesn't mean it's not supported in Windows, indeed it is. But if you are looking forward to a deep dive in Ruby you will feel more comfortable with a *nix based environment.

  7. Don't live under a rock - Ruby community is very fast paced. There are lot of new plugins, gems and frameworks coming up every week. Also lot of best practices and useful tutorials are being blogged. So it is better to follow some blogs and podcasts to keep yourself updated. Personally, I recommend RubyInside, RubyFlow and RailsEnvy podcast to catch the best.

  8. Bonus Tip: Learn to be "Passive Aggressive" - You will need to understand passive aggressive behavior and practice it for your defence. Even doctors say it's good for your health :P