Whilst on a Uni break I thought I'd try and attack some of the Ruby
quizzes. There's no way I'd be able to do the latest quiz but what I
thought I'd do is go over some of the previous ones and see how I'd go. I
could then peak at the answers if I get stumped.
What I'd like though is some indication of which are the 'easier' ones.
Are there any? ;-)
This is probably directed towards James, but if you're a (semi) newbie and
you've attempted some of the quizzes which did you find easiest?
cheers,
--
Mark
is a nice easy one that lets you have some fun with web APIs. Well;
doing it with zipcodes is dead easy. Doing it by country is a little
more challenging. Basically, you can make the challenge harder as you
go.
http://rubyquiz.com/quiz76.html
is nice too, and there are LOADS of ways to approach it, some more
rubyish than others.
I say these two, because I can definitely do both of them, and I'm not
the greatest programmer at all.
On 17/10/06, Mark Woodward <marko...@internode.on.net> wrote:
These are probably not easy, but most enlightening of all.
http://www.rubyquiz.com/quiz67.html
Metaprogramming koans. Not that hard, very useful.
http://onestepback.org/articles/callcc/throw_catch/continuation_koans_rb.html
callcc koans. This one is seriously not easy, but you cannot achieve
higher states of awareness if you don't do it :-)
--
Tomasz Wegrzanowski [ http://t-a-w.blogspot.com/ ]
It is, of course, vitally important to achieve enlightenment, for only
then will you realise that it is beyond your grasp. And become a
Python programmer.
Martin
> Also: in general, the more solutions a quiz has, the easier it is.
> That's not always true, but it's a good rule of thumb.
Exactly.
Here are some of the quizzes I think are easy:
http://www.rubyquiz.com/quiz14.html
http://www.rubyquiz.com/quiz61.html
http://www.rubyquiz.com/quiz78.html
Just do the check option for the problem above, unless you want a bit
more of a challenge.
http://www.rubyquiz.com/quiz84.html
There's a movie of me solving the about, linked from the FAQ. I look
real dumb in it, so it's a confidence booster. ;)
http://www.rubyquiz.com/quiz93.html
James Edward Gray II
> A good indication is the number of quiz-solutions. The 'easier' ones are
> usually more popular.
I agree. This is probably a pretty good starting metric.
Consequently, be sure to check out the quiz for pretty printing
pascal's triangle (#84). If I recall correctly, that problem was the
most popular quiz to date.
--
Lou.
I'm watching it as we speak ;-)(just paused it to write this).
I'll start with that I think as it's also in your book.
>
> http://www.rubyquiz.com/quiz93.html
>
> James Edward Gray II
PS - Textmate looks impressive!!
cheers,
--
Mark
> On Tue, 17 Oct 2006 22:23:40 +0900, James Edward Gray II wrote:
>
>> http://www.rubyquiz.com/quiz84.html
>>
>> There's a movie of me solving the about, linked from the FAQ. I look
>> real dumb in it, so it's a confidence booster. ;)
>
> I'm watching it as we speak ;-)(just paused it to write this).
> I'll start with that I think as it's also in your book.
I didn't understand that last sentence 100%, but just to be clear pp
Pascal is not in the Ruby Quiz book. :( It came too late.
However, since we're talking about the book, I tried to rearrange the
quizzes in there from easiest to hardest. Obviously that's pretty
subjective, but the quizzes at the front of the book shouldn't be too
tough.
James Edward Gray II
A good indication is the number of quiz-solutions. The 'easier' ones are
usually more popular.
Off the top of my head I remember 'Text munger (76)' as something that may
be fitting. Also, I found 'Markov Chains (74)' very entertaining as well
as an informative an fun intro to Markov. My favorite so far was the
poker-game, it learned me about how to build my own enumerable, something
that has proven very handy.
On Tue, 17 Oct 2006 22:51:26 +0900, James Edward Gray II wrote:
> On Oct 17, 2006, at 8:35 AM, Mark Woodward wrote:
>
>> On Tue, 17 Oct 2006 22:23:40 +0900, James Edward Gray II wrote:
>>
>>> http://www.rubyquiz.com/quiz84.html
>>>
>>> There's a movie of me solving the about, linked from the FAQ. I look
>>> real dumb in it, so it's a confidence booster. ;)
>>
>> I'm watching it as we speak ;-)(just paused it to write this).
>> I'll start with that I think as it's also in your book.
>
> I didn't understand that last sentence 100%, but just to be clear pp
> Pascal is not in the Ruby Quiz book. :( It came too late.
No it's not ;-) Sorry for the confusion.
> However, since we're talking about the book, I tried to rearrange the
> quizzes in there from easiest to hardest. Obviously that's pretty
> subjective, but the quizzes at the front of the book shouldn't be too
> tough.
Want a bet ;-)
Just as an aside I noticed you started with Unit Tests in the video. I
think I know the answer to this but I'll ask anyway. Should I do this for
*all* quizzes? ie is it a good habit to get into? Not unit testing per se
but building the test(s) *first*?
>
> James Edward Gray II
thanks again,
--
Mark
> http://www.rubyquiz.com/quiz84.html
>
> There's a movie of me solving the about, linked from the FAQ. I look
> real dumb in it, so it's a confidence booster. ;)
>
> http://www.rubyquiz.com/quiz93.html
You do not look "real dumb" in it and it's a wonderful movie - three
thumbs up. The unit-test driven approach is brilliant. The fact that you
make some slips, discover them thru the unit tests, and figure them out
and fix them in real time, is exactly what makes the movie so good
(otherwise it would have had no plot and no tension, only two thumbs up
in that case). The explanations are crystal-clear. Also I've recommended
this movie to several doubters as an ad for TextMate; about every 10
seconds there's some jaw-droppingly cool shortcut. m.
--
matt neuburg, phd = ma...@tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com
--
Alex
> Just as an aside I noticed you started with Unit Tests in the video. I
> think I know the answer to this but I'll ask anyway. Should I do
> this for
> *all* quizzes? ie is it a good habit to get into? Not unit testing
> per se
> but building the test(s) *first*?
It sure helps me think my way through a problem. It's always easier
for me to decide how I want to use something, and then create it.
James Edward Gray II
> James Edward Gray II <ja...@grayproductions.net> wrote:
>
>> http://www.rubyquiz.com/quiz84.html
>>
>> There's a movie of me solving the about, linked from the FAQ. I look
>> real dumb in it, so it's a confidence booster. ;)
>>
>> http://www.rubyquiz.com/quiz93.html
>
> You do not look "real dumb" in it and it's a wonderful movie - three
> thumbs up. The unit-test driven approach is brilliant. The fact
> that you
> make some slips, discover them thru the unit tests, and figure them
> out
> and fix them in real time, is exactly what makes the movie so good
> (otherwise it would have had no plot and no tension, only two
> thumbs up
> in that case). The explanations are crystal-clear. Also I've
> recommended
> this movie to several doubters as an ad for TextMate; about every 10
> seconds there's some jaw-droppingly cool shortcut. m.
Thanks so much. This single post has almost given me the courage to
do another one! ;)
James Edward Gray II
Please, do. (And, BTW, you were using Ruby -- that makes you
look smart in and of itself!)
>
> James Edward Gray II
>
>
--
thanks,
-pate
-------------------------
http://on-ruby.blogspot.com
Not as smart as doing it in Befunge.
Martin
I was a bit of a late convert to the full test-driven development thing,
but I do have to say that it very quickly showed it's worth and IMHO
it's the only way to write any code of consequence (i.e. anything more
than a quick and dirty script for some specific task). I've lost count
of the number of times I've totally misunderstood a problem going in,
but managed to refine my understanding as I write some tests.
--
Ross Bamford - ro...@roscopeco.REMOVE.co.uk
Just don't expect that all of the *solutions* to a solution-heavy quiz
will be on the easier-to-understand side. Especially on something
like pp pascal, some of the solvers got silly and decided to show off
(e.g. Kelly Norton's solution, or my third, de-optimized solution)
--
s=%q( Daniel Martin -- mar...@snowplow.org
puts "s=%q(#{s})",s.map{|i|i}[1] )
puts "s=%q(#{s})",s.map{|i|i}[1]
> Just don't expect that all of the *solutions* to a solution-heavy quiz
> will be on the easier-to-understand side. Especially on something
> like pp pascal, some of the solvers got silly and decided to show off
> (e.g. Kelly Norton's solution, or my third, de-optimized solution)
Very true. There is no guarantee of quality for any of the solutions,
as far as I know. For example, anything I posted has a decent chance
of being complete rubbish =) But that's part of the fun, no?
--
Lou.
thanks all, lots of good stuff here.
--
Mark