What's your Ruby Number? (self.to_i)

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

Don't take it *too* seriously. All point weights are strictly
my opinion and are subject to change.

Version 1.0 follows... cut, paste, run. Or just cut and run.

Cheers,
Hal

def add(n)
   @sum += n
   puts "#{n} points (#{@sum} total)"
   puts
end

def yorn
   print "(y/n): "
   ch = gets.chomp
   ch=='y' ? 1 : 0
end

@sum = 0

puts
puts "First, three background geek questions:"
puts

puts "How many degrees in computer science do you have?"
deg = gets.to_i
add(deg*4)

puts "In what year did your write your FIRST program in any language?"
fp = gets.to_i
div4 = ((Time.now.year - fp)/4.0).ceil
add(div4*1)

puts "How many years have you worked in a software-related job?"
yrs = gets.to_i
div4 = (yrs/4.0).ceil
add(div4*1)

puts "\n----------------------"
puts "And now the Ruby stuff:"
puts

puts "In what year did you start using Ruby? (4 digits)"
yr = gets.to_i
partial = Time.now.year - yr
add(partial*2)

puts "In what year did you start reading the list or newsgroup? (4 digits)"
yr = gets.to_i
partial = Time.now.year - yr
add(partial*4)

puts "How many (non-vaporware) entries do you have in RAA and/or Rubyforge?"
raa = gets.to_i
add(raa*1)

puts "How many Ruby conferences have you assisted in organizing? (US or other)"
conf = gets.to_i
add(conf*6)

puts "Have you assisted in forming a local user's group?"
local = yorn
add(local*2)

puts "At how many Ruby conferences have you made presentations?"
conf = gets.to_i
add(conf*6)

puts "How many Ruby conferences have you attended?"
conf = gets.to_i
add(conf*4)

puts "Now, some book questions."
puts "Translations and newer editions count separately..."
puts

puts "How many Ruby books list you as an author?"
book = gets.to_i
add(book*6)

puts "How many (other) Ruby books have you contributed to?"
book = gets.to_i
add(book*4)

puts "How many (other) Ruby books mention your name?"
book = gets.to_i
add(book*2)

puts "How many unique Ruby books do you own?"
books = gets.to_i
add(books*1)

puts "Do you own a domain name (with content) including the word 'ruby'?"
dom = yorn
add(dom*2)

puts "Approximately how many packages of yours are now in the core or stdlib?"
core = gets.to_i
add(core*1)

puts "Is your name Yukihiro Matsumoto?"
matz = yorn
add(matz*10)

puts "Is your name Dave Thomas or Guy Decoux?"
dave = yorn
add(dave*6)

puts "Is your name: Nobu Nokada, Shugo Maeda, or Minero Aoki?"
nobu = yorn
add(nobu*4)

puts "Do you know any Japanese?"
japan = yorn
add(japan*2)

puts "Is Japanese your first language?"
japan = yorn
add(japan*3)

puts "Have you ever written Ruby for pay?"
pay = yorn
add(pay*10)

puts "Estimate your total lines of Ruby code written."
loc = (gets.to_i/5000.0).ceil
add(loc*1)

puts "How many Ruby presentations have you made (outside RubyConf)?"
nconf = gets.to_i
add(nconf*4)

puts "How many of your Ruby packages have been downloaded >500 times?"
over500 = gets.to_i
add(over500*3)

puts "Ever had an RCR accepted?"
rcr = yorn
add(rcr*5)

puts "That's all... your Ruby Geek status is measured at #@sum."
puts "Have a great day, and keep coding!"
puts

Wow, I'm probably the lowest rated guy here:

"That's all... your Ruby Geek status is measured at 535.
Have a great day, and keep coding!"

Well Hal, you certainly helped me fill out my list of, "I should do that!"s...

James Edward Gray II

···

On Oct 24, 2005, at 9:20 PM, Hal Fulton wrote:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

Don't take it *too* seriously. All point weights are strictly
my opinion and are subject to change.

Version 1.0 follows... cut, paste, run. Or just cut and run.

Hi,

···

In message "Re: What's your Ruby Number? (self.to_i)" on Tue, 25 Oct 2005 11:20:28 +0900, Hal Fulton <hal9000@hypermetrics.com> writes:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

Don't take it *too* seriously. All point weights are strictly
my opinion and are subject to change.

Version 1.0 follows... cut, paste, run. Or just cut and run.

It gave me 500 Ruby Number.

              matz.

Hi,

At Tue, 25 Oct 2005 11:20:28 +0900,
Hal Fulton wrote in [ruby-talk:162393]:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

143 for me.

···

--
Nobu Nakada

nobuyoshi nakada wrote:

Hi,

At Tue, 25 Oct 2005 11:20:28 +0900,
Hal Fulton wrote in [ruby-talk:162393]:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

143 for me.

robert.to_i

=> 42 - 1

2 ** 5

~ 1 year or ruby dabling

Regards,
Jason
http://blog.casey-sweat.us/

···

On 10/24/05, Hal Fulton <hal9000@hypermetrics.com> wrote:

puts "That's all... your Ruby Geek status is measured at #@sum."
puts "Have a great day, and keep coding!"
puts

Hal Fulton wrote:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

Don't take it *too* seriously. All point weights are strictly
my opinion and are subject to change.

Hmm, I thought it was going to be like Erdös numbers.

If you are matz, you have a Ruby number of 0.

If you've contributed patches to code written by matz, you have a Ruby number of 1.

If you've worked on code with someone who has a Ruby number of 1, you have a Ruby number of 2, and so on.

<URL:grossman - The Erdös Number Project;

mathew

···

--
<URL:http://www.pobox.com/~meta/&gt;
          WE HAVE TACOS

Hal Fulton <hal9000@hypermetrics.com> writes:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

Don't take it *too* seriously. All point weights are strictly
my opinion and are subject to change.

chris2.to_i # => 70

Probably too young, :wink:

···

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

gregory.to_i => 63

Attending RubyConf, writing BASIC back in '91, HighLine, and my user
group account for most of the points.

Not bad for ~ a year.

Hi --

···

On Tue, 25 Oct 2005, Hal Fulton wrote:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

135. The LOC was more or less a guess. The number of Ruby
Conferences I've helped organized, however, is etched indelibly on my
mind :slight_smile:

David

--
David A. Black
dblack@wobblini.net

nobuyoshi nakada wrote:

Hi,

At Tue, 25 Oct 2005 11:20:28 +0900,
Hal Fulton wrote in [ruby-talk:162393]:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

143 for me.

62 here...

Zach

I'm a little late getting into this thread thanks to a little storm
called Hurricane Wilma (that is the price for living in the tropical
paradise that is Florida.) At least I have power now.

Anyhow I got a 67, which isn't bad considering the 2-3 years I was out
of the community. My participation in RubyConf 2001 helped my score
considerably (since I had the t-shirts made I consider myself an
organizer.)

Also I'm trying to remember who I drove in my car back at RubyConf
2001. I'm not sure if matz was in that group, but I remember the car
was full (myself and 4 others.) Anyone remember being driven in a blue
Lexus IS300 by me back at RubyConf 2001?

Anyhow, thanks for this Hal, it was very interesting, and like James
said it makes a nice "things I should be doing in the Ruby community"
list.

Ryan

I agree - this is a great ice-breaker. It made me feel a bit better about my
minimal ruby experience - I guess it's not so 'minimal' afterall. Now I also
know where I can do some work to improve it.

- Dimitri (who got a 37)

Hal Fulton wrote:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

Don't take it *too* seriously. All point weights are strictly
my opinion and are subject to change.

Version 1.0 follows... cut, paste, run. Or just cut and run.

Cheers,
Hal

def add(n)
   @sum += n
   puts "#{n} points (#{@sum} total)"
   puts
end

def yorn
   print "(y/n): "
   ch = gets.chomp
   ch=='y' ? 1 : 0
end

@sum = 0

puts
puts "First, three background geek questions:"
puts

puts "How many degrees in computer science do you have?"
deg = gets.to_i
add(deg*4)

puts "In what year did your write your FIRST program in any language?"
fp = gets.to_i
div4 = ((Time.now.year - fp)/4.0).ceil
add(div4*1)

puts "How many years have you worked in a software-related job?"
yrs = gets.to_i
div4 = (yrs/4.0).ceil
add(div4*1)

puts "\n----------------------"
puts "And now the Ruby stuff:"
puts

puts "In what year did you start using Ruby? (4 digits)"
yr = gets.to_i
partial = Time.now.year - yr
add(partial*2)

puts "In what year did you start reading the list or newsgroup? (4 digits)"
yr = gets.to_i
partial = Time.now.year - yr
add(partial*4)

puts "How many (non-vaporware) entries do you have in RAA and/or Rubyforge?"
raa = gets.to_i
add(raa*1)

puts "How many Ruby conferences have you assisted in organizing? (US or other)"
conf = gets.to_i
add(conf*6)

puts "Have you assisted in forming a local user's group?"
local = yorn
add(local*2)

puts "At how many Ruby conferences have you made presentations?"
conf = gets.to_i
add(conf*6)

puts "How many Ruby conferences have you attended?"
conf = gets.to_i
add(conf*4)

puts "Now, some book questions."
puts "Translations and newer editions count separately..."
puts

puts "How many Ruby books list you as an author?"
book = gets.to_i
add(book*6)

puts "How many (other) Ruby books have you contributed to?"
book = gets.to_i
add(book*4)

puts "How many (other) Ruby books mention your name?"
book = gets.to_i
add(book*2)

puts "How many unique Ruby books do you own?"
books = gets.to_i
add(books*1)

puts "Do you own a domain name (with content) including the word 'ruby'?"
dom = yorn
add(dom*2)

puts "Approximately how many packages of yours are now in the core or stdlib?"
core = gets.to_i
add(core*1)

puts "Is your name Yukihiro Matsumoto?"
matz = yorn
add(matz*10)

puts "Is your name Dave Thomas or Guy Decoux?"
dave = yorn
add(dave*6)

puts "Is your name: Nobu Nokada, Shugo Maeda, or Minero Aoki?"
nobu = yorn
add(nobu*4)

puts "Do you know any Japanese?"
japan = yorn
add(japan*2)

puts "Is Japanese your first language?"
japan = yorn
add(japan*3)

puts "Have you ever written Ruby for pay?"
pay = yorn
add(pay*10)

puts "Estimate your total lines of Ruby code written."
loc = (gets.to_i/5000.0).ceil
add(loc*1)

puts "How many Ruby presentations have you made (outside RubyConf)?"
nconf = gets.to_i
add(nconf*4)

puts "How many of your Ruby packages have been downloaded >500 times?"
over500 = gets.to_i
add(over500*3)

puts "Ever had an RCR accepted?"
rcr = yorn
add(rcr*5)

puts "That's all... your Ruby Geek status is measured at #@sum."
puts "Have a great day, and keep coding!"
puts

I have a feeling that Robert will be unhappy until this
contains a couple of injects.

puts [

  [ "\nFirst, three background geek questions:" ],

  [ "\nHow many degrees in computer science do you have?",
    :i, 4 ],

  [ "In what year did your write your FIRST program in any language?",
    :y, [4] ],

  [ "How many years have you worked in a software-related job?",
    :i, [4] ],

  [ "\n----------------------" ],
  [ "And now the Ruby stuff:" ],

  [ "\nIn what year did you start using Ruby?",
    :y, 2 ],

  [ "In what year did you start reading the list or newsgroup?",
    :y, 4 ],

  [ "How many (non-vaporware) entries do you have in RAA and/or
Rubyforge?",
    :i ],

  [ "How many Ruby conferences have you assisted in organizing? (US or
other)",
    :i, 6 ],

  [ "Have you assisted in forming a local user's group?",
    :YN, 2 ],

  [ "At how many Ruby conferences have you made presentations?",
    :i, 6 ],

  [ "How many Ruby conferences have you attended?",
    :i, 4 ],

  [ "Now, some book questions." ],
  [ "Translations and newer editions count separately..." ],

  [ "\nHow many Ruby books list you as an author?",
    :i, 6 ],

  [ "How many (other) Ruby books have you contributed to?",
    :i, 4 ],

  [ "How many (other) Ruby books mention your name?",
    :i, 2 ],

  [ "How many unique Ruby books do you own?",
    :i ],

  [ "Do you own a domain name (with content) including the word
'ruby'?",
    :YN, 2 ],

  [ "Approximately how many packages of yours are now in the core or
stdlib?",
    :i ],

  [ "Is your name Yukihiro Matsumoto?",
    :YN, 10 ],

  [ "Is your name Dave Thomas or Guy Decoux?",
    :YN, 6 ],

  [ "Is your name: Nobu Nokada, Shugo Maeda, or Minero Aoki?",
    :YN, 4 ],

  [ "Do you know any Japanese?",
    :YN, 2 ],

  [ "Is Japanese your first language?",
    :YN, 3 ],

  [ "Have you ever written Ruby for pay?",
    :YN, 10 ],

  [ "Estimate your total lines of Ruby code written.",
    :i, [5_000] ],

  [ "How many Ruby presentations have you made (outside RubyConf)?",
    :i, 4 ],

  [ "How many of your Ruby packages have been downloaded >500 times?",
    :i, 3 ],

  [ "Ever had an RCR accepted?",
    :YN, 5 ],

  [ "That's all... your Ruby Geek status is measured at" ]

].inject(0){ |sum,question|
  puts question.shift
  points =
    question.inject(0){ |num,x|
      case
        when :i == x
          gets.to_i
        when :YN == x
          (gets =~ /^y/i) ? 1 : 0
        when :y == x
          num = gets.to_i
          num += (num<20) ? 2000 : 1900 if num < 100
          Time.now.year - num
        when x.respond_to?(:pop)
          ( num / x.first.to_f ).ceil
        when x.respond_to?(:/)
          num * x
        else
          raise "\n\n\aBad item: #{ x.inspect }\n\n"
      end
    }
  puts " #{points} points (#{sum+points} total)\n\n" if
    question.size > 1
  sum + points
}

James Edward Gray II wrote:

···

On Oct 24, 2005, at 9:20 PM, Hal Fulton wrote:

I offer this in the spirit of the old "purity test" and the
"nerdity test" that was derived therefrom.

Don't take it *too* seriously. All point weights are strictly
my opinion and are subject to change.

Version 1.0 follows... cut, paste, run. Or just cut and run.

Wow, I'm probably the lowest rated guy here:

"That's all... your Ruby Geek status is measured at 535.
Have a great day, and keep coding!"

I came in at 124. I should probably get involved in some high-volume Ruby stuff, try to be more active or something. Or get another CS degree.

James Britt

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

phhbt.. I got 29 and I've worked on Ruby stuff about full-time for a
little over a year.

···

On 10/24/05, James Edward Gray II <james@grayproductions.net> wrote:

On Oct 24, 2005, at 9:20 PM, Hal Fulton wrote:

> I offer this in the spirit of the old "purity test" and the
> "nerdity test" that was derived therefrom.
>
> Don't take it *too* seriously. All point weights are strictly
> my opinion and are subject to change.
>
>
> Version 1.0 follows... cut, paste, run. Or just cut and run.

Wow, I'm probably the lowest rated guy here:

"That's all... your Ruby Geek status is measured at 535.
Have a great day, and keep coding!"

Well Hal, you certainly helped me fill out my list of, "I should do
that!"s...

jacob.to_i #=> warning: in @sum+=n, @sum may be too big

:stuck_out_tongue:

···

On 10/25/05, Robert Klemme <bob.news@gmx.net> wrote:

nobuyoshi nakada wrote:
> Hi,
>
> At Tue, 25 Oct 2005 11:20:28 +0900,
> Hal Fulton wrote in [ruby-talk:162393]:
>> I offer this in the spirit of the old "purity test" and the
>> "nerdity test" that was derived therefrom.
>
> 143 for me.

>> robert.to_i
=> 42 - 1

robert.to_i

=> 42 - 1

Maybe you could try the test again, and increase your LOC estimate by 5000
or so...

Wow, I came in at 251.

But that was skewed by the 120 pts
I got for the Ruby presentations I have made outside Rubyconf.
And the 100,000 LOC didn't help that much either. Maybe should
have made it 500,000.

···

--
Jim Freeze

Wow, I'm probably the lowest rated guy here:

"That's all... your Ruby Geek status is measured at 535.
Have a great day, and keep coding!"

Well Hal, you certainly helped me fill out my list of, "I should do
that!"s...

Well, obviously I screwed up the test if anyone got higher
than Matz. I should have given 100 points for having that
name. :slight_smile:

What inflated your score so much? Mine was only 184.

There's no error checking, of course. You can easily tell it
you have 250 years of programming experience. Just like it
says on your resume. Just kidding. :wink:

<mumble>Heard about a recruiter looking for someone with
15 years of java experience...</mumble>

Hal