Rob Learning Ruby
Here is where I rant and rave about how cool Ruby is as I learn it and get excited !
Monday, April 22, 2013
Saturday, April 20, 2013
Friday, April 12, 2013
Benchmarking faster than the Monk!
Another fun problem from RubyMonk.com solved. This one is called Number Shuffle and much to my surprise the Monk's provided solution seemed fairly inefficient at first glance. First I noticed the magic constants 3 ? 6 : 24
Ugly, and degeneralizing, but ok whatever. But why would he use Array:shuffle and :uniq to find what is apparently a permutation? Isn't that like using a slot machine repeatedly until you get 24 jackpots?
Anyway, the proof is in the performance numbers:
Ugly, and degeneralizing, but ok whatever. But why would he use Array:shuffle and :uniq to find what is apparently a permutation? Isn't that like using a slot machine repeatedly until you get 24 jackpots?
Anyway, the proof is in the performance numbers:
Wednesday, April 10, 2013
Kaprekar's Number
Sunday, April 7, 2013
My first Ruby!
Here is my first Ruby, a simple prime visualization. I want to record this moment so I can look back someday and say "Aww, how cute!"
Subscribe to:
Comments (Atom)








