Engaging the navigator
The bad habit that I’m unlearning at the moment, is letting myself trail off mid-sentence because it’s gotten too hard to do what I’m doing and describe what I’m doing at the same time.
The computer can wait all day and won’t mind; my navigator is a human trying to participate in the thought process, not just the photon gazing.
Thanks to Graham Ashton for making me think about this.
—
(Some) Agilistas: Still Not Yet Lean Thinkers - Martin Burns: PM PoV
As someone familiar with the Agile Manifesto, but not familiar with Lean, I found Martin’s post and follow up to my comment extremely challenging, in a good way.
magic_options ruby gem
Rory McKinley and I have published a little ruby gem that implements what I call the magic options pattern. You know the drill:
class BigThing
def initialize(options = {})
@height = options[:height]
@width = options[:width]
@depth = options[:depth]
@weight = options[:weight]
end
end
What an epic yawn.
With magic_options, you can just do this:
class BigThing
include MagicOptions
def initialize(options = {})
magic_options options
end
end
# Alternatively...
class BigThing
include MagicOptions
magic_initialize
end
If you’d like to program defensively, there are additional options for specifying what the options hash may and may not include.
Sure, it won’t save the world, but it’ll make the world a better place.
The source code is available at github.com and the documentation is already live on rubydoc.info. Use the usual gem install magic_options to install.
Unobtrusive Ruby is any Ruby code that stays out of your way. It does not make you write lots of boilerplate, or stub methods, or open classes. It is decoupled. Its tests run quickly, its classes fit on one screen, its methods are tiny, and it is quickly refactorable.
Unobtrusive Ruby is a state of mind.
MagicOptions is a ruby module that provides mechanisms for splatting an options hash into an object’s instance variables.
