Want a regular Ruby Quiz? (long)

  • Thread starter James Edward Gray II
  • Start date
J

James Edward Gray II

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
 
Z

Zach Dennis

James said:
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. ;)
 
L

Lennon Day-Reynolds

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.
 
A

Alexey Verkhovsky

Main Question: I can spare the time to organize and run a Ruby Quiz.
Would you, the Ruby community, like to have that?
+1 to the overwhelming "yes" vote that you are about to get :)

Alex
 
G

Gavin Sinclair

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?

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
 
J

James Edward Gray II

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".

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
 
J

James Edward Gray II

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

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. :)

James Edward Gray II
 
B

Bill Guindon

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.

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 :)
 
D

Dave Burt

+1

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

Randy W. Sims

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...
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. ;-) Use a seperate mailing-list
please (and not a stinking web-forum :p ). 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.
 
G

gabriele renzi @ google

James Edward Gray II said:
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 :)
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
;)

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 :)

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 ;)

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 ;)


thank you.
 
J

James Edward Gray II

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 :)

I expect you to be the first person inline to submit quiz ideas. ;)

James Edward Gray II
 
J

James Edward Gray II

+1

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

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
 
J

James Edward Gray II

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

That's okay, I disagree with your opinion. ;) 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
 
J

James Edward Gray II

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. ;-) Use a
seperate mailing-list please (and not a stinking web-forum :p ). 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
 
M

Mark Probert

James Edward Gray II said:
I expect you to be the first person inline to submit quiz ideas. ;)

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,
 
D

Dave Thomas

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:

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 :)

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


Cheers

Dave
 
D

Dave Thomas

Are you regularly adding more?

I plan to start again once I get this Ruby book put to bed.
Does your mailing list see steady traffic?

Typically just when a new kata comes out. Then people like to discuss
it (although we discourage posting solutions on the list itself)


Cheers

Dave
 
J

James Edward Gray II

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:

I'm unfamiliar with this book, but it's looking good so far. Pick a
favorite problem or three and submit then to
(e-mail address removed) when you have a chance.
"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?"

The Perl Quiz of the Week has done some fun problems along these lines.
My favorite was a word ladder problem where you find all the words
from say "house" to "shack", varying only a single letter at each step.
All words along the way also had to be in the dictionary.

It looks as if the CodeKatas may have also included this one. It
seemed to be mentioned on the Wiki, though I didn't see it in the blog.

Word problems are always fun. Hopefully, we'll have some good ones
too...

James Edward Gray II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top