Gregory Brown thinks chicks should learn Ruby

by Erica Sadun

He says so right here.

Ruby was also the clear winner of my recent "help me pick a language" poll. So how do I get started? And how long until I can start doing useful stuff? All pointers appreciated. Remember, I need mac-specific implementation guidance. I'm just going to go with the ruby built into my Mac. where ruby tells me that ruby is installed into both /usr/bin/ruby and /usr/local/bin/ruby.

% ruby --version
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]

17 Comments

Gazzer
2007-05-09 19:08:06
If it's in /usr/local/bin/ruby as well then someone/something must have installed it there. What does
% which ruby
give you?
Erica Sadun
2007-05-09 19:12:37
which ruby gets me /usr/bin/ruby
Michael Ball
2007-05-09 19:39:58
Oh and what kind of things do you want?
There's also http://rubycocoa.sourceforge.net/doc/ - and while looking for that I found rubycocoa.com


As far as time goes, what is useful, and in general, not long.


Also to try short little exercises type irb in terminal and then you have an Interactive RuBy editor. And I'm sure you have a favorite text editor that support syntax highlighting, otherwise there is XCode, TextWrangler, and Smultron-that I like.

Michael Ball
2007-05-09 19:49:42
Apparently, my first post didn't work, sorry if it did.


Well overall Ruby is very easy to learn. As a 14 yr. old But, like most things if you don't practice, you get rusty-which is what I am doing today. Anyway, go to http://www.ruby-lang.org - which is the official Ruby site. Chris Pine has a book, and a free online version here: http://pine.fm/LearnToProgram/ - It's slightly different, and I'm not sure which is newer. I don't have the link but version 1 of Programming Ruby is free and version 2 (the PickAxe) come in a pdf form here: http://www.pragmaticprogrammer.com/titles/ruby/index


Also from ruby-lang is version 1.8.6 but I'm having trouble installing it.
Thanx and HTH.


Lon
2007-05-09 20:05:45
this showed up recently on a feed I follow...


http://www.macresearch.org/ruby_tutorial_introduction_to_ruby

Alpha Chen
2007-05-09 20:30:35
I really liked Why's Poignant Guide to Ruby (http://poignantguide.net/ruby/), though it's definitely not up everyone's alley.
Wiebke
2007-05-09 22:56:01
I second Alpha's suggestion. The poignant guide to Ruby is hilarious.
Travholt
2007-05-10 00:07:55
I bought the PDF version of The Pragmatic Programmers' "Everyday Scripting with Ruby" -- http://www.pragmaticprogrammer.com/titles/bmsft/ -- and it's great if you want to learn how to actually USE Ruby for something.
Tobias
2007-05-10 02:24:29
I can recommend Hivelogic article on setting up Ruby etc. on OS X: http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx


There is an interactive Ruby tutorial at http://tryruby.hobix.com/


And the TextMate editor is very popular amongst Ruby programmers

Nick
2007-05-10 04:00:49
"Gregory Brown thinks chicks should learn Ruby"


No, poultry should stick to pecking seed and insects.

Andre
2007-05-10 05:46:11
The Poignant Guide is great, but I'd also definitely get the Pick Axe, aka Programming Ruby by Dave Thomas, Chad Fowler, and Andy Hunt. Why's guide is a great tutorial, but the Pick Axe gives you a complete ruby 1.8 reference. It's _the_ book for when you're scratching your head and thinking, "So how do I do *that* in ruby?".


http://www.amazon.com/Programming-Ruby-Pragmatic-Programmers-Second/dp/0974514055/ref=pd_bbs_sr_1/103-2207086-6270226?ie=UTF8&s=books&qid=1178801028&sr=8-1

Christian
2007-05-10 06:03:20
I also recommend you take a look at the Hivelogic instructions for installing Ruby 1.8.6. You don't want to be using the version that ships with OS X.
Rob Rix
2007-05-10 06:16:13
I picked up Ruby in an afternoon or so (I've a knack for languages and I've been coding since I was 7, YMMV)-- it's a beautiful, fun language and it loves you. Some links that should help:


RDoc documentation for the core classes: http://ruby-doc.org/core/


The same but for the stdlib: http://ruby-doc.org/stdlib/


The Pragmatic Programmer's guide: http://rubycentral.com/book/


And why the lucky stiff's Poignant Guide, as mentioned before, is an excellent and entertaining guide. (Chunky bacon!)


Start with a task you already know the algorithm for-- maybe do rot13 encryption, or the like. If you use Sogudi with Safari, or if you use Opera or OmniWeb, you can set up a shortcut to link to the RDoc pages (for instance, if I type 'rb Array' in my bookmarks bar and hit return I get taken to the page for Array-- w00t!), which makes things easier.


And above all, have fun!

Gregory
2007-05-10 16:41:32
My name is in the title of this post! w00t.


Despite the effects of explosive growth, the RubyTalk mailing list is still probably the best resource to go to if you have general ruby questions, and #ruby-lang on Freenode is good for quick answers.


Also, virtually all third party Ruby software ends up either on the Ruby Application Archive or RubyForge (or both!), so once you get past the first steps, that's where to look for any libs you might need.


The RubyQuiz is also a great learner's resource. Some of the quizzes can be quite difficult but not all of them, and seeing the solutions is enlightening.


My apologies for not linking any of the above, but google should pick them all up readily. (I am lazy!)


Best of luck!
-g

Sebastian
2007-05-11 00:54:40
Checking out "Programming Ruby" is a must in my opinion! Good luck! Ruby is a lot of fun!
Ted Bedwell
2007-05-18 07:27:19

If you are going to dive into rails as well as just ruby, I would highly recommend checking out Locomotive.
http://locomotive.raaum.org/
Hawley
2007-05-18 11:32:39
1. www.ruby-lang.org or rubyonrails.org to install version 1.8.5 of ruby (1.8.6 is most recent version but current rails works with 1.8.5)


2. get the pdf's or books of Programming Ruby (referred to as the pickaxe) and David Blacks "Ruby for Rails"


The pickaxe gives you the basics on the language and serves as a reference. Ruby for Rails then goes into how the rails framework, and those using it, leverage the power of ruby..... that is it gets explicit about some of the very cool power user tricks of the language.


Reading the pickaxe will give you the basics to use the language for useful stuff and Black's book along with the code in the rail's framework will show you how to do that stuff in an elegant way.


Have fun.


-Hawley (who, when she isn't building guitars is a chick programmer)