I’m surprised to see that there hasn’t been a lot of discussion or articles written regarding Ruby. I’m a web designer myself with no real programming knowledge, so venturing into programming is both exciting and intimidating. I just recently discovered Ruby and it’s been touted as a pretty incredible programming language.
If you have a link that isn’t already listed below simply post it and I’ll make sure it gets added.
Here’s a list of points that convinced me that going with Ruby was not a mistake. There was also the fact that I waited 3 months for .NET 2.0 books and none have showed from Amazon, yet!. But this is a good list anyway. I found it while hunting for a Ruby host.
Ruby has simple syntax, partially inspired by Eiffel and Ada.
Ruby has exception handling features, like Java or Python, to make it easy to handle errors.
Ruby's operators are syntax sugar for the methods. You can redefine them easily.
Ruby is a complete, full, pure object oriented language: OOL. This means all data in Ruby is an object, not in the sense of Python or Perl, but in the sense of Smalltalk: no exceptions. Example: In Ruby, the number 1 is an instance of class Fixnum.
Ruby's OO is carefully designed to be both complete and open for improvements. Example: Ruby has the ability to add methods to a class, or even to an instance during runtime. So, if needed, an instance of one class *can* behave differently from other instances of the same class.
Ruby features single inheritance only, *on purpose*. But Ruby knows the concept of modules (called Categories in Objective-C). Modules are collections of methods. Every class can import a module and so gets all its methods for free. Some of us think that this is a much clearer way than multiple inheritance, which is complex, and not used very often compared with single inheritance (don't count C++ here, as it has often no other choice due to strong type checking!)
Ruby features true closures. Not just unnamed function, but with present variable bindings.
Ruby features blocks in its syntax (code surrounded by ' ... ' or 'do' .. 'end'). These blocks can be passed to methods, or converted into closures.
Ruby features a true mark-and-sweep garbage collector. It works with all Ruby objects. You don't have to care about maintaining reference counts in extension libraries. This is better for your health. ;-)
Writing C extensions in Ruby is easier than in Perl or Python, due partly to the garbage collector, and partly to the fine extension API. SWIG interface is also available.
Integers in Ruby can (and should) be used without counting their internal representation. There *are* small integers (instances of class Fixnum) and large integers (Bignum), but you need not worry over which one is used currently. If a value is small enough, an integer is a Fixnum, otherwise it is a Bignum. Conversion occurs automatically.
Ruby needs no variable declarations. It uses simple naming conventions to denote the scope of variables. Examples: simple 'var' = local variable, '@var' = instance variable, '$var' = global variable. So it is also not necessary to use a tiresome 'self.' prepended to every instance member.
Ruby can load extension libraries dynamically if an OS allows.
Ruby features OS independent threading. Thus, for all platforms on which Ruby runs, you also have multithreading, regardless of if the OS supports it or not, even on MS-DOS! ;-)
Ruby is highly portable: it is developed mostly on Linux, but works on many types of UNIX, DOS, Windows 95/98/NT, Mac, BeOS, OS/2, etc.
RailsPlayground - they used to offer free accounts, but due to demand they’ve stopped this for now; however, you can still get a very decent spec for just $12 a year:
Some good blogs on the subject of Ruby and Rails:
<snip/> [Why’s blog]
<snip/> [Blog aimed at Ruby Nubys]
<snip/> [The official RoR blog] http://www.loudthinking.com/ [DHH, the creator of Rails’, blog]
<snip/> [Ruby blog aggregator] http://www.robbyonrails.com/ [Robby Russell’s blog - he’s authoring O’Reilly’s new Rails book]
This last one isn’t a blog as such, but offers a nice summary (with links) to what people have been talking about during the week on the ruby-talk and comp.lang.ruby lists. Makes these very busy lists much easier to digest. They’re a mine of fantastic information, so the weekly news site is an absolute godsend.
Oh, and I almost forgot the One-Click Ruby Installer for Windows; makes installing Ruby and most of what you need to get started (including Gems) a snap:
Also, if you’re using jEdit, the Ruby plugin is excellent:
Finally, the famous Rails getting started video is pretty cool:
Well, apparently there was a talk on comp.lang.ruby about how the code in that book is a general-purpose data structure + algorithm book and a 1:1 translation from other languages:
But you can still read it, and as a good exercise convert the code samples to be more rubysque. I always find it fun to learn new languages by rewriting those dusty alghoritms. Keep in mind though that the complexity of those can get pretty high, and Ruby might not perform that well.
For the french-speaking guys whose English is, well, not so good, we’re building a french-speaking RoR website : http://www.railsfrance.org/
It will contain, among other things, translations of documentation and landmark articles (some articles by Curt Hibbs already translated).
Pour les francophones, pour qui l’Anglais ne serait pas la tasse de thé, nous sommes en train de développer le site francophone : http://www.railsfrance.org/
Il contiendra, entre autres, des traductions de doc et d’articles phares (certains articles de Curt Hibbs sont déjà traduits).
Pour découvrir Ruby on Rails ou participer à son développement dans le monde francophone n’hésitez pas à nous rejoindre.
Another good resource for up-to-date information on Ruby and RoR information is http://del.icio.us.
Once you get there, you can perform a search on “Ruby” or “Ruby on Rails”. You can also generate a RSS feed based on these keyword tags, and if you like, you can keep up-to-date in your RSS newsreader.
There’s been a flood of new Ruby and Ruby on Rails books since this thread was last updated. For learning Ruby, I highly recommend Peter Cooper’s Beginning Ruby. For an introduction to Rails, SitePoint’s own Build Your Own Ruby on Rails Applications is a good starter.
The most exciting new Rails book is Obie Fernandez’s The Rails Way. It assumes you already know your way around Rails, so it isn’t good for beginners, but if you want to dig deeper it’s a fantastic book. It’s also the only book that currently is updated for Rails 2.0.
There’s several sources of great screencasts about Rails. The ones at www.peepcode.com, by Geoffrey Grosenbach, cost $9 each but are very well done and about an hour long. And there dozens of free, short-and-to-the-point ones at Ryan Bates’ www.Railscasts.com.
There’s now a bunch of versions of the API documentation available online with various interfaces. My favorites are www.RubyBrain.com (for Ruby) and www.RailsBrain.com (for Ruby on Rails). The software is open-source and you can download the whole thing to view locally, or just view it online.
Beware of the Rails wiki (wiki.rubyonrails.com). At one point it was the central source for information about Rails, and although there is a lot of great information there, there is also a ton of badly outdated information that can easily lead you astray.
Finally, if I may be forgiven a little self-promotion, since it is responsive to the topic, I coproduce a podcast, www.LearningRails.com, that teaches the fundamental concepts behind Ruby on Rails, and the Rails resource site www.BuildingWebApps.com, which has both original articles and a large set of annotated, organized links.
I was getting a bit frustrated trying to find tutorials for Rails version 2.x
Being a RoR newbie, I don’t feel comfortable trying to modify deprecated code (too much) when I’m just learning things and don’t really understand how they work well enough. But I did find a few. The first 2 worked for me without a hitch.
EDIT: I may have spoken a bit too soon on this last one. I ran into “topic edit link” “no id” problems. And now I’m having table “id” problems when the topic id isn’t “1”.
EDIT-EDIT: A few link_to bugs in the view/topic/*.html.erb files, but after looking into the way Rails deals with routing and path parameters I was able to figure out how to fix them. Part 2 was OK, now on to part 3.
EDIT-EDIT2: Except for some typos, part 3 went well.
I plan to check as many links as possible but am indecisive about what to read next.
I’m wondering what others here would recommend as a good second book?
Would it be a good idea to read: “Programming Ruby: The Pragmatic Programmer’s Guide” by Addison Wesley Longman
I am almost all the way through Simply Rails 2 by Patrick Lenz. It’s a good book for a beginner. I was able to understand and follow the examples but I still would have no clue how to design something from scratch without using a guide.
There are many good books but I think one REALLY stands out clearly above any and all the rest:
- The Pragmatic Programmer's Guide
by Dave Thomas
and it is called “The PickAx Book” by the people I have been working with. It is just a super excellent Reference book put together in two sections and seems to have just enough material to cover things so you can keep on working a minute later.
There is a new edition out for 1.9 - so folks wanting to save some dollars for getting going might consider picking up a 1.8 Edition for peanuts. (1.9 is much faster but not too much seems to have changed) - I’m not recommending this - as it is a great privilege in the Ruby Language to have such a well written book.
Now, to my thinking is only what add’l books you might want on your desk.
I’m a 3 year Ruby Programmer - this is about my 8th language (let’s see Fortran, Basic, Pascal, c, c++ (worse thing every foisted on progammerdom), Smalltalk (best language ever until Ruby), Java then Ruby - ahhh lost count.)
Programming Ruby: The Pragmatic Programmer’s Guide is an online ruby programming book that appears to be fairly comprehensive.
Ruby study notes that form a Ruby programming tutorial.
Little Book Of Ruby
Ruby tutorial ebook - PDF download.
An introduction to Ruby programming complete with source code from Bitwise magazine.
Ruby Hacking Guide
This is a site that houses a project to translate the Ruby book from Japanese into English. So far it looks like four of nineteen chapters have been translated.
Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby
This also illustrates object-oriented design and it promotes the use of common, object-oriented design patterns. The algorithms and data structures in the book are presented in the Ruby programming language. Virtually all the data structures are presented in the context of a single class hierarchy. This commitment to a single design allows the programs presented in the later chapters to build upon the programs presented in the earlier chapters.
This is an online ruby programming tutorial in book form that can also be downloaded. It appears that it may still be under construction and currently goes up to creating you own classes and methods.
Learn to Program
A basic Ruby programming tutorial.
A Little Ruby, A Lot of Objects
This is a draft book titled A Little Ruby, A Lot of Objects.
Ruby User Guide
Includes code examples.
(Poignant) Guide to Ruby
An online book about Ruby.
This is an interactive tutorial with code that you can modify and have interpreted.