- Check bus arrival times, see that bus closest to my house is due... NOW.
- Sprint out door.
- Sprint down the long block, catch bus.
- Get off bus downtown, use Car2Go membership to drive Smart Car rest of way to office (just for fun).
- Get to office ready to set up ergonomically appropriate desk and monitors.
- Discover that only one monitor has arrived (no desk), without the VESA mount adapter needed to put it on my monitor stand.
- Unable to do any physical setup, go to sit on couch in lobby area.
- Realize that I left my RSA token at home, 2.8 miles away.
- Discover that wifi is not working. (RSA token wouldn't have helped anyway.)
- Pack up, go back outside to the Car2Go Smart Car I parked directly in front of the office just 20 minutes earlier. RFID reader pauses, then displays message
NO CONNECTION / Car temporarily not available for rental
# PROJECT_RUBY="ruby-1.8.7-p302" | |
PROJECT_RUBY="rbx-1.2.3-20110315" | |
# use the global gemset in order to check for and install bundler, since we | |
# don't need it to be different for different projects | |
rvm use $PROJECT_RUBY@global --create --install | |
NEED_GEM_VERSION='1.3.7' | |
echo -n "Rubygems version 1.3.7 required. Do we have the right version?... " | |
if `ruby -rubygems -e "puts (Gem::VERSION == '$NEED_GEM_VERSION') ? exit(0) : exit(1)"`; then |
rails 2.3.11 (>= 0) | |
actionmailer 2.3.11 (= 2.3.11) | |
actionpack 2.3.11 (= 2.3.11) | |
activesupport 2.3.11 (= 2.3.11) | |
rack 1.1.2 (~> 1.1.0) | |
activerecord 2.3.11 (= 2.3.11) | |
activeresource 2.3.11 (= 2.3.11) | |
rake 0.8.7 (>= 0.8.3) | |
rake 0.9.2 (>= 0.8.3) | |
rails 3.0.9 (>= 0) |
class HashProxy | |
instance_methods.each { |meth| undef_method(meth) unless meth =~ /^__/ } | |
def self.new(delegate) | |
return delegate unless delegate.kind_of?(Hash) | |
super | |
end | |
def initialize(hash) | |
@hash = hash |
If you'd prefer not to receive e-mail like this from Adobe in the future, please unsubscribe. Alternatively, you may mail your unsubscribe request to: | |
UNSUBSCRIBE | |
Adobe Systems Incorporated | |
Attn: Change of Address/Privacy | |
343 Preston Street | |
Ottawa, ON K1S 1N4 | |
Canada |
(In response to https://gist.github.com/1687527, with apologies and smoochies to @jc00ke.) | |
my-proj | |
| | |
-- app | |
| | |
-- data_mappers <--- (see note below) | |
-- models | |
-- views | |
-- controllers |
require 'new_relic/agent/method_tracer' | |
class NR | |
# Convenience method for adding NewRelic tracing around specific methods of interest. | |
# | |
# Note about performance: | |
# | |
# " CAUTION - adding probes to your code adds overhead. | |
# Each probe burns about 20 microseconds of CPU. | |
# Be careful not to probe a method that's called frequently in a loop. " |
Rubyists! In the process of doing an "extract method object" refactoring, I wound up with a service object that calls several other (inner) service objects. A simplified version is below.
Note that (a) I'm using a simple Result object to report success/failure back to the calling code, and (b) I'm passing the same Result instance around to subservices (to keep track of overall process state).
My question is this: in a multistep process, how should I handle failure in an intermediate step?
The options I can think of are:
- As in the example below (
do_phase_3 unless @result.failure?
), explicitly check for failure in a substep, and abort manually. - Raise an exception, which gets caught in the outer (class-level) .perform call, which then returns the result object as usual.
I really like the idea of testing the interface of the base Bicycle class, but I'm having that "someone on the Internet is WRONG!" feeling when I get to the section "Testing Concrete Subclass Behavior".
Specifically, you write "The RoadBikeTest should ensure that local_spares works while maintaining deliberate ignorance about the existence of the spares method. The shared BicycleInterfaceTest already proves that RoadBike responds correctly to spares, it is redundant and ultimately limiting to reference that method directly in this test."
The thing is, though, that--at least as written in the Rough Cut version of the book I'm looking at--the BicycleInterfaceTest doesn't prove that RoadBike responds correctly to spares. It only proves that it responds to spares.
So I went off to recreate the code locally to make sure that what I was seeing was correct, and sure enough, I can comment out the entire method body of Bicycle#spares, and all the interface tests pass because they're just checking #respon
Hi, [insert recruiter's first name here]-
I've gone to some lengths to save everyone some time by maintaining a FAQ page on my resume website: http://resume.livingston-gray.com/faq.html
I've even gone so far as to change my LinkedIn profile so that it directs recruiters to read the FAQs before contacting me about relocation opportunities. So, thank you, [recruiter's first name]! By carefully ignoring all of that information, you've freed me from having to feel even remotely guilty for sending you a canned response.