Want a regular Ruby Quiz? (long)

I'm a fan of short, but regular programming "challenges" or "quizzes". I've seen a couple of others express the same sentiment here and even on the new Ruby Forum. Given that, I thought I would seriously gage interest.

Main Question: I can spare the time to organize and run a Ruby Quiz. Would you, the Ruby community, like to have that?

I'll outline my thoughts about how it should work below. If you disagree with my ideas, speak now or forever hold you peace. If you have ideas you would like to add, please do. This is a group effort.

As far as format goes, I figure we would follow somewhat close to Perl's Quiz of the Week in that we would have one quiz each week. A quiz would be sent out at some point in the week and followed up by a summary later in the week. Then the cycle would repeat.

I see little value in the Perl Quiz's Regular/Expert distinction though, so I would drop that. When we thought up a tougher problem, our quiz would be tougher and when we didn't it would be easy. Different problems are different difficultly to different coders anyway. If one question doesn't appeal to you... Well, enjoy the week off.

I'm thinking we would keep the quiz on this list. I would prepend a [QUIZ] to the front of question and summary subjects, for clarity. I could place a reminder in the quiz questions for people posting solutions and discussion to do the same.

I'm offering myself as the fallback source of questions. I would add a footer to the quiz messages, inviting people to submit questions directly to me. When quiz time rolls around, I would choose a submission or provide one of my own. The community would be strongly encouraged to submit questions as I'm not a Ruby expert. I imagine I would stumble across an interesting topic from time to time, and a dull one at least as often. Be warned.

As for problem difficultly, I have only a general guideline in mind: The problem should be relatively quick to solve. I left that vague on purpose. Everyone has different amounts of time to spare and ultimately it must be in the question writer's hands. But if you want people to actually work you're quiz, you should probably try not to overwhelm them. TopCoder often has interesting questions that can be solved in under an hour and I solved this week's Perl Quiz (in Ruby) in a little over thirty minutes. The occasional problem that takes a couple of hours for the average coder may be acceptable, but the main goal would be to keep it brief. If you want to submit an involved problem, try adding some basic framework code to the question and see if you can leave just the interesting part to "fill in".

Again, I would be the fallback guy on summaries. When you submitted a question, you would be expected to state whether or not you would like to do the summary. If there's not a volunteer, I would do it to the best of my ability, which certainly won't be perfect. The community would be expected to chime in with corrections and comments as needed.

I feel the summary is the primary reason to host our own challenges. We can examine submissions and solutions from a Ruby standpoint. That would be our main goal, to share interesting Rubyisms and thusly learn more Ruby together.

A final issue I'm undecided on: Perl's Quiz has a "grace period" (60 hours) before solutions SHOULD be posted, to allow people time to think the problem through on their own before they examine the solutions of others. Rot13 encrypting solutions would probably have about the same level of security, just to throw out a Usenet-like alternative. It's strictly custom and not enforced, but it works more often than not. I'm interested in hearing what others think about this.

Again, this is an idea in the making. Now is the time to support it, question it, condemn it, and/or add to it. All opinions will be considered and a quiz will be implemented if a vocal majority seems to want it done.

Thanks for your time.

James Edward Gray II

James Edward Gray II wrote:

Main Question: I can spare the time to organize and run a Ruby Quiz. Would you, the Ruby community, like to have that?

I would like that very much. It would help me fine tune my Ruby skills.

I'm thinking we would keep the quiz on this list. I would prepend a [QUIZ] to the front of question and summary subjects, for clarity. I could place a reminder in the quiz questions for people posting solutions and discussion to do the same.

I am ok with this.

I'm offering myself as the fallback source of questions. I would add a footer to the quiz messages, inviting people to submit questions directly to me. When quiz time rolls around, I would choose a submission or provide one of my own. The community would be strongly encouraged to submit questions as I'm not a Ruby expert. I imagine I would stumble across an interesting topic from time to time, and a dull one at least as often. Be warned.

I'd love to submit questions and I'd love to answer other peoples quiz questions.

I feel the summary is the primary reason to host our own challenges. We can examine submissions and solutions from a Ruby standpoint. That would be our main goal, to share interesting Rubyisms and thusly learn more Ruby together.

Aye a community effort!

A final issue I'm undecided on: Perl's Quiz has a "grace period" (60 hours) before solutions SHOULD be posted, to allow people time to think the problem through on their own before they examine the solutions of others. Rot13 encrypting solutions would probably have about the same level of security, just to throw out a Usenet-like alternative. It's strictly custom and not enforced, but it works more often than not. I'm interested in hearing what others think about this.

Would the grace period be a self discipline for rubyists on the mailing list not to post their solution or do you have something else in mind for how solutions would be posted? I would like not to go the self discipline way. I would forget to post to often. I would rather be able to post my solution whenever I was finished with it, but not have the solution show up until it was deemed necessary either by the admin or by a "timer".

Zach

P.S. - I have glanced at the Perl quiz but have never participated so my comments may be offbase somewhat. :wink:

+1 to the overwhelming "yes" vote that you are about to get :slight_smile:

Alex

···

On Thu, 2004-09-16 at 23:08, James Edward Gray II wrote:

Main Question: I can spare the time to organize and run a Ruby Quiz.
Would you, the Ruby community, like to have that?

From me, yes. I don't care if it's two-bit dredged up Perl quizzes
converted to Ruby; any kind of quiz is fun!

Cheers,
Gavin

···

On Friday, September 17, 2004, 6:08:05 AM, James wrote:

I'm a fan of short, but regular programming "challenges" or "quizzes".
I've seen a couple of others express the same sentiment here and even
on the new Ruby Forum. Given that, I thought I would seriously gage
interest.

Main Question: I can spare the time to organize and run a Ruby Quiz.
Would you, the Ruby community, like to have that?

I forgot to add that the aim would be non-golf, non-obfuscated solutions. I respect those sports, but I've after readable solutions we can all share. Of course, you could submit whatever you like, I'm just not promising to work too hard at reading it. :slight_smile:

James Edward Gray II

···

On Sep 16, 2004, at 3:08 PM, James Edward Gray II wrote:

I'll outline my thoughts about how it should work below.

I'm looking forward to it! But I wouldn't limit it to just programming in
Ruby, it could also work as a logic quiz.

In fact, I still hold fond thoughts about a quiz from long ago which
was tough, but was not only about programming. It was actually a quiz
that had you think (and talk) in an unusual way. If you don't know
what I'm talking about by this point, look at what I am saying (or how
I'm saying it), and try to find that which is missing.

If you do find it, try it out. It's a bit tough to pull it off, but
it's also fun :slight_smile:

···

On Fri, 17 Sep 2004 05:08:05 +0900, James Edward Gray II <james@grayproductions.net> wrote:

I'm a fan of short, but regular programming "challenges" or "quizzes".
I've seen a couple of others express the same sentiment here and even
on the new Ruby Forum. Given that, I thought I would seriously gage
interest.

--
Bill Guindon (aka aGorilla)

+1

What's the "summary" you refer to? Is that like an official "answer" that
tries to pull the submitted approaches/solutions together?

James Edward Gray II wrote:

···

I feel the summary is the primary reason to host our own challenges.
We can examine submissions and solutions from a Ruby standpoint.

I don't know how others feel, but I would love to see everyone using the same list. The perl-qotw list is already filled with ruby, python, scheme, haskell. The advantage to having one list is that you can study different approaches to solving a particular problem. Procedural vs OO. Functional vs imperative. etc. To me that's one of the most exciting things about the list.

Of course, there is a problem in that a greater burden is placed on the summarizer(s), because there are potentially more solutions to examine and because the summarizer must be able to evaluate solutions in multiple languages.

If you do go seperate ways...

James Edward Gray II wrote:

I'm a fan of short, but regular programming "challenges" or "quizzes". I've seen a couple of others express the same sentiment here and even on the new Ruby Forum. Given that, I thought I would seriously gage interest.

Main Question: I can spare the time to organize and run a Ruby Quiz. Would you, the Ruby community, like to have that?

I'll outline my thoughts about how it should work below. If you disagree with my ideas, speak now or forever hold you peace. If you have ideas you would like to add, please do. This is a group effort.

As far as format goes, I figure we would follow somewhat close to Perl's Quiz of the Week in that we would have one quiz each week. A quiz would be sent out at some point in the week and followed up by a summary later in the week. Then the cycle would repeat.

I see little value in the Perl Quiz's Regular/Expert distinction though, so I would drop that. When we thought up a tougher problem, our quiz would be tougher and when we didn't it would be easy. Different problems are different difficultly to different coders anyway. If one question doesn't appeal to you... Well, enjoy the week off.

Agreed. On perl-qotw sometime regular quizes are arguably as "advanced" as the expert quizes. In fact, the limitations sometimes make them more challenging.

I'm thinking we would keep the quiz on this list. I would prepend a [QUIZ] to the front of question and summary subjects, for clarity. I could place a reminder in the quiz questions for people posting solutions and discussion to do the same.

I would disagree. ruby-talk is already a very high-traffic, wide-ranging group. It would be difficult to track the solutions as they're posted, and the solutions can sometimes be long, making it more onerous for those poor souls still using dial-up. :wink: Use a seperate mailing-list please (and not a stinking web-forum :stuck_out_tongue: ). There are several places that host such lists (cheap or free).

I'm offering myself as the fallback source of questions. I would add a footer to the quiz messages, inviting people to submit questions directly to me. When quiz time rolls around, I would choose a submission or provide one of my own. The community would be strongly encouraged to submit questions as I'm not a Ruby expert. I imagine I would stumble across an interesting topic from time to time, and a dull one at least as often. Be warned.

As for problem difficultly, I have only a general guideline in mind: The problem should be relatively quick to solve. I left that vague on purpose. Everyone has different amounts of time to spare and ultimately it must be in the question writer's hands. But if you want people to actually work you're quiz, you should probably try not to overwhelm them. TopCoder often has interesting questions that can be solved in under an hour and I solved this week's Perl Quiz (in Ruby) in a little over thirty minutes. The occasional problem that takes a couple of hours for the average coder may be acceptable, but the main goal would be to keep it brief. If you want to submit an involved problem, try adding some basic framework code to the question and see if you can leave just the interesting part to "fill in".

This is very very difficult to gage. Some programmers are faster (which is not to say better) than others. Some have more expertise in certain areas. It's really hard to think of a good guidline here. Estimated size of the result my be a fair measure, but there is a lot of variation possible there also.

Again, I would be the fallback guy on summaries. When you submitted a question, you would be expected to state whether or not you would like to do the summary. If there's not a volunteer, I would do it to the best of my ability, which certainly won't be perfect. The community would be expected to chime in with corrections and comments as needed.

I feel the summary is the primary reason to host our own challenges. We can examine submissions and solutions from a Ruby standpoint. That would be our main goal, to share interesting Rubyisms and thusly learn more Ruby together.

A final issue I'm undecided on: Perl's Quiz has a "grace period" (60 hours) before solutions SHOULD be posted, to allow people time to think the problem through on their own before they examine the solutions of others. Rot13 encrypting solutions would probably have about the same level of security, just to throw out a Usenet-like alternative. It's strictly custom and not enforced, but it works more often than not. I'm interested in hearing what others think about this.

I think the grace period works well (and is easier). Some might argue against a grace period, but I think it is good in that it discourages speedy solutions, where people start competing to be the first to post.

···

Again, this is an idea in the making. Now is the time to support it, question it, condemn it, and/or add to it. All opinions will be considered and a quiz will be implemented if a vocal majority seems to want it done.

Thanks for your time.

James Edward Gray II

James Edward Gray II <james@grayproductions.net> wrote in message news:<1D0C97E9-081C-11D9-B4D9-000A95BA45F8@grayproductions.net>...

I'm a fan of short, but regular programming "challenges" or "quizzes".
I've seen a couple of others express the same sentiment here and even
on the new Ruby Forum. Given that, I thought I would seriously gage
interest.
Main Question: I can spare the time to organize and run a Ruby Quiz.
Would you, the Ruby community, like to have that?

sure, it would be cool :slight_smile:
Actually the Italian Ruby User Group use to have a rubyquiz of the
month, but we're, well, quite not regular, nearly 5 quiz in two years
:wink:

<snip>

I see little value in the Perl Quiz's Regular/Expert distinction
though, so I would drop that. When we thought up a tougher problem,
our quiz would be tougher and when we didn't it would be easy.
Different problems are different difficultly to different coders
anyway. If one question doesn't appeal to you... Well, enjoy the week
off.

I strongly diagree with this (but this is just an opinion, anyway).

Suppose you have a standard quiz. You may find interesting how to
build a memoize() method or Memoized class, but nubys will get really
little out of it. At the same time, if you have too simple tests,
gurus won't have fun with them.
So I really think you should have a nubyquiz wich is *really* easy,
stuff like 'write a simple function that prints "I want a cookie!'
till you enter the world cookie.' It may seem dumb, but is anyway a
great tool to show many different approaches and to teach basic
things. Nubys want stuff like that. They want simple problems to solve
that they can understand.
At least I wanted :slight_smile:

I'm thinking we would keep the quiz on this list. I would prepend a
[QUIZ] to the front of question and summary subjects, for clarity. I
could place a reminder in the quiz questions for people posting
solutions and discussion to do the same.

agreed

I'm offering myself as the fallback source of questions. I would add a
footer to the quiz messages, inviting people to submit questions
directly to me. When quiz time rolls around, I would choose a
submission or provide one of my own. The community would be strongly
encouraged to submit questions as I'm not a Ruby expert. I imagine I
would stumble across an interesting topic from time to time, and a dull
one at least as often. Be warned.

that is one of the reason our quiz is so irregular :wink:

<snip>

A final issue I'm undecided on: Perl's Quiz has a "grace period" (60
hours) before solutions SHOULD be posted, to allow people time to think
the problem through on their own before they examine the solutions of
others. Rot13 encrypting solutions would probably have about the same
level of security, just to throw out a Usenet-like alternative. It's
strictly custom and not enforced, but it works more often than not.
I'm interested in hearing what others think about this.

the usual approach that is followed on the aenigmistic newsgroups I
follow is just a simple thing like:

···

----
s
p
o
i
l
e
r
<solution>
---

or
----
..
..
..
..
..
..
spoiler
..
..
..
..
<solution>
----

but imo timing is the key :wink:

thank you.

"James Edward Gray II" <james@grayproductions.net> schrieb im Newsbeitrag news:1D0C97E9-081C-11D9-B4D9-000A95BA45F8@grayproductions.net...

Main Question: I can spare the time to organize and run a Ruby Quiz. Would you, the Ruby community, like to have that?

I'd love to see this although I don't know how much time I will be able to devote to it (either solving or coming up with questions). I'll probably will participate once in a while. Anyway, I appreciate your efforts very much.

The only thing I would hate so see about this is a quiz dieing off after some weeks due to lack of participation. Often these things start out euphoric and then peter out after some time.

Just keep it simple (no automated retardation of solutions, no web based test frameworks for each quiz etc.) - that increases the likelyhood of survival IMHO. :slight_smile:

Kind regards

    robert

I think it could be an interesting twist to use a quiz like this as a
means of conditioning people into writing to satisfy test cases, not
just written specs. Along with the description of the problem, you
could define a stub object and unit tests, which people could use to
test that their solution did indeed solve the problem.

At that point, you'd have a full-fledged training program, not just an
entertaining diversion. It would be nice to also be able to offer an
online test harness, so people could submit their code through the web
and get the results immediately, but the security concerns are
probably just too sticky.

···

--
Lennon
rcoder.net

It's self disciplined, yes. Keeping the quiz on this list, that would pretty much be our only option (at least that I can think of).

Talk about the quiz is allow during the grace period, just no spoilers or solutions.

James Edward Gray II

···

On Sep 16, 2004, at 3:26 PM, Zach Dennis wrote:

Would the grace period be a self discipline for rubyists on the mailing list not to post their solution or do you have something else in mind for how solutions would be posted? I would like not to go the self discipline way. I would forget to post to often. I would rather be able to post my solution whenever I was finished with it, but not have the solution show up until it was deemed necessary either by the admin or by a "timer".

I expect you to be the first person inline to submit quiz ideas. :wink:

James Edward Gray II

···

On Sep 16, 2004, at 7:26 PM, Bill Guindon wrote:

I'm looking forward to it! But I wouldn't limit it to just programming in
Ruby, it could also work as a logic quiz.

In fact, I still hold fond thoughts about a quiz from long ago which
was tough, but was not only about programming. It was actually a quiz
that had you think (and talk) in an unusual way. If you don't know
what I'm talking about by this point, look at what I am saying (or how
I'm saying it), and try to find that which is missing.

If you do find it, try it out. It's a bit tough to pull it off, but
it's also fun :slight_smile:

Sorry for not making that more clear. I forgot that everyone wouldn't know the Perl Quiz of the Week.

You basically have it though, yes. A summary not so much as "answer" as a write-up comparing and contrasting submitted solutions. Often a summary will show performance against a test suit, give timing information, and/or compare code length of submissions. They also point out interesting tidbits from the submitted solutions and then generally walk completely through one of the available solutions, describing how it works. Summaries may also point to interesting messages from the discussion of that quiz.

Hope that clarifies what I meant. My bad.

James Edward Gray II

···

On Sep 17, 2004, at 2:54 AM, Dave Burt wrote:

+1

What's the "summary" you refer to? Is that like an official "answer" that
tries to pull the submitted approaches/solutions together?

That's okay, I disagree with your opinion. :wink: Let me tell you why...

With the Perl Quiz of the Week they alternate between a "Regular" Quiz and an "Expert" Quiz each week. A Regular Quiz is defined as needing only the features described in "Learning Perl" to be solved. In an Expert Quiz, anything goes.

Here's everything I don't like about this system:

1. The definition is totally arbitrary. I for one have never read "Learning Perl". (I'm pretty sure it doesn't cover references or objects though.) What book should we choose in Ruby land?

2. The Quiz suffers occaisional shortages of material (it's run off of volunteer submissions), but only because therw isn't a Regular Quiz submitted and it's time for one to go out, or vice versa. There may be 50 Expert Quizzes waiting to be sent though.

3. Semi-related: This alternation has lead to a terrible numbering system. There are two Quiz #22s, for example.

4. Dropping the odd book definition, what would we replace it with? The fact remains that different problems are a different difficultly to different people.

(True story: I was once in a timed programming contest with a LOT of better coders. On one challenging question involving a quilting problem, I had it all coded up while many were still reading it over and muttering about "seam allowances". They killed me the rest of the competition, but that one problem was all me.

Why?

My wife is an avid quilter. I help her with stuff like that all the time. I barely had to read the problem to know exactly what they were after.)

I'm not comfortable rating the problems, so the simple solution seems to simply be: Don't. I imagine the end result will be largely unchanged, though less orderly. Sometimes, myself and others will come up with fairly easy problems. (I promise to make a conscious effort to do so, in fact.) Other questions will be more challenging, to some at least. We just won't have a name for this variation.

And of course, beginners are strongly encouraged to submit their own questions from problems they've run into or over come.

That's my thinking.

James Edward Gray II

···

On Sep 17, 2004, at 4:59 AM, gabriele renzi @ google wrote:

James Edward Gray II <james@grayproductions.net> wrote in message news:<1D0C97E9-081C-11D9-B4D9-000A95BA45F8@grayproductions.net>...

I see little value in the Perl Quiz's Regular/Expert distinction
though, so I would drop that. When we thought up a tougher problem,
our quiz would be tougher and when we didn't it would be easy.
Different problems are different difficultly to different coders
anyway. If one question doesn't appeal to you... Well, enjoy the week
off.

I strongly diagree with this (but this is just an opinion, anyway).

I don't know how others feel, but I would love to see everyone using the same list. The perl-qotw list is already filled with ruby, python, scheme, haskell. The advantage to having one list is that you can study different approaches to solving a particular problem. Procedural vs OO. Functional vs imperative. etc. To me that's one of the most exciting things about the list.

I see what you're getting at here. I could possibly even agree, if the quiz list analyzed such differences and gave all submissions equal attention. This certainly isn't the case with the Perl Quiz of the Week.

And then, even if it was, I have to wonder if each community wouldn't be better to have it's own source. We want our solutions examined through Ruby colored glasses, don't we? Who better to do that than the Ruby community?

For those who are looking for something like this, the Perl Quiz of the Week has recently opened up to accepting submissions in any language. The summaries are still very Perl focused, but perhaps that will change in time...

I'm thinking we would keep the quiz on this list. I would prepend a [QUIZ] to the front of question and summary subjects, for clarity. I could place a reminder in the quiz questions for people posting solutions and discussion to do the same.

I would disagree. ruby-talk is already a very high-traffic, wide-ranging group. It would be difficult to track the solutions as they're posted, and the solutions can sometimes be long, making it more onerous for those poor souls still using dial-up. :wink: Use a seperate mailing-list please (and not a stinking web-forum :stuck_out_tongue: ). There are several places that host such lists (cheap or free).

I'll admit that this would be my first choice as well. I went with keeping it here, because of the recent discussion over the forum.

In defense of the idea, it does seem 100% on topic here and we already have an audience. New subscribers would also find the quiz easier.

I could go either way here, so if you are strongly for or against one method, you better speak up now...

This is very very difficult to gage. Some programmers are faster (which is not to say better) than others. Some have more expertise in certain areas. It's really hard to think of a good guidline here. Estimated size of the result my be a fair measure, but there is a lot of variation possible there also.

And impossible to enforce, yes. I'm most just throwing it out there as a "goal". People won't play the game at all, if it's too much work.

I think the grace period works well (and is easier). Some might argue against a grace period, but I think it is good in that it discourages speedy solutions, where people start competing to be the first to post.

Excellent point.

James Edward Gray II

···

On Sep 17, 2004, at 4:32 AM, Randy W. Sims wrote:

Perl's Quiz of the Week has definitely suffered from this problem more than once in the past. Its latest reincarnation relies solely on fan support and it seems to be doing better in that form.

I just fetched Ruby Talk's active members list and got 1,100 names. If all those people send in a single quiz, we can run for a little over 21 years. I think it would take very little effort to make this great if we get behind it as a community.

I promise to do my best to make the quiz worthwhile. Eventually though I'll do something silly like go on vacation. You can help with that. You're part of this 21 year run amounts to just a single submission:

rubyquiz@grayproductions.net

This has been a public service announcement. Support your local Ruby Quiz. :wink:

James Edward Gray II

···

On Sep 19, 2004, at 6:39 AM, Robert Klemme wrote:

The only thing I would hate so see about this is a quiz dieing off after some weeks due to lack of participation. Often these things start out euphoric and then peter out after some time.

Perhaps we could take a favorite book, "Programming Pearls" by Jon Bently
and use some of the puzzles contained therein. For example, from page 11:

  "Given a dictionary of English words, find all sets of anagrams. For
instance, "pots", "stop" and "tops" are all anagrams of one another because
each can be formed by permuting the letters of the others."

And its related question:

  "Consider the problem of finding all the anagrams of a given input word.
How could you solve this problem given the word and the dictionary? What
if you could spend some time and space to process the dictionary before
answering the query?"

Regards,

···

James Edward Gray II <james@grayproductions.net> wrote:

On Sep 16, 2004, at 7:26 PM, Bill Guindon wrote:

I'm looking forward to it! But I wouldn't limit it to just
programming in
Ruby, it could also work as a logic quiz.

I expect you to be the first person inline to submit quiz ideas. :wink:

--
-mark. (probertm @ acm dot org)

Hope that clarifies what I meant.

Yes, thanks.

···

"James Edward Gray II" <james@grayproductions.net> wrote:

A summary not so much as "answer" as a write-up comparing and contrasting
submitted solutions. Often a summary will show performance against a test
suit, give timing information, and/or compare code length of submissions.
They also point out interesting tidbits from the submitted solutions and
then generally walk completely through one of the available solutions,
describing how it works. Summaries may also point to interesting messages
from the discussion of that quiz.

Have you had a look at my CodeKata?

   http://pragprog.com/pragdave/Practices/Kata

(Also an illustration of the much-underused index facility in RubLog :slight_smile:

Not all are direct programming puzzles, but there are some fun ones in there.

Cheers

Dave

···

On Sep 17, 2004, at 11:39, Mark Probert wrote:

Perhaps we could take a favorite book, "Programming Pearls" by Jon Bently
and use some of the puzzles contained therein. For example, from page 11: