I am an unexperienced programer, and though things like why's guide and other tutorials do a good job of explaining syntax, I am trying to develop experience in making real projects. I have tried to do the ruby quizzes, but they are a bit too hard; I don't yet have a great feel for the best way to approach problems, and so I ended up having to consult how other people solved the quizzes to get over stuck points.
Are there simpler exercises out there that would be good for a noob like me, or do you think that reading code for a while might do better for familiarizing me with technique?
I don't think there's any shame in looking at "the answers" after
you've given the quiz a good try yourself -- on the contrary, reading
other peoples code is an excellent way to learn. Ruby quiz solutions
can be small enough to understand in their entirety, unlike the code-
base of a large open source project, for example.
I am an unexperienced programer, and though things like why's guide and other tutorials do a good job of explaining syntax, I am trying to develop experience in making real projects. I have tried to do the ruby quizzes, but they are a bit too hard; I don't yet have a great feel for the best way to approach problems, and so I ended up having to consult how other people solved the quizzes to get over stuck points.
Are there simpler exercises out there that would be good for a noob like me, or do you think that reading code for a while might do better for familiarizing me with technique?
A very good source of exercises is to try to (re)implement some of
Ruby's core methods in Ruby. For example, you could implement
Array#each like this:
class Array
def my_each
i = 0
until i == size
yield self[i]
i += 1
end
self
end
end
and similarly (though a bit more complexly) with other methods like
select and map. Sometimes this takes you into a more "low-level" style
of programming than you might use normally (like, maintaining an
explicit counter rather than just using an iterator), but it's very
good practice and a good way to learn.
David
···
On Wed, 23 Jul 2008, Sam Haskins wrote:
--
Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails July 21-24 Edison, NJ
* Advancing With Rails August 18-21 Edison, NJ
* Co-taught by D.A. Black and Erik Kastner
See http://www.rubypal.com for details and updates!
On Wed, Jul 23, 2008 at 4:38 AM, Sam Haskins <sam.haskins@gmail.com> wrote:
Hello all,
I am an unexperienced programer, and though things like why's guide and
other tutorials do a good job of explaining syntax, I am trying to develop
experience in making real projects. I have tried to do the ruby quizzes, but
they are a bit too hard; I don't yet have a great feel for the best way to
approach problems, and so I ended up having to consult how other people
solved the quizzes to get over stuck points.
Are there simpler exercises out there that would be good for a noob like me,
or do you think that reading code for a while might do better for
familiarizing me with technique?
Try the quizes and make extensive use of irb. Best education, ever.
One thing you should try to avoid is what I used to do, that being
trying to make it perfect on the first try.
Todd
···
On Wed, Jul 23, 2008 at 6:38 AM, Sam Haskins <sam.haskins@gmail.com> wrote:
I have tried to do the ruby quizzes, but
they are a bit too hard; I don't yet have a great feel for the best way to
approach problems, and so I ended up having to consult how other people
solved the quizzes to get over stuck points.
I am an unexperienced programer, and though things like why's guide
and other tutorials do a good job of explaining syntax, I am trying to
develop experience in making real projects.
http://www.projecteuler.net starts with some easy stuff. When you solve
one, you can see how others did it, in all kinds of languages.
I am an unexperienced programer, and though things like why's guide
and other tutorials do a good job of explaining syntax, I am trying to
develop experience in making real projects. I have tried to do the
ruby quizzes, but they are a bit too hard; I don't yet have a great
feel for the best way to approach problems, and so I ended up having
to consult how other people solved the quizzes to get over stuck points.
Are there simpler exercises out there that would be good for a noob
like me, or do you think that reading code for a while might do better
for familiarizing me with technique?
http://www.codeeval.com/ has lots of challenges with the goal of getting
jobs at various tech companies, but you can of course ignore that part
if you'd like.
I have tried to do the ruby quizzes, but they are
a bit too hard
I could recommend one of these:
- write a simple IRC bot in ruby (hehehe that was my first task)
- write a simple 2 players game (but a bit more complex than "guess a
number", maybe name the capitals of some countries, and store that in a
yaml file)
Or, if you feel adventureous you could try to write a single .rb file
which teaches you ruby. While writing this .rb file, you could write
ruby code.
No kidding btw, this is how I have collected my local FAQ. It is quite
large by now