[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

newbie; needs direction

Albert Schlef

4/27/2008 11:04:00 AM

I'm a very experienced programmer, but I'm new to ruby.

I've studied the grammar of the language already, I found it easy, and
I'm now looking for "good source code" that I can just read and learn
from.

I already studied ruby-dbi's source code.

I considered learning AcriveRecord, but maybe I should wait a bit with
this.

My question, sort of, is: "What now?"

I know it's a vague question. I'll ask it differently: "I've studied the
grammar. OK. And I'm a good programmer, probably. What should be my next
steps in Ruby? Should I look for a 'beautiful' package, like Rails, and
study it?"

I'm somewhat at a loss.
--
Posted via http://www.ruby-....

9 Answers

Tim Hunter

4/27/2008 11:19:00 AM

0

Albert Schlef wrote:
> I'm a very experienced programmer, but I'm new to ruby.
>
> I've studied the grammar of the language already, I found it easy, and
> I'm now looking for "good source code" that I can just read and learn
> from.
>
> I already studied ruby-dbi's source code.
>
> I considered learning AcriveRecord, but maybe I should wait a bit with
> this.
>
> My question, sort of, is: "What now?"
>
> I know it's a vague question. I'll ask it differently: "I've studied the
> grammar. OK. And I'm a good programmer, probably. What should be my next
> steps in Ruby? Should I look for a 'beautiful' package, like Rails, and
> study it?"
>
> I'm somewhat at a loss.

Welcome to Ruby!

Two things. Well, three. No, four:

1. Check out the Ruby Quiz archives at www.rubyquiz.com. Lots of good
code there.

2. Don't just read Ruby, write Ruby. Studying Ruby is one thing,
experiencing Ruby something entirely different. But you knew that already.

3. Hang around. This is a great community with lots of great ideas,
experienced and talented programmers, and hot debates.

4. Interact. Post your code. Ask questions. Answer questions.

Good luck!

--
RMagick: http://rmagick.ruby...
RMagick 2: http://rmagick.ruby...rmagick2.html

Pascal J. Bourguignon

4/27/2008 11:23:00 AM

0

Albert Schlef <albertschlef@gmail.com> writes:

> I'm a very experienced programmer, but I'm new to ruby.
>
> I've studied the grammar of the language already, I found it easy, and
> I'm now looking for "good source code" that I can just read and learn
> from.
>
> I already studied ruby-dbi's source code.
>
> I considered learning AcriveRecord, but maybe I should wait a bit with
> this.
>
> My question, sort of, is: "What now?"
>
> I know it's a vague question. I'll ask it differently: "I've studied the
> grammar. OK. And I'm a good programmer, probably. What should be my next
> steps in Ruby? Should I look for a 'beautiful' package, like Rails, and
> study it?"
>
> I'm somewhat at a loss.

If you're a good programmer, or even a bad one (presumably you'll
become better), why don't you just program? Anything. For example,
you could try to implement an _emacs_ in ruby. Allow to specify some
grammar, and have it behave like a structure editor. Another example,
a favorite of mine: just write an AI shell. Instead of typing unix
commands, you'd tell it what you want and it would generate the unix
commands needed to reach the goals you set.


Or perhaps you want to become a ruby scholar? Then indeed, reading
all these gems would help.

--
__Pascal Bourguignon__ http://www.informat...

ADVISORY: There is an extremely small but nonzero chance that,
through a process known as "tunneling," this product may
spontaneously disappear from its present location and reappear at
any random place in the universe, including your neighbor's
domicile. The manufacturer will not be responsible for any damages
or inconveniences that may result.

Robert Dober

4/27/2008 11:59:00 AM

0

Very well put indeed Tim, justed wanted to say welcome too.

I guess the best idea was to ask the right question at the right
place, good luck with this marvelous language.

Robert

Phlip

4/27/2008 12:53:00 PM

0

Albert Schlef wrote:

> I know it's a vague question. I'll ask it differently: "I've studied the
> grammar. OK. And I'm a good programmer, probably. What should be my next
> steps in Ruby? Should I look for a 'beautiful' package, like Rails, and
> study it?"

Study unit tests. Ruby supports some of the best unit test rigs (and best
unit tests) in the world.

Study DSLs, like RSpec. A DSL is an API whose grammar fits the problem
space, not its language's default grammar.

--
Phlip
http://assert2.ruby...

Marc Heiler

4/27/2008 12:56:00 PM

0

> My question, sort of, is: "What now?"

I think there are many answers to that question.
One answer I would like to give is to play a bit with ruby,
and then make a project or a release that includes setup.rb and
a gem-way to install that project.
That way you will know/learn how projects are done in the ruby
world, and i think it is always useful to have more people that
know how to release even small projects in ruby.
--
Posted via http://www.ruby-....

Raju Gandhi

4/27/2008 2:03:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

Again, Welcome to Ruby!!! Like you, I too am a Ruby Nuby so I hope my take
here helps.

First, I agree. Write some code to get a feel of the language. As they say,
programming is not a spectator sport. Start something small, anything that
interests you. Browse Ruby Quiz for some interesting problems and try and
work them (Honestly, I need to do that :D)

Having said that, I think you already have a good start by looking at some
of the existing code bases. I think you need to find a balance between
reading and writing. Reading will help you pick up a nuance (or a trick) in
the language that most books will not cover, writing will help you instill
it.

Another approach is pick up a book like Practical Ruby Projects [
http://tinyurl....], or something like Project Euler [
http://project...]. I personally find it hard to make up problems
unless they have a personal motive, so such books and sites help. Another
one is 99 Lisp problems (Just google it).

One way to try and understand Ruby well is to write unit tests. Take a
class, say String, and write unit tests for all of its methods! Its
painstaking, but its a lot of fun, and you will get to know Ruby intimately.


Sorry if I confused you even more than you were, but I do a bit of all of
the above. Its just what I am in the mood for. Spend an hour reading Rails
code coz I cant seem to figure out what its doing, then write some Ruby code
for a module. Getting bored, jump on to a problem I am trying to solve on
Eulers, then realize I dont understand how a particular method in
Enumberable works, so write some unit tests.

Hope this helps.

Happy Hacking.

Raju

On Sun, Apr 27, 2008 at 7:18 AM, Tim Hunter <TimHunter@nc.rr.com> wrote:

> Albert Schlef wrote:
>
> > I'm a very experienced programmer, but I'm new to ruby.
> >
> > I've studied the grammar of the language already, I found it easy, and
> > I'm now looking for "good source code" that I can just read and learn
> > from.
> >
> > I already studied ruby-dbi's source code.
> >
> > I considered learning AcriveRecord, but maybe I should wait a bit with
> > this.
> >
> > My question, sort of, is: "What now?"
> >
> > I know it's a vague question. I'll ask it differently: "I've studied the
> > grammar. OK. And I'm a good programmer, probably. What should be my next
> > steps in Ruby? Should I look for a 'beautiful' package, like Rails, and
> > study it?"
> >
> > I'm somewhat at a loss.
> >
>
> Welcome to Ruby!
>
> Two things. Well, three. No, four:
>
> 1. Check out the Ruby Quiz archives at www.rubyquiz.com. Lots of good code
> there.
>
> 2. Don't just read Ruby, write Ruby. Studying Ruby is one thing,
> experiencing Ruby something entirely different. But you knew that already.
>
> 3. Hang around. This is a great community with lots of great ideas,
> experienced and talented programmers, and hot debates.
>
> 4. Interact. Post your code. Ask questions. Answer questions.
>
> Good luck!
>
> --
> RMagick: http://rmagick.ruby...
> RMagick 2: http://rmagick.ruby...rmagick2.html
>
>


--
Raju

Antonio Cangiano

4/27/2008 2:19:00 PM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Albert Schlef wrote:
> My question, sort of, is: "What now?"

Hi Albert,

on top of the other valid suggestions, and assuming you enjoy small
mathematical problems, you could try to solve as many problems in Ruby
as you can at http://project.... That'll get you started. After
that, go ahead and start writing real programs and libraries.

Good luck,
Antonio
- --
http://antonioca... - Zen and the Art of Programming
http://sta... - Aperiodico di resistenza informatica
http://mat... - Math Blog: Mathematics is wonderful!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail....

iEYEARECAAYFAkgUi2gACgkQqCqsu0qUj9SgRwCdHS9mPjGZG4gd5GTovWHXFvVn
9KsAn32HP8uwK4qSZjiqO+Sf6Y2OwlWN
=Os+W
-----END PGP SIGNATURE-----

David A. Black

4/27/2008 2:59:00 PM

0

Hi --

On Sun, 27 Apr 2008, Albert Schlef wrote:

> I'm a very experienced programmer, but I'm new to ruby.

Welcome! First lesson: you're not a newbie; you're a nuby! :-)

> I've studied the grammar of the language already, I found it easy, and
> I'm now looking for "good source code" that I can just read and learn
> from.
>
> I already studied ruby-dbi's source code.
>
> I considered learning AcriveRecord, but maybe I should wait a bit with
> this.
>
> My question, sort of, is: "What now?"
>
> I know it's a vague question. I'll ask it differently: "I've studied the
> grammar. OK. And I'm a good programmer, probably. What should be my next
> steps in Ruby? Should I look for a 'beautiful' package, like Rails, and
> study it?"
>
> I'm somewhat at a loss.

I want to second Tim's point about not only asking but also answering
questions. I can't tell you how much I've learned about Ruby by
answering questions, specifically questions I don't know the answer to
but feel I should and therefore dig around for. Obviously you need to
bootstrap yourself into the language before you'll be comfortable
doing that, but definitely keep an eye toward it as you go.


David

--
Rails training from David A. Black and Ruby Power and Light:
INTRO TO RAILS June 9-12 Berlin
ADVANCING WITH RAILS June 16-19 Berlin
INTRO TO RAILS June 24-27 London (Skills Matter)
See http://www.r... for details and updates!

Albert Schlef

4/27/2008 4:30:00 PM

0

Thanks all!

I appreciate all your replies. (and am surprised at this warm welcome
:-)

>
> Don't just read Ruby, write Ruby.
> [...]
> why don't you just program? Anything.
>

Yes, that's what I'm going to do. I'll write a small CGI game. I'll
google for "paper and pencil games" and pick something interesting....

>
> implement an _emacs_ in ruby. [...]
> write an AI shell [...]

(Ah, that won't work. I want people to use my creation (ego, you know
;-), so an application for the web is preferable.)

>
> Check out the Ruby Quiz archives at [...]

Interesting!

>
> I personally find it hard to make up problems
> unless they have a personal motive

That's very correct, Raju. Yes, I do have needs some Ruby scripts can
solve.

>
> Interact. Post your code. Ask questions. Answer questions.
> [...]
> not only asking but also answering questions.

(I'm already doing that ...a little bit.)

>
> [...] then make a project or a release that [...]

I'd love to use rubyforge.org.

>
> something like Project Euler [http://project...].

That sounded frightening at first, but I see there are certainly things
there I can tackle, and enjoy.

People,
thanks for the motivation injection, I needed it!
--
Posted via http://www.ruby-....