Ruby Black Belt

Hello Ruby community!

Do You want to take part in the creation process of exam series,
covering Ruby itself and RoR framework?

Those who are familiar with Java may have noticed the place on the web
called JavaBlackBelt.com. JavaBlackBelt is a community for Java & open
source skills assessment. Everybody is welcome to take existing and
build new exams.

Until now only Java and related technology exams were available over
there. In the recent feature it is planned to expand existing content
with a set of Ruby related exams.

The first step of exam creation is to define an exam objective and
question categories. This first step was accomplished and a draft
version is available right here:

http://www.javablackbelt.com/WikiPage.do?action=view&page=ExamRuby

The goal of objective is to define a Ruby knowledge boundaries needed
to pass the test. The content will be created according to stated
question categories.

What we need is a feedback of experienced Ruby enthusiasts (means You).

Please tell what do You think of the question categories. Are they too
complex or too simple for Basic level exam? May be there is statements
that are not easy to understand or they are just totaly wrong? May be
some topics should not be included in basic level, may be some new
added?

P.S. I will post here a message when the process of exam creation will
be started and everyone will have a change to add a tricky questions
and take the exams.

Dmitry

Dmitry Buzdin wrote:

Hello Ruby community!

Do You want to take part in the creation process of exam series,
covering Ruby itself and RoR framework?

Those who are familiar with Java may have noticed the place on the web
called JavaBlackBelt.com. JavaBlackBelt is a community for Java & open
source skills assessment. Everybody is welcome to take existing and
build new exams.

Until now only Java and related technology exams were available over
there. In the recent feature it is planned to expand existing content
with a set of Ruby related exams.

The first step of exam creation is to define an exam objective and
question categories. This first step was accomplished and a draft
version is available right here:

Domain Registered at Safenames

The goal of objective is to define a Ruby knowledge boundaries needed
to pass the test. The content will be created according to stated
question categories.

What we need is a feedback of experienced Ruby enthusiasts (means You).

Please tell what do You think of the question categories. Are they too
complex or too simple for Basic level exam? May be there is statements
that are not easy to understand or they are just totaly wrong? May be
some topics should not be included in basic level, may be some new
added?

P.S. I will post here a message when the process of exam creation will
be started and everyone will have a change to add a tricky questions
and take the exams.

Dmitry

What's the purpose of the exam? There was a thread a while back[1] where most people expressed a strong dislike for anything resembling Ruby 'certification'.

[1]http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/163911?163839-166046

-Justin

Do You want to take part in the creation process of exam series,
covering Ruby itself and RoR framework?

Not really, but I doubt you want to hear that. :wink: So, I better at least point some things out. From your basic exam:

Vocabulary and concepts (1 questions)

Ruby source file supposed to have .rb extension.

While this is good practice, it is certainly not required. There are even times it would be considered undesirable (making a command-line executable, for example).

Understand that basic commands like puts and exit are actualy Kernel class methods.

They are actually Kernel *instance* methods.

Ruby Environment (1 question)

Know that RUBYPATH contains a list of directories to look for included files.

This variable is not set on my system, just FYI.

Naming (3 questions)

Ruby naming style and how it affects code

    * Constants: UPPER_CASE
    * Classes: Starting with uppercase

...at each new word: LikeThis.

    * Methods and variables: starting with lowercase

...and using underscores to separate words: like_this.

Know that methods ending with ! are supposed to be mutators (sort!).

Actually, they are considered dangerous. exit!() is not a mutator, for example.

Comments (1 question)

Know that the Ruby code has a # (sharp) comment symbol.

...and multi-line comments:

=begin
   This is a comment.
=end

Variables (2 question)

Know that there is no unbound variables, but only class attributes.

What does this mean?

Know that it is not necessary to define staring value in Ruby. It is nil.

You will probably get a warning for programming like this though, if Ruby's warnings are on.

Know how to check if variable is defined with nil? method.

You check if a variable is nil with nil? and defined with defined?.

I/O (2 questions)

IO reading iterators: each_line

Or its alias: each().

Classes (3 questions)

Know that the name of constructor method in Ruby is 'initialize'.

The name of Ruby's default constructor is new(). The name of the method new() calls to complete object construction is initialize().

Understand that class methods are supposed to work without any object being created.

That's a little more fuzzy in Ruby than Java, since the class itself is an object.

Know that Ruby does not care what is the class name of the object until it has called methods.

What does this mean?

Methods (2 questions)

Know what does method 'alias' means in Ruby.

alias is a keyword, not a method.

Blocks (1 question)

Usage of blocks and iterators.

These are two pretty broad topics that probably should not be lumped together under one topic.

Not covered: creating own iterators and using 'yield'.

yield is used to call a block. That might be to create an iterator, but it does not have to be.

Exceptions (2 questions)

Know that Exception is a class and custom exceptions should inherit it.

I believe most custom exceptions should inherit from RuntimeError.

'catch' and 'throw' constructs.

Why are these here? They have nothing to do with exceptions.

Modules (1 question)

Understand the difference between require and load commands.

This is not related to modules.

Know that it is not mandatory to include file extension in 'require/load' directives.

Again, nothing to do with modules.

Dynamic usage of load command.

Again.

James Edward Gray II

···

On Mar 28, 2006, at 3:08 PM, Dmitry Buzdin wrote:

Hey if people is against an exam, why not make it more like a test so that
people and especially newbies (like me!) would know on which areas to
improve themselves?
I've seen such a test for C++, and I thought it was a really great tool.

···

2006/3/28, Dmitry Buzdin <buzdin@gmail.com>:

Hello Ruby community!

Do You want to take part in the creation process of exam series,
covering Ruby itself and RoR framework?

Those who are familiar with Java may have noticed the place on the web
called JavaBlackBelt.com. JavaBlackBelt is a community for Java & open
source skills assessment. Everybody is welcome to take existing and
build new exams.

Until now only Java and related technology exams were available over
there. In the recent feature it is planned to expand existing content
with a set of Ruby related exams.

The first step of exam creation is to define an exam objective and
question categories. This first step was accomplished and a draft
version is available right here:

Domain Registered at Safenames

The goal of objective is to define a Ruby knowledge boundaries needed
to pass the test. The content will be created according to stated
question categories.

What we need is a feedback of experienced Ruby enthusiasts (means You).

Please tell what do You think of the question categories. Are they too
complex or too simple for Basic level exam? May be there is statements
that are not easy to understand or they are just totaly wrong? May be
some topics should not be included in basic level, may be some new
added?

P.S. I will post here a message when the process of exam creation will
be started and everyone will have a change to add a tricky questions
and take the exams.

Dmitry

--
"winners never quit, quitters never win"

No. For the reasons others have mentioned. Public mailing lists are
a better way to learn, and any test to 'measure your skills' will
surely be missing some important things and have some unnecessary
things.

···

On 3/28/06, Dmitry Buzdin <buzdin@gmail.com> wrote:

Hello Ruby community!

Do You want to take part in the creation process of exam series,
covering Ruby itself and RoR framework?

...and multi-line comments:

=begin
  This is a comment.
=end

Really? Splendid, thanks :slight_smile: See - this _is_ useful.

Know that it is not necessary to define staring value in Ruby. It is nil.

You will probably get a warning for programming like this though, if Ruby's warnings are on.

And class scope variables - they don't default to nil.

Know that Ruby does not care what is the class name of the object until it has called methods.

What does this mean?

Dynamically typing?

If you're not aware of it, you may get a lot from: http://www.rubyquiz.com/

Certainly, the language tests I've done have seemed to be a terrible representation of my abilities (and I'm not just bitter about being bad at them, as I've generally done well :). For instance, in c++, they'd generally ask lots of ridiculous detail about totally obscure sections of the language (oooh, bit fields, and exactly what happens when you do all sorts of things that any good book will strongly warn you against - basically, questions that if you need to know the answer to, you're almost certainly doing something in an inappropriate manner). At the same time, they tend to miss out on more useful things like "do you know what the STL and Boost are, and why they're good".

I think everyone I know with any kind of "official" certification for being competent with a technology believes it to be a total waste of time. Useful for getting the odd job, but otherwise pointless.

:slight_smile: But I've got to say, I'm not sure why I have an irrational dislike of the idea of Ruby certification. Maybe a simple one would be having a gem up on rubyforge :slight_smile: And your "score" could be the number of downloads it gets :slight_smile: So I'm a zero and a zero so far...

···

On 28 Mar 2006, at 23:03, Jeppe Jakobsen wrote:

Hey if people is against an exam, why not make it more like a test so that
people and especially newbies (like me!) would know on which areas to
improve themselves?
I've seen such a test for C++, and I thought it was a really great tool.

Jeppe Jakobsen wrote:

Hey if people is against an exam, why not make it more like a test so that
people and especially newbies (like me!) would know on which areas to
improve themselves?
I've seen such a test for C++, and I thought it was a really great tool.

Want to get better at Ruby? Help answer questions on ruby-talk.

People ask all sorts of stuff, from the simple to the sublime.

When a question comes up, offer an answer.

See, if you take a test in private, you can be a major doofus and no one need know. But if you try answering questions in public, then the pressure is on; few things sharpen the mind like fear of public ridicule.

Actually, few people get ridiculed here. But if you are wrong, people *will* point it out; so you either confirm you knowledge, or expand it.

Far better than any test.

Want a certificate? Tell people to Google "Ruby+#{your_name}" and judge for themselves.

···

--
James Britt

"In Ruby, no one cares who your parents were, all they care
  about is if you know what you are talking about."
   - Logan Capaldo

I agree with James Britt's and Gregory's assessments. I know I've
learned a lot more from answering questions on this mailing list than
I would from studying for and taking some exam. I think the whole
certification/exam thing fits in more with a very corporate
environment, like you find in the Java community. I know Rails has
drawn a lot of attention to Ruby from the corporate world, but I'd
prefer to keep the nice community spirit we have and not get too
sucked into the corporate environment, at least as far as culture is
concerned.

With that said, there is nothing stopping people from making exams or
certifications for Ruby, but frankly they won't mean much without the
support of the community. Plus it is very important to have Ruby
experts involved otherwise the exam itself may not even be accurate
(as James Edward Gray II illustrated earlier in this thread.) That
situation is worse than have no exam at all...much worse.

Ryan

···

On 3/28/06, Gregory Brown <gregory.t.brown@gmail.com> wrote:

No. For the reasons others have mentioned. Public mailing lists are
a better way to learn, and any test to 'measure your skills' will
surely be missing some important things and have some unnecessary
things.

And some of us consider the creation of a certification as the hallmark that a language is undergoing the process of dilbertization. Sorry to be so blunt, Dmitry.

···

On Mar 28, 2006, at 6:28 PM, Gregory Brown wrote:

On 3/28/06, Dmitry Buzdin <buzdin@gmail.com> wrote:

Hello Ruby community!

Do You want to take part in the creation process of exam series,
covering Ruby itself and RoR framework?

No. For the reasons others have mentioned. Public mailing lists are
a better way to learn, and any test to 'measure your skills' will
surely be missing some important things and have some unnecessary
things

--
Jason Perkins
jperkins@sneer.org

"The computer allows you to make mistakes
faster than any other invention, with the
possible exception of handguns and tequila."

Robert Dober was kind enough to point out that RDoc may have led me astray here. You can call Kernel methods like class methods and they do not show up in the list of instance_methods(). They are mixed into Object though, right? Can someone clue me in here?

James Edward Gray II

P.S. See how hard it is to get a test right? :wink: We now know I'm not smart enough to write one...

···

On Mar 28, 2006, at 3:52 PM, James Edward Gray II wrote:

Understand that basic commands like puts and exit are actualy Kernel class methods.

They are actually Kernel *instance* methods.

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

Do You want to take part in the creation process of exam series,
covering Ruby itself and RoR framework?

Not really, but I doubt you want to hear that. :wink: So, I better at
least point some things out. From your basic exam:

[...]

Ruby Environment (1 question)

Know that RUBYPATH contains a list of directories to look for
included files.

This variable is not set on my system, just FYI.

And that's not what RUBYPATH does. That's what RUBYLIB does.

[...]

Understand the difference between require and load commands.

This is not related to modules.

Know that it is not mandatory to include file extension in 'require/
load' directives.

Again, nothing to do with modules.

And furthermore:

[/tmp/slumos]0% touch blah.rb
[/tmp/slumos]0% irb
irb(main):001:0> require 'blah'
=> true
irb(main):002:0> load 'blah'
LoadError: no such file to load -- blah
        from (irb):2:in `load'
        from (irb):2
irb(main):003:0> load 'blah.rb'
=> true

Dynamic usage of load command.

Again.

James Edward Gray II

Steve

···

On Mar 28, 2006, at 3:08 PM, Dmitry Buzdin wrote:

Just set it up and if some people find it useful, then so be it. You don't
need approval from anyone.

···

Yeah I could do that, but this is my first language and I can still only
answer basic questions.

···

2006/3/29, James Britt <james_b@neurogami.com>:

Jeppe Jakobsen wrote:
> Hey if people is against an exam, why not make it more like a test so
that
> people and especially newbies (like me!) would know on which areas to
> improve themselves?
> I've seen such a test for C++, and I thought it was a really great tool.

Want to get better at Ruby? Help answer questions on ruby-talk.

People ask all sorts of stuff, from the simple to the sublime.

When a question comes up, offer an answer.

See, if you take a test in private, you can be a major doofus and no one
need know. But if you try answering questions in public, then the
pressure is on; few things sharpen the mind like fear of public ridicule.

Actually, few people get ridiculed here. But if you are wrong, people
*will* point it out; so you either confirm you knowledge, or expand it.

Far better than any test.

Want a certificate? Tell people to Google "Ruby+#{your_name}" and judge
for themselves.

--
James Britt

"In Ruby, no one cares who your parents were, all they care
  about is if you know what you are talking about."
   - Logan Capaldo

--
"winners never quit, quitters never win"

First of all want to thank all of You who posted comments here. Special
thanks to James Edward Gray II for pointing at the misstakes,
incompleteness and obscure language!

When I have posted at Ruby group I have expected far more "blunt"
relpies, believe me :wink:

Now allow me to try to 'defend' myself a bit :slight_smile:

What we are talking here about is a bit different, than traditional
certification. The main purpose is learning. You pass the exam and see
that You don't know some answers. After the exam it is possible to see
the explanation and to learn (multiple-line comments is realy a good
example :slight_smile: ) As I have mentioned before, everyone will be allowed to
add new questions and the best of them will be chosen by approval
process. No single no-expert person (like me) is going to create a set
of questions and call it a certification. I will be posting mine and
humbly waiting for other Ruby specialists to rate or comment it. And of
course public mailing list and practice ARE better ways to learn :slight_smile:

And tell me one more thing - why some of You afraid of Ruby becoming
popular?

Dmitry

Robert Dober was kind enough to point out that RDoc may have led me
astray here. You can call Kernel methods like class methods and they
do not show up in the list of instance_methods(). They are mixed
into Object though, right? Can someone clue me in here?

a global function is a Kernel module function : this mean that it's a
*private* method (this is why #instance_methods don't display it) and a
public singleton method

moulon% ruby -e 'module M def f() end; module_function :f end; p M.instance_methods'

moulon%

moulon% ruby -e 'module M def f() end; module_function :f end; p M.private_instance_methods'
["f"]
moulon%

moulon% ruby -e 'module M def f() end; module_function :f end; p M.singleton_methods'
["f"]
moulon%

Guy Decoux

Benjohn Barnes <benjohn@fysh.org> writes:

:slight_smile: But I've got to say, I'm not sure why I have an irrational dislike
of the idea of Ruby certification. Maybe a simple one would be having
a gem up on rubyforge :slight_smile: And your "score" could be the number of
downloads it gets :slight_smile: So I'm a zero and a zero so far...

good != popular

good != publishes code

That said, definitely look at Ruby code of the people you want to hire.

···

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

One of the problems I'd have with a certification of this sort is that
it focuses only on the least important aspects of the language -
syntax, nomenclature, conventions, etc.

What's really important is good design skills, especially using Ruby's
tools (OO, metaprogramming, agility, etc.). And these are the type of
things which are almost impossible to test on a curicullum based,
multiple choice, certification.

Knowing a language means little more than knowing a bunch of syntax.
It's a world apart from knowing how to develop. Right now, there are
only two languages where it's usually safe to assume that someone who
knows "language" is also a good developer (Ruby and Python) - I'd hate
to see Ruby fall from that.

Thanks Steven!

I have checked and corrected everything.

As to the purpose of the exams - it will be definetly not for the
splitting Ruby people by certified and uncertified. Like I said it is
for educational purposes and for fun :slight_smile:

The Ruby has not so many documentation (especialy for libs) and
sometimes You just don't know that there is a more attractive and DRY
way to do things. Taking exams is a way to compare your knowledge to
the knowledge of other people who created and approved the questions
and a different way to learn. I can at least say that it works for me
when I have taken Java exams.

As for fears that it will be an exam only covering syntax, I could say
that it is called "Ruby Basic" for reason. The next step will be to
create next levels, like exams for specific libraries, Rails, design
style, OO patterns or something else. If you have some ideas please
share.

It will be possible to add your questions and evaulate existing ones in
the closest time. At the beginning Ruby exams will be mixed with all
the Java stuff. But if there will be interest shown, it will be posible
to divide all Ruby exams from Java and create a separate assesment
platform.

Dmitry

Dear all,

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

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

Thus, for 'select'ing a second (or subsequent) time, the semantics of
the block themselves have to change.

Else, the result of the first selection has to be manually converted
to a hash (may be using something like hsh =
Hash[select_result.flatten]).

Is there some reason why when a filter is applied to a hash, we get an
object of a different type?

This is not so much an issue, semantically, with Set instances, though
the principle applies there, as well.

Wouldn't it be good if application of a filter on an object of a given
type results in an object of the same type?

Best regards,

JS