IM AND CHRIS'S AMAZING LRUG TALK.
-OR-
THE RIVER WILD: NAVIGATING YOURSELF PAST THE WATERFALL
Idea that legacy code isn't just 'old' or written by someone else. you can be writing legacy code now!
| NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; | |
| [outputFormatter setDateFormat:@"EEEE MMMM d"]; | |
| NSString *newDateString = [outputFormatter stringFromDate:myDate]; | |
| [outputFormatter release]; |
| # Delete something | |
| # | |
| # Takes the following options: | |
| # :text The link text (optional) | |
| # :message the confirmation message (optional) | |
| # :object The object to test for deletable or to use as the path | |
| # :path the path for the link | |
| # (A path or object must be passed) | |
| def delete_link(options={}) | |
| object = options[:object] |
| require 'spec/runner/formatter/progress_bar_formatter' | |
| # Put this in spec/support and run with: | |
| # spec spec --require spec/support/no_shoulds_punk_formatter.rb --format NoShouldsPunkFormatter | |
| class NoShouldsPunkFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
| def initialize(options, output) | |
| super | |
| @examples_with_should = [] |
| @javascript | |
| Scenario: Create a basic job # features/admin_users/create_jobs.feature:7 | |
| Given the date is "22 July 2010" # features/step_definitions/time_steps.rb:1 | |
| And an account "HPK account" exists # features/step_definitions/pickle_steps.rb:4 | |
| And a company "HPK" exists with account: account "HPK account", name: "Harmonypark" # features/step_definitions/pickle_steps.rb:4 | |
| And a client_company "BBH" exists with name: "BBH", account: account "HPK account", company: company "HPK" # features/step_definitions/pickle_steps.rb:4 | |
| And the client_company "BBH" is one of company "HPK"'s client_companies |
IM AND CHRIS'S AMAZING LRUG TALK.
-OR-
THE RIVER WILD: NAVIGATING YOURSELF PAST THE WATERFALL
Idea that legacy code isn't just 'old' or written by someone else. you can be writing legacy code now!
| Business value and MMF | |
| ====================== | |
| You should discuss the “In order to” part of the feature and pop the why | |
| stack max 5 times (ask why recursively) until you end up with one of the | |
| following business values: | |
| * Protect revenue | |
| * Increase revenue | |
| * Manage cost | |
| #!/usr/bin/env ruby | |
| require 'webrick' | |
| include WEBrick | |
| require 'erb' | |
| s = HTTPServer.new( :Port => 3000,:DocumentRoot => Dir::pwd + '/' + (ARGV[0] || '.')) | |
| class ErbServlet < HTTPServlet::AbstractServlet | |
| def do_GET(req, response) | |
| File.open(ARGV[0],'r') do |f| |
| require 'rubygems' | |
| require 'sinatra' | |
| set :public, "/Users/chris/work/cadburysvs/v2" | |
| set :bundle_path, "/Users/chris/work/cadburysvs/v2/howtoplay/bundle/" | |
| # stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
| # and made a lot more robust by me | |
| # this implementation uses erb by default. if you want to use any other template mechanism | |
| # then replace `erb` on line 13 and line 17 with `haml` or whatever |
| Coming to you LIVE from Gist! |
| When /^I reload the page$/ do | |
| page.evaluate_script("window.location.reload()"); | |
| end |