Ruby programs to learn from

Hello,

I’m sure that this has been covered before, but I’m horrible at doing
searches. I never seem to get the search terms right.

It’s often been said that one way to improve upon your programming
skills is to study other people’s code. I was wondering there were any
recommendations to some great examples on Rubyforge (or elsewhere) that
would be a good place to start. I am hoping to find some smaller
programs to start with; something I can wrap my brain around and then
start working my way up to larger more complex examples. Programs that
are well documented both in and outside of the code would be great. Mind
you I’m not looking for example to teach me Ruby itself. I am hoping to
expand upon my view on how I approach writing code in general.

Your help and recommendations are greatly appreciated.

Thank you and peaceful journeys.

JT

“Throw enough rocks at something and eventually it will catch fire” -
EES

Jonathan uUttle wrote:

It’s often been said that one way to improve upon your programming
skills is to study other people’s code. I was wondering there were any
recommendations to some great examples on Rubyforge (or elsewhere) that
would be a good place to start. I am hoping to find some smaller
programs to start with; something I can wrap my brain around and then
start working my way up to larger more complex examples. Programs that
are well documented both in and outside of the code would be great. Mind
you I’m not looking for example to teach me Ruby itself. I am hoping to
expand upon my view on how I approach writing code in general.

www.rubyquiz.com

how I approach writing code in general.

I think one of the best places to look is www.rubyquiz.com.

  1. As of right now, there’s 76 different coding exercises listed.
  2. You get to see how a bunch of different people try to solve the
    problem
  3. You get James’s excellent breakdown of at least one of those
    submitted
    solutions

It’s been a huge help for me and countless others.

-M

On 4/23/06, Tim H. [email protected] wrote:

www.rubyquiz.com

+1 on rubyquiz.

Another good source is sitting on you machine:
…/ruby/lib/ruby/…

Doesn’t hurt to get to know the internals of at least a couple of the
libraries. Quite a bit of variety, and many (if not most) are well
documented, or at least commented.

Thanks for the help so far. I was indeed aware of Ruby Q. already and
have been working on some of them. I’m quite often amazed at how simple
some of the solutions can be compared to what I’ve come up with.

Any suggestions for somethings slighty more complicated? I was thinking
along the lines of complete programs and such.

Thanks again for all of your help

JT

On 4/25/06, Jonathan T. [email protected] wrote:

Thanks for the help so far. I was indeed aware of Ruby Q. already and
have been working on some of them. I’m quite often amazed at how simple
some of the solutions can be compared to what I’ve come up with.

Any suggestions for somethings slighty more complicated? I was thinking
along the lines of complete programs and such.

Well, it’s probably not your average ruby program, but I found this
helpful when I was first learning Ruby.

Jonathan uUttle wrote:

I’m sure that this has been covered before, but I’m horrible at doing
searches. I never seem to get the search terms right.

It’s often been said that one way to improve upon your programming
skills is to study other people’s code. …

The best way to improve on your programming skills is a combination of
writing and reading. Use the Ruby Q. that way - have a go yourself,
before you read and study the summary and other solutions.

Cheers,
Dave

On Wed, 26 Apr 2006, Jonathan T. wrote:

Thanks for the help so far. I was indeed aware of Ruby Q. already and
have been working on some of them. I’m quite often amazed at how simple
some of the solutions can be compared to what I’ve come up with.

Any suggestions for somethings slighty more complicated? I was thinking
along the lines of complete programs and such.

Thanks again for all of your help

http://www.codeforpeople.com/lib/ruby/rq/rq-2.3.1/bin/rq
http://www.codeforpeople.com/lib/ruby/rq/rq-2.3.1/lib/

http://www.codeforpeople.com/lib/ruby/dirwatch/dirwatch-0.9.0/bin/dirwatch
http://www.codeforpeople.com/lib/ruby/dirwatch/dirwatch-0.9.0/lib/

-a

Looks and sound interesting though there’s not much meat on the site
(unless I’ve missed a major hyperlink somewhere). It reminds me of
Donald Knuth’s “Surreal Numbers” and his Alice and Bill :slight_smile:

Bealach

On 4/26/06, Bealach Na Bo [email protected] wrote:

Looks and sound interesting though there’s not much meat on the site
(unless I’ve missed a major hyperlink somewhere). It reminds me of
Donald Knuth’s “Surreal Numbers” and his Alice and Bill :slight_smile:

Here’s the table of contents for the code overview (it’s the
‘Development Series’ link on the main page):
http://www.artcompsci.org/kali/development.html

The discussion about Ruby starts in the 2nd chapter “The 2-Body
Problem: Forward Euler, in Ruby”
http://www.artcompsci.org/kali/vol/two_body_problem_1/ch01.html

On 4/26/06, Bealach Na Bo [email protected] wrote:

Very nice blend of subjects close to my heart - thanks for putting me
on to this site.

np. If you want more like that, you should check out Ara’s SciRuby
project
http://sciruby.codeforpeople.com/sr.cgi/InterestingProjects

Hey! Another treasure trove - thanks :slight_smile: I’ve got a lot of reading to
do now…

Bealach

Very nice blend of subjects close to my heart - thanks for putting me
on to this site.

Bealach