On 3/20/11 5:27 PM, Fily Salas wrote:
> > Hi,
> >
> > I'm currently trying to learn Ruby by watching tutorial reading books an
> > articles on the internet but I was wondering what would be the best way
> > to practice it if you dont use Ruby on Rails or dont have any projects
> > to work on
> >
> > 1-Where and how can I practice Ruby?

There are lots of ways to practice, and a lot of places to do it. It
really depends on what your interests are and what sort of things you
want to build. I would say though, that tutorials, books, and articles
should be used as learning aides, not as a way to learn. If you study
programming concepts in isolation of active practice on real things you
care about, and don't actually build stuff, you may learn the concepts
but not get anything out of your effort.

Once you have an idea for a project to work on, your ability to make the
most out of tutorials and books will go way up, since you can
automatically filter the information and seek out the stuff most
relevant to you, or at least come up with good questions so that others
can help point you in the right direction.

> > 2-What kind of project can you do to get better on Ruby?

Any project you work on will improve your programming experience if it's
something that is useful and interesting to you. What kind of work do
you do day to day? Can you think of a way that some software could
improve your daily life? If your hands are tied at work, what are your
hobbies? Is there a way you can write programs to support those activities?

If you're just looking to program for the joy of learning, is there any
kinds of software out there that really excite you and that you'd like
to learn more about? You might learn a lot about those programs if you
attempt to build something similar yourself, but only focus on the
features you really need. Or, you could build a tool to compliment some
existing software you use in some way, something that takes something
you like and makes it even better.

If none of those things spark any ideas, you could consider working on
some puzzles. You could try any of the following:

* http://projecteuler.net/
* http://rubyquiz.com/
* http://ipsc.ksp.sk/
* http://puzzlenode.com (Just launched, this is a project of mine)

I love working on puzzles and programming challenges, but I'll confess
that I don't think they're as valuable as learning tools as people tend
to make them seem. You will learn a ton from a puzzle, but not
necessarily about specific skills that you can use to build tools that
make your life better. That puts them in the same category as other
sorts of entertainment/personal development for me, such as meditation
practice, exercise, and playing board games. Just because something is
fun and good for you doesn't mean it's going to make you good at
something that matters to you.

Of course, if you're new to Ruby, you will need to do a certain amount
of practice with the fundamentals. I think that working on real code is
the best way to do that, but it really helps to do some drills too. For
that, something like Ruby Koans or Hackety Hack are really going to give
you some good base knowledge to work from:

* http://rubykoans.com/
* http://hackety-hack.com/

Finally, I should mention that I run a school for intermediate Ruby
developers which is very supportive of helping people learn. You may not
be at the level yet where you could make the best use of our resources,
but there are lots of problems and exercises listed on our website at
http://university.rubymendicant.com that can at least help you benchmark
your own skillset.  We also have lots of nice people in the #rmu channel
on IRC, and do occasional public events for helping beginners, which
might be worthwhile for you.

> > 3-How did you learn Ruby?

At first, I was learning Perl from a very good mentor (James Edward Gray
II). He and I both got into Ruby at the same time, and he was a much
more experienced programmer than I was at the time, so I leaned on him a
lot and asked him a lot of questions. This was back in 2004, and I'd say
that a huge amount of my Ruby learning was thanks to this mailing list
as well.

But mostly, I wrote a lot of code on projects that I cared about, and
talked to people / read things to try to improve my craft. As I learned
more, I tried to teach more, because that's a very good way to learn.
Try to write even the most basic tutorial or advice for someone else and
you'll discover lots of holes in your own knowledge that need filling,

> > 4-What you use Ruby for?

I mostly program exclusively in Ruby these days, only because I don't
have a particularly need for using other languages. When I was doing
active consulting work, I used Ruby to do backend work for a lot of
complex business applications, especially reporting related stuff. I'm
the original author of the now-outdated Ruby Reports library and the
not-outdated PDF generation library Prawn.

These days, I use Ruby for supporting the infrastructure of Ruby
Mendicant University, but I confess that most of our actual coding work
is done by our technical co-founder Jordan Byron. So my programming has
become more about building things like games and simulators for the
students at RMU to play with, and of course, whatever scripting makes my
day to day life easier.

Ruby can be used for pretty much anything, and as a programmer, I try to
write code whenever a solution to my problem doesn't exist or isn't to
my liking. That puts me all over the map in terms of the code I write.

-greg

NOTE: I'm not as active on ruby-talk as I once was, but you can follow
@seacreature on twitter to keep up with my latest projects and updates
if you'd like. I'm going to try to check out posts here once or twice a
week and get back into the swing of things, but in case I disappear
again, that's where you'll find me.