News for hackers. Stuff that matters.
Re:Startup founders, how old are you? by azsromej on Wednesday March 07, 2007 @10:16AM (#2718)
So far, the approximate average age for a founder based on the responses is (27.8)

--

require 'hpricot'

sum = 0 count = 0.0

file = Hpricot(File.open("comments.htm","r"))

file.search("span.comment/font") do |line| if line.inner_html =~ /([^\s][0-9]+[.,\s])/ number = $1.strip.to_i if number gt 10 && number lt 70 sum += number count += 1 end end end

puts "average age of founder is: " + sprintf("%.1f",sum/count)

There are no comments on this comment yet.