Real world ruby programs to learn from

F

Fernando Perez

Hi,

Can you recommend some Ruby projects in which I can have a look to learn
good Ruby practices / idioms and why not contribute to them? I am fed up
with the stupid code examples we find in books.

The Ruby on Rails code is a bit too complex to start with I guess.
 
L

Lex Williams

Fernando said:
Hi,

Can you recommend some Ruby projects in which I can have a look to learn
good Ruby practices / idioms and why not contribute to them? I am fed up
with the stupid code examples we find in books.

The Ruby on Rails code is a bit too complex to start with I guess.

I think http://pleac.sf.net is the site you need to visit.
 
F

Fernando Perez

Your link seems very interesting and cool to learn from and can very
very helpful to jump from one language to another.
 
R

Robert Klemme

2008/9/30 Fernando Perez said:
Your link seems very interesting and cool to learn from and can very
very helpful to jump from one language to another.

I had a quick look at
http://pleac.sourceforge.net/pleac_ruby/processmanagementetc.html and
I must say this is far from correct or ideal. Issues I have spotted
on first check:

readme = IO.popen("ls") # does not use block form

$stdout = writeme # must be $stdout.reopen(writeme)

Process.waitpid(pid, 0) # should come after the read loop otherwise
deadlock may occur

Kind regards

robert
 
L

Lex Williams

Robert said:
I had a quick look at
http://pleac.sourceforge.net/pleac_ruby/processmanagementetc.html and
I must say this is far from correct or ideal. Issues I have spotted
on first check:

readme = IO.popen("ls") # does not use block form

$stdout = writeme # must be $stdout.reopen(writeme)

Process.waitpid(pid, 0) # should come after the read loop otherwise
deadlock may occur

Kind regards

robert

Robert , pleac is "a work in progress" . Anyone can make contributions
to it . It would be great if you would submit corrections to bugs you
found , if you can spare the time , of course .

Lex
 
F

Fernando Perez

Robert , pleac is "a work in progress" . Anyone can make contributions
to it . It would be great if you would submit corrections to bugs you
found , if you can spare the time , of course .

Lex
Argh too bad there are not always good coding practices, that's a reason
why I avoid looking at refactormycode for instance, there are too many
funky solutions proposed.
 
R

Robert Klemme

2008/9/30 Lex Williams said:
Robert , pleac is "a work in progress" . Anyone can make contributions
to it . It would be great if you would submit corrections to bugs you
found , if you can spare the time , of course .

I know. But time is lacking ATM. :)

robert
 
D

David A. Black

Hi --

Robert , pleac is "a work in progress" . Anyone can make contributions
to it . It would be great if you would submit corrections to bugs you
found , if you can spare the time , of course .

I submitted some suggestions a few years ago, I think involving
switching something so that it used a block, and I was told that that
wouldn't be good because it wasn't similar enough to other languages
to compare.

I got the impression that pleac was mostly Perl being written in a
variety of languages, but I haven't looked at it in a while.


David

--
Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL
Advancing with Rails January 19-22 Fort Lauderdale, FL *
* Co-taught with Patrick Ewing!
See http://www.rubypal.com for details and updates!
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Tue, 30 Sep 2008 23:51:18 +0900
Von: Fernando Perez <[email protected]>
An: (e-mail address removed)
Betreff: Re: Real world ruby programs to learn from
Argh too bad there are not always good coding practices, that's a reason
why I avoid looking at refactormycode for instance, there are too many
funky solutions proposed.

Dear Fernando,

I think a good place to look at many solutions to many problems and sometimes very
insightful comments is the Rubyquiz site:

http://rubyquiz.com/

Best regards,

Axel
 
M

Martin DeMello

I think a good place to look at many solutions to many problems and sometimes very
insightful comments is the Rubyquiz site:

Actually, just this once I would not recommend the rubyquiz site - the
programs there aren't written with an eye on maintainability.

martin
 
T

Todd Benson

Actually, just this once I would not recommend the rubyquiz site - the
programs there aren't written with an eye on maintainability.

martin

I agree with martin. There are only a handful of quizes that have
real-world applicability, and of the answers to those, only a small
percentage exhibiting good coding practices (my own included).

If someone hasn't already mentioned this, look at some of the stdlib
code, and cast your glance over the many projects on rubyforge.

Todd
 
N

Nit Khair

Fernando said:
Hi,

Can you recommend some Ruby projects in which I can have a look to learn
good Ruby practices / idioms and why not contribute to them? I am fed up
with the stupid code examples we find in books.

The Ruby on Rails code is a bit too complex to start with I guess.

Yes, I too am on the lookout for some good, working _projects_ that i
can look at the source code and understand how small to medium size
projects are structured and coded.
*Not* samples, tutorials, snippets etc. I am writing my first ruby app
(after writing a lot of small one-file scripts) - please suggest a few
project names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top