How do I go about learning Ruby quickly and easily without buying expensive programming books?
These look promising although they are ongoing works in progress:
This is the obvious answer, but many tutorials are available from the documentation page on ruby-lang.org. There are many gems in there, including Why's (poignant) Guide to Ruby and some small articles on similarities and differences between ruby and other languages. I recommend the links on the documentation page highly, and once you know enough ruby, you also have links to a bunch of reference docs.
I found a few things together really helped.
1) The book "Agile Web Development with Rails, 3rd Edition" from the Pragmatic Programmers.
2) Railscasts.com. I found that reading the first section of the book, then following the screencasts really helped solidify the things I'd learned.
3) Everyday Active Record, which is kind of like the mix between Railscasts and Pragmatic Programmers is excellent, and tied a lot of concepts together for me.
HTH
Why's (Poignant) Guide is great. I would also recommend Programming Ruby (aka The Pickaxe Book). I always keep it within reach.
I absolutely agree with Rudd (and if I had enough reputation I'd have up'd his). I just wanted to point out that often you will hear of a book called the "Pickaxe." That is referring to following very popular book: "Programming Ruby: The Pragmatic Programmer's Guide, Second Edition"
Online courses:
- A Place to Start for the Future Programmer . It's intended for programming beginners, not for Ruby beginners with experience in other languages.
- Online Ruby Programming Courses by Satish Talim. You are supposed to have some programming experience. Next session starts September 6th.
The easiest way to learn ruby is to find a small project that you know how to solve in another language and use ruby to solve it.
I found the Pickaxe book to be unnecessary. Bookmark http://ruby-doc.org/ instead.
If you're learning Rails, skip Agile Web Programming with Rails 2nd Edition. Get the 3rd edition (only available as PDF until Oct 15 2008). That book becomes out of date amazingly fast.
The book that really put it all together for me was The Ruby Way.
I tried learning Ruby from _why's books, but failed. While his writing is amusing and inspired, he doesn't bring his point across efficiently. I eventually learned Ruby by trying. irb
, the interactive ruby prompt, proved a valuable resource when trying to figure stuff out. When looking for specific features, I used Programming Language Examples Alike Cookbook before I eventually bought the Ruby Cookbook, which I still consider the best programming book I ever spend cash on.
Also, the Ruby Mentor Project might help you find someone that could do some 1 on 1 coaching from time to time.
Think back to a few small homework assignments you did at the beginning of college and redo them in Ruby. Using it is the best way to learn it. Then read a book.
http://labuschin.com/rails Has plenty of links to ruby on rails tutorials. Its updated quite regularly. There are some really good links to blogs also.
Write a blog engine. Something simple, preferably without a DB backend (Blosxom-like).
After all, you want to learn Ruby to write web apps, right?
First of all, I recommend you skip Why's Poignant Guide - it's fun, but not suited for learning how to program in Ruby.
Get an introductory book on Rails development instead, such as Agile Web Development with Rails, start programming and learn the language as well as the framework as you go along - learning by doing is the best method I know. And by learning the Rails APIs you also get an impression of common idioms in the Ruby world. Additionally you will need good online resources in order to look up things that are not mentioned in your book. I like the API reference on the Programming Ruby website and the Rails Brain.
And then you might want to use Learning by Testing so you don't forget the things you learned.
Good luck!
The first step I took was reading www.rubycentral.com/book. After finishing the first chapters I was thinking to myself; you had me at "hello".length
I fully agree with the previous comment 'Best way to learn any language is to use it'. A good way to get inspiration for baby programs is to
- Google for interesting university assignments
- Do the practice problems at http://www.topcoder.com
- Look through http://www.rubyquiz.com/
Looking through ruby quiz is good because answers to each problem are posted.
How do I go about learning Ruby quickly and easily without buying expensive programming books?
- Locate your local Ruby user group
- Join the mailing list
- Attend the meetings
- Ask great questions
- Hack, hack, hack
I suggest just entering the water slowly, then going deeper as you're comfortable. Begin by finding a Ruby library or application you really like, or think could stand for some simple improvement. Then dig into the source code, and try to make a tiny adjustment to improve it. If you don't think you can improve it, try to make a small change, just for the sake of learning how to change and write Ruby code. Starting from scratch isn't as easy as modifying an existing creation.
If you want to improve your Ruby fu, I recommend two things:
Read the source code of stuff written by "good" Ruby programmers. You'll have to find your own definition of "good", but a little googling should reveal who the gurus are.
Lurk or even get involved in a/the Ruby community. ruby-talk mailing list, #ruby-lang and #ruby IRC channels, the mailing list or forum of a particular Ruby library or application, or even a meatspace Ruby user group.
Eventually you'll want to write something from the ground up to scratch a personal itch. Don't forget to open source it so you can get peer review from whatever you joined in (2). :)
I started by looking for PHP to Ruby tutorials, if you're already familiar with a language try searching for a "x to Ruby" guide.
1. Use Your Library!
Do you have a decent library nearby? In Singapore, we have great selections in the local libraries. I got all my first ruby and rails books there. And the best way I know to check out books AND also check what is in the library is BookJetty. Try it out for your region .. .for me it works great.
After spending a bit of time with a ruby primer (I forget which), I went straight for rails, since I wanted to actually do something (Beginning Rails is my pick,. Still great, but now a bit dated since there are a few changes for Rails 2.x). Next: Social Networking Sites with Rails (very practical and covers most common features of a modern site). Then I started getting deeper into the language and wanted the O'Reilly cookbooks style (Rails Cookbook and Ruby Cookbook). Most recently I've loved "Pro ActiveRecord: Databases with Ruby and Rails"
The only duds I would warn you against are Rails for Dummies (worst kind of book ever) and, Ajax or Rails (95% you can find elsewhere or have seen before; and only about 20 pages of new, useful stuff. Also way outdated by now)
Actually, after describing all those books I realise you can see exactly what I've read and how I've rated them at my account on bookjetty!
2. Test yourself at Project Euler
Sometimes you need a challenge to find out if you really have learnt anything or not. I had some fun with Project Euler of late, and it really made me review my understanding of the ruby fundamentals.
I learnt Ruby with the help of Mr. Neighborly's Humble Little Ruby Book. It's an excellent free-to-download introduction to Ruby with lots of examples, which I'd 100% recommend.
My Neighborly's is a pretty good read, and it's free so no complaints, but I'm finding a lot of the samples don't work when you type them in - at least not on the version of Ruby that comes with Mac OS X.
The example code that showed how to use class variables towards the end of chapter 2 was particularly confusing! :-\
However, having said that, using a bit of your own 'nous' and working out what might be going wrong is a good way to speed up the learning process if you already have a programming background and just want to get up to speed with Ruby.