dougo / quest-for-life Goto Github PK
View Code? Open in Web Editor NEWCrowsourcing the Drake Equation
Home Page: http://quest-for-life.org
License: Other
Crowsourcing the Drake Equation
Home Page: http://quest-for-life.org
License: Other
Crowdsourcing the Drake Equation Interview exercise notes ======================== Files changed: app/helpers/surveys_helper.rb app/views/surveys/_parameter_results.html.erb To install old versions of things to get this app running: rvm install ruby 1.8.7 rvm rubygems 1.3.5 gem install rake -v 0.8.7 gem install rails -v 2.3.5 gem install RedCloth -v 4.2.2 I replaced the HTML tables with plain JSON hashes to hold the chart data. The tables were hidden anyway, so it didn't seem like they were intended to be there for, say, browsers with Javascript turned off. I wasn't sure what column values to use for N. I somewhat arbitrarily chose 0, 1, 2, 3, 4, and then buckets for 5-9, 10-99, 100-999, 1000-9999, 10000+. Some of the longer column labels overlap each other, e.g. "1 in 1,000,000". Perhaps these could be combined into buckets also, or else just stagger the labels vertically so they don't overlap. Probably should consult a graphic designer and/or a data visualization expert. :) I didn't do the extra credit: I'm not sure how to make tests for Javascript behavior (capybara? haven't looked into it). (Although it just occurred to me that I could write unit tests for the surveys helper.) I didn't have time to do highlighting of the user's parameter values. Overall (not counting time spent figuring out what old versions of things to install), this exercise took me about 6-7 hours, spread across 3 hacking sessions. Potential cleanup tasks: Write a migration to clean up the data, e.g. change the age group description '26-35' to '26 - 35' to match the others, and change the null genders to 'Unknown'. Add :order clauses to the queries (currently they rely on the fact that the age groups and rational options are in the correct order in the db). Refactor chart_data to be a little cleaner/more efficient. Put Javascript code into public/javascript. Convert to Rails 3...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.