what do you enjoy in a ruby quiz?

M

Martin DeMello

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
 
W

Wayne Vucenic

Hi Martin,

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
 
T

Thiago Massa

[Note: parts of this message were removed to make it a legal post.]

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

Ehsanul Hoque

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

Competition is great=2C I must agree. There was a Ruby contest for a hangma=
n player=2C just finished recently. That was fun to take part in.
=0A=
_________________________________________________________________=0A=
Hotmail: Free=2C trusted and rich email service.=0A=
http://clk.atdmt.com/GBL/go/171222984/direct/01/=
 
T

trans

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

Mason Kelsey

[Note: parts of this message were removed to make it a legal post.]

I'm not so much into cute stuff. I did check the Ruby Quiz 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
 
M

Mason Kelsey

[Note: parts of this message were removed to make it a legal post.]

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
 
J

James Edward Gray II

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

James Edward Gray II
 
H

Harry Kakueki

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

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
 
M

Mason Kelsey

[Note: parts of this message were removed to make it a legal post.]

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
 
T

trans

So those of you who joined the forum in 2006 have probably reached 100% o= f
your space use on Gmail by now? =A0My count is that there were a little o= ver
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). =A0That is a= round
5400 a year instead of the 2000 a month you say. =A0I doubt I could keep = up
with 2,000 a month. =A0I do have a life.

No Sam

http://groups.google.com/group/ruby-talk-google/about?hl=3Den
 
R

Robert Klemme

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

Kind regards

robert
 
P

Paul Smith

For what it's worth, I really enjoyed the Google codejam this year,
but I've never participated in the Ruby Quiz (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 Quiz 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.
 
J

James Edward Gray II

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

James Edward Gray II
 
L

lith

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

Aldric Giacomoni

Did you guys hear about the Ruby Programming Challenge For Newbies?
http://rubylearning.com/blog/2009/09/24/rpcfn-shift-subtitle-1/
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? ;-)
 
M

Michal Suchanek

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
 
J

Jesús Gabriel y Galán

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

Wayne Seguin

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,

Love Ruby Quiz. 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
 
S

Stefan Peters

Personal experience is everything. =A0I can't even read this problem. =A0= :(

James Edward Gray II

Me too. :)

I think a good Ruby Quiz should meet the following criteria:

* An average programmer should find a acceptable (maybe not perfect)
solution in about two hours. Faster programmers than have the time to
write a small test suite ;))
* It should be possible to implement the solution in under 100 LOC
* The quiz should not require special skills (and if, provide
information)
* The quiz should not require a lot of preparation (for example
finding a suitable web service as in the current quiz)
* The solutions should be test-friendly

I think a good example, that I read today about is:
http://rubylearning.com/blog/2009/09/24/rpcfn-shift-subtitle-1/

I also like the idea of multilevel challenges.

Examples may be:

Basic:
Write a small backup DSL. It should provide a backup command with a
include and/or a exclude pattern. Also provide a destination command.
It should be possible to compress the data.

Advanced:
Split your program into client and server and find a very simple
solution to send your backup over the network. Test your program at
least at localhost


or:

Basic:
Implement a kind of rename command to rename a method of a class. The
other command should be still usable, but print a warning on the
screen, that the method was renamed (possible syntax _could_ be
"rename :method1, :method2")

Advanced:
Provide additional information were in your code a old method was used
(file and line, or stacktrace, or...) This information should be print
to screen if the command "show_all_violations" is called
Basic:
 

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,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top