Ruby Black Belt

James-

Yeah, that was a nice one. Just very suble at the end.

Like waving a red cape in front of a newsgroup full of bulls!

Also, good frigg'n work on the Elevator Pitch site. Yesterday I had the
rather horrible experience of having to pitch my company to a VC who
didn't seem to get it. So, can't wait to perfect the pitch for the next
one.

Maybe the next one will have ever heard of Ruby. Doubt it.

-hampton.

What about something like Programming Challenges
(www.programming-challenges.com)?
It could use those problems or even the Ruby Quiz ones.
What would you guys think?

I really like that site.

Thank you for pointing out the chained 'select'!

Allow me to apologize for the incorrect problem statement.

The issue is actually not with downstream 'select's, but with other
calls that assume a hash-like behaviour on the part of the container.

Examples include Hash# and Hash#each_value.

Should I choose to use these calls somewhere, I need to first know
whether the container I have been passed is the original hash or the
result of at least one 'select'.

The matter is confusing since Hash#reject actually returns a hash!
Yes, Hash#reject is equivalent to Hash#delete_if on a 'dup' of self.
But, semantically, the exclusion filter on the hash is returning a
hash again, while the inclusion filter is not!

I hope this explains my question better.

Best regards,

JS

Pit Capitain wrote:

···

Srinivas Jonnalagadda schrieb:

Enumerable#select always returns an array. On a hash too, it returns
an array of arrays of key-value pairs.

Right.

The issue with this approach is that 'select' calls cannot be chained.
It is now mandatory to know whether the receiver is the original hash
or is the result of at least one 'select'.

It works for me:

  h = { 0 => 0, 1 => 2, 2 => 3, 4 => 4 }

  h.select { |k,v| k % 2 == 0 }.select { |k,v| v % 2 == 0 }

  # => [[0, 0], [4, 4]]

Can you show us your problem?

Regards,
Pit

Hi --

···

On Thu, 30 Mar 2006, paul.denlinger@gmail.com wrote:

I can understand how some people are worried about the word
certification, fearing that it would create some kind of hierarchy of
insiders, with everyone else being outsiders. Maybe this is because of
the nature of the word "certification".

I share that fear. I'd hate to see people brand themselves as
outsiders by getting Ruby "certification" :slight_smile:

David

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! Ruby for Rails

rubyquiz.com

···

On 3/29/06, Pistos Christou <jesusrubsyou.5.pistos@geoshell.com> wrote:

Certainly, if there were a site that advertised itself with "Want to get
better at Ruby and have fun doing it? Visit http://....." I would click
in an instant. :slight_smile:

I just played with the Try Ruby site for 15 minutes, and like it very
much. For new programmers, it's an excellent combination with the
Pick-axe book. I'm sure that a version for more advanced programmers
would be very welcome, and would help in the propagation of Ruby.

A RubyOnRails version of the online tutorial would be really neat!

Can you imagine building your own web app with an online tutorial...

Paul

I really join those who think certification is a bad idea!
And even if it were a good idea, which I doubt, do you think a certification
could really mean you know what you are doing?
Nahh, look at all that certificates one can get (buy?). Cisco, RedHat, Java,
Micros**t, you name it, it is all about Business and
few about Knowledge.

Please be aware that I do not at least doubt the best intentions of the
poster, but I am afraid there would be no good end to this :frowning:

I strongly feel that it has nothing to do within the spirit of Open Source.

And if you follow the Ruby-Quiz I hardly can imagine that one could learn
more anywhere else.

It is also a marvellous opportunity for bright people to make themselves
known, that is why I never participate!

Cheers
Robert

···

--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.

- Albert Einstein

I thinks thats a great idea James, I'm going to add this to my list of current
projects, I'll post back to the list when I have something started
that people can join and help with if they are interested, give it about a week.

···

On 3/29/06, James Britt <james_b@neurogami.com> wrote:

If you (or anyone else) are as passionate about this as your post
suggests, then I encourage you to just go and do it. Make a site,
however simple, just get it going, invite people to join in, and see
where it goes.

People can go round and round arguing the merits of something, but a
working site trumps speculation.

--
Alex Combas
http://noodlejunkie.com/

If somebody is sceptic about this kind of stuff, he has to try pythonchallange to see how addictive it is - it really stirred up the python list, everybody was looking for answers in different techniques (wrt the task he solved ATM), i remember myself to even neglecting normal work to swish through XML-RPC, HTTP and cookies related python stuff just to get past a certain level :wink:

What do you think?

peter

btw I forgot to add: I came to know a LOT of non-programmers through python challange - i have been mailing on a (nearly) dayly basis with an US (non programmer) girl (i think se was a lawyer) up to the 18th or something level. When she begun she did nothing about programming at all, after 1 week he has been posting about regexps, after 2 weeks about bzip2 from python, after 3 weeks cookies and HTTP, well you get the idea... She was really enthusiastic to learn this stuff (which is IMHO not typical for a non technical person) just to see the next screen... And she was not the only one...

My point is that this kind of stuff has a great potential to evangelize the language to the noob/beginner/i'll-give-it-a-try/non-programmer people. You can put down pickAxe because of other tasks. You can neglect reading ruby talk. But you will not be able do this (at least based on my experience, and based on others solving python challange) with rubychallange.com! :wink:

Ruby quiz is very cool, but such a girl i have described above would never had a chance to begin it.
This is of course absolutely OK: ruby quiz is intended for a different audience.

peter

Bill Kelly wrote:

I think tryruby is awesome. I've given the link to people who
were interested in ruby but not only had never tried it, they
had very little programming experience. The feedback has been
positive (apart from the session timing out when they took a
short break. :slight_smile:

Hey, thanks, Bill. By all means, pass it around. I'm moving tryruby to a machine with a lot more power and memory (and the application is a bit more lightweight now) so I should be able to increase the time limits. I'm also working on checkpointing the thing so sessions can be stored on disk and resumed later.

_why

was this supposed to go to the list?

···

On 3/31/06, Hampton <hcatlin@gmail.com> wrote:

James-

Yeah, that was a nice one. Just very suble at the end.

Like waving a red cape in front of a newsgroup full of bulls!

Also, good frigg'n work on the Elevator Pitch site. Yesterday I had the
rather horrible experience of having to pitch my company to a VC who
didn't seem to get it. So, can't wait to perfect the pitch for the next
one.

Maybe the next one will have ever heard of Ruby. Doubt it.

Hampton wrote:

James-

Yeah, that was a nice one. Just very suble at the end.

Like waving a red cape in front of a newsgroup full of bulls!

Tact is my specialty.

Also, good frigg'n work on the Elevator Pitch site.

Thank you. I work with very good people.

···

--
James Britt

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - The Journal By & For Rubyists
http://www.30secondrule.com - Building Better Tools

Thank you for pointing out the chained 'select'!

Allow me to apologize for the incorrect problem statement.

The issue is actually not with downstream 'select's, but with other
calls that assume a hash-like behaviour on the part of the container.

Examples include Hash# and Hash#each_value.

It's not pretty but...:

h = { 0 => 0, 1 => 2, 2 => 3, 4 => 4 }

=> {0=>0, 1=>2, 2=>3, 4=>4}

Hash[*h.select { |k,v| k % 2 == 0 }.flatten].each_value {|v|

p v}
0
3
4
=> {0=>0, 2=>3, 4=>4}

marcel

···

On Wed, Mar 29, 2006 at 05:40:54PM +0900, Srinivas Jonnalagadda wrote:
--
Marcel Molina Jr. <marcel@vernix.org>

Gregory Brown wrote:

Certainly, if there were a site that advertised itself with "Want to get
better at Ruby and have fun doing it? Visit http://....." I would click
in an instant. :slight_smile:

rubyquiz.com

Yes yes... but I meant BESIDES that. :wink:

Pistos

···

--
Posted via http://www.ruby-forum.com/\.

+1 ... couldn't have said it better myself.

···

On Thu, 2006-03-30 at 07:01 +0900, Robert Dober wrote:

I really join those who think certification is a bad idea!
And even if it were a good idea, which I doubt, do you think a certification
could really mean you know what you are doing?
Nahh, look at all that certificates one can get (buy?). Cisco, RedHat, Java,
Micros**t, you name it, it is all about Business and
few about Knowledge.

--
Ross Bamford - rosco@roscopeco.REMOVE.co.uk

I can meet girls if I change from Ruby to Python?
Bye-bye, Ruby-using suckers!

;Daniel

···

On 30/03/06, Peter Szinek <peter@rt.sk> wrote:

btw I forgot to add: I came to know a LOT of non-programmers through
python challange - i have been mailing on a (nearly) dayly basis with
an US (non programmer) girl (i think se was a lawyer) up to the 18th or
something level.

--
Daniel Baird
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog :: Things
That Suck)
[[My webhost uptime is ~ 92%.. if no answer pls call again later!]]

Peter Szinek wrote:

My point is that this kind of stuff has a great potential to evangelize
the language to the noob/beginner/i'll-give-it-a-try/non-programmer
people. You can put down pickAxe because of other tasks. You can neglect
reading ruby talk. But you will not be able do this (at least based on
my experience, and based on others solving python challange) with
rubychallange.com! :wink:

Okay, I went over to this pythonchallenge.com and got to level 3 (using
irb, hehehe). It was semi-fun, and I can see how it might appeal to
some people.

It seems like a lot of work to do anything similar, at least in whole.
Perhaps whoever is going to do this could start small, and just work up
over time.

Pistos

···

--
Posted via http://www.ruby-forum.com/\.

...although it *might* be arguable that many Ruby programmers are certifiable.

-austin

···

On 3/29/06, dblack@wobblini.net <dblack@wobblini.net> wrote:

On Thu, 30 Mar 2006, paul.denlinger@gmail.com wrote:
> I can understand how some people are worried about the word
> certification, fearing that it would create some kind of hierarchy of
> insiders, with everyone else being outsiders. Maybe this is because of
> the nature of the word "certification".
I share that fear. I'd hate to see people brand themselves as
outsiders by getting Ruby "certification" :slight_smile:

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

To suggest that there's nothing between the pickaxe and rubyquiz is
ridiculous. There's plenty of opportunities. As others have said,
this list is an excellent way to learn, first by reading and
understanding, but then as James said, by contributing.

I find teaching (contributing) to be the best vehicle for learning.
It forces you to really fill in the gaps in your own understanding as
you work through it. Plus, if there are still gaps, others will
kindly point those out as well. :slight_smile:

In addition, there's such things as IRC, RubyConf, RailsConf, Rails
Studio, etc.. etc..

Michael

Hmm, I didn't get past Level 1. (Did I start at the wrong place--you start
with a cryptic "Hint: try to change the URL address."?)

Anyway, the idea as I imagined it in my mind sounded good, the actual
implementation of the idea annoys me, it seems like one of those adventure
games where you search all over the place until you get lucky and find
something useful.

Anyway, ignoring all that, I'd be interested in seeing something implemented
along the lines I imagined--you go to some page where there is a fairly well
laid out problem to solve (with adequate descriptive text). There is some
way for you to provide an answer (either via a code fragment, or maybe some
(well thought out) multiple choice answers. If you answer the question
right, you get credit for a "level" and move to the next challenge. If you
answer it wrong, you can either try again (immediately) or seek (and find)
resources to help you understand what you didn't understand before.

I was hoping that the Python challenge site included a listing of the problem
they solved at each of the challenge levels, and what they expected the
challenger to learn as a result--is there such a list?

Anyway (I guess I like that word), although I'm quite busy at the moment, I
suggest anybody who is interested in this just start--by adding their
thoughts to this thread, and then moving thoughts somewhere else as they jell
(sp?).

What makes sense as the first challenge for something like that? I guess over
on Python challenge, it has to do with (after changing the URL) to something
related to 2**38. And, of course, there is the traditional "Hello, World!"
program. Anybody have other suggestions for either the first challenge or
any subsequent challenges?

(If we don't find anything better, I'd propose to start creating relevant
pages on WikiLearn (http://twiki.org/cgi-bin/view/Wikilearn\).

Randy Kramer

Oh, I have challenge #27 (just guessing at the number)--install Ruby, tcl/tk,
TkHTML, and whatever else is required to make TkHTML display a simple HTML
string like <h3>Test page</h3> (with the correct HTML). (Then do the same
for wxHTML, kHTML, Gecko, and ???

···

On Thursday 30 March 2006 10:34 am, Pistos Christou wrote:

Okay, I went over to this pythonchallenge.com and got to level 3 (using
irb, hehehe). It was semi-fun, and I can see how it might appeal to
some people.

It seems like a lot of work to do anything similar, at least in whole.
Perhaps whoever is going to do this could start small, and just work up
over time.