What do you enjoy in a ruby quiz?

I’ve noticed that the ruby quiz has been getting few responses of
late. In one sense I’m part of the problem; I seldom do the quizzes
myself. However, I do like setting them, and have fun thinking up
quizzes that are (reasonably) quick and (hopefully) enjoyable. So I
put it to you - what sort of quizzes do you enjoy? More
algorithm-based? More focused on a fun result (a game, some pretty
pictures, etc)? Something “real world” that gives you the satisfaction
of writing a useful program? Something that encourages you to explore
the libraries out there? Something competitive? Pick out one or two
quizzes that you enjoyed doing and say why.

martin

Hi Martin,

On Sun, Oct 4, 2009 at 3:57 PM, Martin DeMello [email protected]
wrote:

Pick out one or two quizzes that you enjoyed doing and say why.

The quiz I enjoyed the most was Banned Words (#9), because it involved
coming up with the best algorithm to solve the quiz. For this quiz,
various people posted their results as they were working on it, so
there was the competitive challenge of trying to find an algorithm
that performed better than the posted ones.

Wayne


Wayne V.
No Bugs Software
Agile Ruby (preferably not Rails), Erlang, C# contract programming on
Vista, Linux, OS X in Silicon Valley

I like algorithm-based and real world. Im a undergrad and i participate
in
the international collegiate programming contest(ACM-icpc), i try to
solve
many problems using online judges on the ruby language(so i pratice my
algorithm knowledge and get better on ruby), and i also enjoy real world
problems because of just like you said, the satisfaction of writing a
useful
problem.

On Oct 4, 6:57 pm, Martin DeMello [email protected] wrote:

I’ve noticed that the ruby quiz has been getting few responses of
late. In one sense I’m part of the problem; I seldom do the quizzes
myself. However, I do like setting them, and have fun thinking up
quizzes that are (reasonably) quick and (hopefully) enjoyable. So I
put it to you - what sort of quizzes do you enjoy? More
algorithm-based? More focused on a fun result (a game, some pretty
pictures, etc)? Something “real world” that gives you the satisfaction
of writing a useful program? Something that encourages you to explore
the libraries out there? Something competitive? Pick out one or two
quizzes that you enjoyed doing and say why.

I do not think it is so much your fault. According to the stats, ruby-
talk hit its peak in August '06 with 6579 posts. Last month the list
received barely 2000 posts. And readership continues to decline about
about 25% per year.

The quiz I enjoyed the most was Banned Words (#9), because it involved
coming up with the best algorithm to solve the quiz. For this quiz,
various people posted their results as they were working on it, so
there was the competitive challenge of trying to find an algorithm
that performed better than the posted ones.

Competition is great, I must agree. There was a Ruby contest for a
hangman player, just finished recently. That was fun to take part in.

I’m not so much into cute stuff. I did check the Ruby Q. book out
and scanned it to see if it had anything useful for me. I have no
problem
with fun, but most of us use Ruby for quick and dirty code where we need
to
have the flexibility of an interpretive language that doesn’t have the
developmental bottleneck of a compiler step. That said, is anyone
considering a compiler for Ruby, for use once the code has been debugged
and
is working?

I would find useful a library of standard classes and their essential
methods for artificial intelligence programs. For example, it would be
useful to have a library of the five uninformed searches (blind
searches)
that would include: Breadth-first, Depth-first, Depth-limited, Iterative
deepening depth-first, and Bidirectional searches. And the Informed
searches, where a heuristic calculation is possible (where there is a
way to
determine how close you are to the solution): Greedy best-first, A*,
Recursive best-first, Hill-climbing, Simulated annealing, Local beam,
Genetic algorithm, and Online search agents.
And if someone could embed those routines into an example problem
solving
program to demostrate its use, that would be even better. For example,
for
my advanced artificial intelligence class I just finished a A*
best-first
search routine to find the path from any starting position to any
solvable
goal state in the classic 8-puzzle problem. (Remember that 8-puzzle has
two
separate sets of solvable problems.) I’m sure I’m not the first to
write
this sort of code.

And examples of the more common sort routines for queues would be
useful.
You know, the stuff that Donald Knuth did ages ago in his generic
language.

Probably could put together a book “Artificial Intelligence with Ruby”
or
something like that.

No Sam

On Oct 4, 2009, at 5:57 PM, Martin DeMello wrote:

I’ve noticed that the ruby quiz has been getting few responses of
late. In one sense I’m part of the problem; I seldom do the quizzes
myself. However, I do like setting them, and have fun thinking up
quizzes that are (reasonably) quick and (hopefully) enjoyable. So I
put it to you - what sort of quizzes do you enjoy?

I really enjoy working the quizzes, but I really don’t have long hours
to give to it anymore. The length of the problem is definitely my
number one factor in deciding whether or not to do them these days.
If I start to read through the problem and begin to think it sounds
hard at any point I just quit right there. I guess I’m very lazy.

The good news is that I’m also pretty dumb and easy to trick. More
than once I’ve read through the problem and thought, oh that’s easy,
only to lose two hours trying it. If I have some progress to show by
then, I will do so, but if I’m still a long way off I tend to give up.

Given those two weaknesses, I’m really an instant gratification kind
of guy. If I can start to see results quickly, I really get into it.
I think that’s why the game and algorithm quizzes tend to be my
favorites. Once I see a piece moving around the board or an algorithm
chewing through some data, I feel like I’m making progress and it
encourages me to go on. If I can choose to keep refining or submit my
small effort, more the better.

If it’s an algorithm problem though, spell it out for me at least
enough to get going. If I have to start with an hour of reading or
thinking I’m already bored and give up. Early success, on the other
hand, is addictive and makes me want to keep going.

I’m also pretty bad at math, so heavy number crunching usually scares
me off too. Again, dumb it down for people like me when you can.

There’s nothing wrong with fairly easy problems. Lots of people try
them and those who fine them easy tend to spend their extra energy
getting creative with their solutions. As soon as we get that kind of
fun flowing around we all learn something.

So, just do all of that and you’ll be a smashing success. Easy,
right? :slight_smile:

James Edward G. II

So those of you who joined the forum in 2006 have probably reached 100%
of
your space use on Gmail by now? My count is that there were a little
over
900 posts for the most recent combined months of August and September
(at
least that is the count I have in my folder for Ruby posts). That is
around
5400 a year instead of the 2000 a month you say. I doubt I could keep
up
with 2,000 a month. I do have a life.

No Sam

On Mon, Oct 5, 2009 at 7:57 AM, Martin DeMello [email protected]
wrote:

martin

I like quizzes that present problems that are easy for everyone to
understand.
Something that makes you think but doesn’t require much time.

Long Division #180
Mexican Blanket #127

The CryptogramII #206 quiz got me interested in cryptograms and I did
Cryptogram #13,
but I did not post it.

So, I guess these deal with simple mathematics or are simple puzzles.

These quizzes helped me explore Ruby without the need for gems, etc.
Instead of just finding a solution I like to learn more about Ruby.

Harry

Here is an artificial intelligence problem waiting for an algorithm.
Would
make a great but hard quiz problem.

Given that you can only use the rules of

  1. De Morgans Law [(A v B) <=> ~A & ~B],
  2. Material Implication [A -> B <=> ~A v B],
  3. Distribution [A v (B & C) <=> (A v B) & (A v C) or A & (B v C) <=> (A
    &
    B) v (A & C)],
  4. Simplification [A & B => A, and A & B => B], and
  5. Double Negative [A <=> ~~A]
    construct an algorithm that will solve by Resolution any symbolic logic
    problem, with one or more stated propositions to reach a solvable stated
    goal by using the negative of the goal and creating a contradiction.

If you get stuck, you might also use the rule of Co-imply [A v A <=> A,
or A
& A <=> A].

For example, prove that (~P & Q) v (P & ~P) can result in Q as a stated
goal
with the same truth value. So (~P & Q) v (P & ~P) and the negative of
the
goal, ~Q are your two propositions (statements) you use to reach the
contradition.

Do NOT use truth tables.

That is a algorithm worthy of working on. And, yes, it is programmable.

If you are not familiar with the symbolism, a “v” means OR. The rest is
self evident.

No Sam

On Oct 4, 9:13 pm, Mason K. [email protected] wrote:

So those of you who joined the forum in 2006 have probably reached 100% of
your space use on Gmail by now? My count is that there were a little over
900 posts for the most recent combined months of August and September (at
least that is the count I have in my folder for Ruby posts). That is around
5400 a year instead of the 2000 a month you say. I doubt I could keep up
with 2,000 a month. I do have a life.

No Sam

http://groups.google.com/group/ruby-talk-google/about?hl=en

First thankyou for continuing with the quiz!

I find that most of the puzzles are too difficult for me to start on, although once some pointers have been posted i can usually make a start and make progress.

What I am getting out of it at the moment is learning from others who do post solutions.

The issue for me is that I seem to be competing with some very impressive programmers.

I would appreciate a mixture of some simple quizzes that allow me to participate well but not ignoring the needs of the more expert so putting in some quite challenging ones. Whether they are algorithm or real world I don't think is the issue, except that real world problems might need the additional step of abstraction.

I agree with Harry K., some easier ones for me!

On 10/05/2009 03:13 AM, Mason K. wrote:

So those of you who joined the forum in 2006 have probably reached 100% of
your space use on Gmail by now?

Definitively not: my first ruby-talk emain on the GMail account dates
back to August 2008 and I am still only at 19% of my account’s storage
space.

My count is that there were a little over
900 posts for the most recent combined months of August and September (at
least that is the count I have in my folder for Ruby posts). That is around
5400 a year instead of the 2000 a month you say. I doubt I could keep up
with 2,000 a month. I do have a life.

Reading all of them is a different story. I don’t. :slight_smile:

Kind regards

robert

On Oct 4, 2009, at 10:41 PM, Mason K. wrote:

Here is an artificial intelligence problem waiting for an
algorithm. Would make a great but hard quiz problem.

The rest is self evident.

Personal experience is everything. I can’t even read this problem. :frowning:

James Edward G. II

For what it’s worth, I really enjoyed the Google codejam this year,
but I’ve never participated in the Ruby Q. (though I did buy the
‘best of’ book)

Codejam did it for me because it forced me to timetable in a 2hr slot
to work on a few problems, as the rounds were time limited. That’s
not a direction I’m expecting Ruby Q. to take, but it is what
attracted me to the Codejam.

However, I really loved the problems too - they read very simply, and
it’s often easy to come up with a naive solution that won’t work on
large inputs due to algorithm complexity, so you must refine that
answer to get the best performance out of your program.

People mentioned games - one of the Round 2 problems this year
involved a digging and falling game that could be quite fun - the
question actually posed was to find the minimum number of digs to
complete the level. However, actually coding the game could be just
as much fun (and would give me an excuse to actually learn something
about rubygame).

Another problem involved calculating the probability for an animal to
be cute based on parsing a cuteness probability tree. I’d love to see
this one done in Ruby because the problem sounds like it plays to
Ruby’s strengths big time.

So, my 2 suggestions:

  1. re-use some of the google codejam problems
  2. Try to graduate the problems by using some constraints that make a
    naive solution work, then relaxing those constraints so the expert
    programmers get a tougher nut to crack.

Another good example of point 2 - in one round we were asked to
calculate the minimum power of a sprinkler such that any 2 sprinklers
would cover every plant in a greenhouse with water.

Easy: Given a fixed sprinkler size, determine if the sprinkler covers
the 3 plants in a given greenhouse
Normal: Determine the minimum sprinkler size that could cover all 3
plants in a given greenhouse
Hard: Determine the minimum sprinkler size that could cover up to 40
plants in a given greenhouse

These are all related problems of course - but the easy one should be
simple enough for most people to handle. The normal one uses a simple
case - with 3 plants the number of sprinkler positions to test is
small and manageable. With 40 plants the problem is much harder.

On Mon, Oct 5, 2009 at 12:43 PM, jonty [email protected] wrote:

programmers.

I would appreciate a mixture of some simple quizzes that allow me to
participate well but not ignoring the needs of the more expert so putting in
some quite challenging ones. Whether they are algorithm or real world I
don’t think is the issue, except that real world problems might need the
additional step of abstraction.

I agree with Harry K., some easier ones for me!


Paul S.
http://www.nomadicfun.co.uk

[email protected]

what sort of quizzes do you enjoy?

IMHO this question could be answered empirically by looking at the
number of responses.

Anyway, I like those quizzes most that demonstrate the power of a
well
though-out algorithm in comparison to mere power. I also think that a
quiz description should provide some script to test the solution for
correctness – not necessarily ruby test cases (but see #2 below).

That said, I have two suggestions:

1.) Please post the quizzes earlier (Friday or so) and take into
account
world rotation. I’d prefer Friday afternoon @ Europe.

2.) I also wonder if a ruby-only quiz isn’t a thing of the past. I
personally would be keen on comparing solutions written in ruby with
solutions in haskell, groovy or what have you. IMHO such a polyglot
quiz
would be much more fun.

Did you guys hear about the Ruby P.ming Challenge For Newbies?

That’s pretty cool.

I’d like the quizzes to:

  • be fun: compulsory

  • be ‘themed’: binary tree; using all the possibilities of Hash; or
    Enumerable; etc.

  • make me discover a new gem or twelve on rubyforge

  • make me think in a different way (but not trick me into it; that’s
    annoying)

  • make me look at an algorithm and find a way to implement it

  • be cooler than projecteuler.net

Easy right? :wink:

Hello

I did very few quizzes, and the ones I did were very short ones.

I guess that I need a very interesting name for a quiz so that it
attracts my attention when I am skimming through my overfull mailbox.

That said every quiz topic is related to some area of computing,
science, life, or anything. It is better to come up with very
different quiz topics so that they attract different people. Those who
think this particular topic is not their cup of tea can then have a
pause and will have more energy for the later quizzes.

If the quiz is practical and solves a problem that I am at least
occasionally it is a nice bonus.

However, if I notice a quiz problem that is in itself is somehow
interesting or related to a topic I like I would try it anyway.

Thanks

Michal

On Mon, Oct 5, 2009 at 12:57 AM, Martin DeMello
[email protected] wrote:

I’ve noticed that the ruby quiz has been getting few responses of
late. In one sense I’m part of the problem; I seldom do the quizzes
myself. However, I do like setting them, and have fun thinking up
quizzes that are (reasonably) quick and (hopefully) enjoyable. So I
put it to you - what sort of quizzes do you enjoy? More
algorithm-based? More focused on a fun result (a game, some pretty
pictures, etc)? Something “real world” that gives you the satisfaction
of writing a useful program? Something that encourages you to explore
the libraries out there? Something competitive? Pick out one or two
quizzes that you enjoyed doing and say why.

Hi,

I enjoyed all the quizzes I participated, and even those I didn’t even
try.
In my case the problem has been a lack of time, due to personal
routines changing: my company moved to a different location (much,
much further), plus my two kids just started the school, so when I end
all the day tasks I’m so exhausted I can’t even think to start
thinking about a quiz.

Anyway, the one I enjoyed most was the one about generating all the
strings that matched a regex. I think i got hooked because of the
theme of the problem: I like regex stuff, although I’m no expert by
any means. In general I like easy-medium ones, and of those I like
best the ones where most of the work/think time goes into how to do it
in Ruby, and not in the algorithm itself.

Another one that I liked a lot was the Twitter personalities. I had
some interesting (for me :slight_smile: ideas for this one, but only during
shower or driving, so no time to even start it :-).

Anyway I would love for RubyQuiz to continue, since I think it’s a
great resource for the community, and I’m a little bit sad that the
number of solutions has decreased so much over time. Whenever I can
spare a little bit more time I would love to get involved again.

To finish I would like to thank the people that have managed to keep
this running. Let’s hope we can bring everybody back to the level of
involvement it had !!

Jesus.

On Oct 04, 2009, at 18:57 , Martin DeMello wrote:

martin

Hi Martin,

Love Ruby Q… My answer to your question is that I prefer multi-
level challenges. These are the ones that have a solution which
beginning programmers (like my students) as the first ‘level’ or
‘section’ and then have one or maybe two other levels to offer
challenge to those who have the skill and/or time.

~Wayne