This is an example from the blog post: http://www.ngauthier.com/2011/09/using-exceptions-to-manage-control-flow.html.
Please fork it and show me what you would do!
tell me again why we need another one of these? was pastie not working well enough for you guys? | |
** okay, now i see... fork and versioned pasties. kinda neat. ** |
Fork you |
#!/usr/bin/env ruby | |
require 'benchmark' | |
require 'rubygems' | |
require 'markaby' | |
require 'tagz' | |
require 'builder' | |
require 'nokogiri' | |
max = (ARGV.shift || 10_000).to_i |
# COMMUNITY CHALLENGE | |
# | |
# How would you test this Quiz#problem method? Only two rules: | |
# | |
# 1. No mocks or stubs allowed. I'm looking for a other alternatives. | |
# Mocks can get messy in complex scenarios, and this is intended to | |
# be a high level test which executes all code. I don't think mocking | |
# would be a very clean solution anyway, but if you want to try it | |
# and prove me wrong feel free. | |
# |
require 'spec/expectations' | |
require 'rack/test' | |
require 'webrat' | |
Webrat.configure do |config| | |
config.mode = :rack | |
end | |
class MyAppTest | |
include Rack::Test::Methods |
# ec2 ami-1515f67c | |
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb | |
sudo gem sources -a http://gems.opscode.com | |
sudo gem sources -a http://gemcutter.org # for nanite | |
sudo gem install cucumber merb-core nanite jeweler uuidtools json --no-ri --no-rdoc | |
mkdir ~/src | |
cd ~/src | |
git clone git://github.com/opscode/chef.git |
This is an example from the blog post: http://www.ngauthier.com/2011/09/using-exceptions-to-manage-control-flow.html.
Please fork it and show me what you would do!
This is a contest, open to programming languages from all nations, to write modular and extensible code to solve the following problem: Implement a service that can run queries on a database.
Sounds simple right? Wrong! A programmer without control over the source-code of that service must be able to later add enhancements such as statistics collecting, timeouts, memoization, and so forth. There are a few more requirements:
These are the Kickstarter Engineering and Data role definitions for both teams.