[Vit-discuss] Top Ruby Projects algorithm?

zdennis zdennis at mktec.com
Fri Aug 25 16:22:08 EDT 2006

Hash: SHA1

John W. Long wrote:
> zdennis wrote:
>> The sum example with inject IMO is great...
>>   numbers = 1, 3, 5, 7, 9, 11, 13, 15, 17
>>   sum = numbers.inject( 0 ){ |sum,n| sum+=n }
>>   puts "The sum is #{sum}!"
> Maybe a little too cryptic? 

Yes it could be.

> Keep in mind this example might be the first 
> example someone ever sees of Ruby.

It may be a clearly clever example of some things in ruby. I can see why it wouldn't go on the main page, and I can also see why
it might go on the main page. At first glance it spells out you're summing numbers. At second glance you want to determine how
since it is like none other you've seen before it. And then finally you take 15 seconds and your brain figures it out.

It may be a rewarding experience for people visiting the site. Perhaps weighting the Hello will help offset how many times the
more clever code snippets show up, but I think if the site caters to all types of users not just noobs it will be good for all
people to revisit the site on a regular basis to see whats new. (Perhaps if the ip address has been logged before it will go to
more clever code, otherwise it will stick to the Hello like snippets).

of course this is all just opinion, and if it doesn't pass the test, then i'm ok with that decision. I think the work you guys are
doing is great and I realize that not everyone's opinion is going to make the cut. (but I've got $20 if mine does. haha ;)

Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the vit-discuss mailing list