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

C

Christophe Grandsire

Selon Joel VanderWerf said:
But I thought =3D~ was pronounced "zygmuntowicz"!

And here I was thinking it was the chosen pronunciation for the future **=
as in
**keys ;) .
--
Christophe Grandsire (to_i =3D 14 . That's what happens when you are a tr=
ue
newbie, don't have time to code, and cannot attend conferences :( ).

http://rainbow.conlang.free.fr

It takes a straight mind to create a twisted conlang.
 
G

gabriele renzi

David A. Black ha scritto:


We doubled our number of core-method-named people at RubyConf this
year, thanks to the presence of Adam Keys as well as Jim Freeze.

I'm still holding out for Matt Tainted? or Joe Instance_variable_get.
And if anyone legally changes his or her last name to a core method,
he or she will be admitted free of charge.


David


mh.. what about second names? I am quite sure there is some joe p. smith
 
A

Austin Ziegler

Whew... I was thinking I must've _way_ underestimated my LOC!

irb(main):002:0> nathaniel.to_i
=3D> 122

Speaking at every RubyConf helped :)

Hm. I may have overestimated my LOC, but I got:

austin.to_i # =3D> 120

-austin
 
D

Dave Burt

Christian said:
I wanna be flip-flop then! Don't deprecate me.

If you spell that ".." or "...", people might get the pronunciation confused
with "range operator" or "to" for short.

Cheers,
Dave
 
R

Ryan Leavengood

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
 
D

Dirk Meijer

------=_Part_2921_15962948.1130619500297
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

only 6.. that must be the lowest..
i feel a bit loserish..
anyway, i'm only 16 and ruby is my first REAL language (other than silly
BASIC things on my calculator)
but the test looks great :)
greetings, Dirk.

2005/10/29 said:
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

------=_Part_2921_15962948.1130619500297--
 
K

Kero

Sure, why not. And you should get a point for having a last
Yeah, but #freeze belongs to the top class, Object.
Only way to beat that is to be in Kernel. Know anyone
named 'puts' or 'fail'? :)

There are enough hits on "Mr Rand" and "Mr Trap" on google :)
And "Mr Loop" is there, too.

+--- Kero ------------------------- kero@chello@nl ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://members.chello.nl/k.vangelder ---+
 
R

Ryan Leavengood

Heh: I beat Matz!!!

It helps to be giving 2-4 Ruby talks/week :)

Somehow I imagine you are the only person in RubyDom to beat matz, and
in fact I bet your number is greater than 1000, eh?

I hate you.

Jealously yours,
Ryan

;)
 
D

Dimitri Aivaliotis

------=_Part_717_15365394.1131027204046
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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

- Dimitri (who got a 37)

------=_Part_717_15365394.1131027204046--
 
W

William James

Hal said:
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
}
 

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,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top