09 Sep 2007
•
Software Development
Defining new behavior for core Rails classes in mixins is a common pattern in Rails plugins. This allows for a separation of concerns that improves maintainability and digestability. However, it raises a bit of question about where the mixin inclusion step should take place. Should it happen in the plugin’s init.rb
or in the same file as the mixin module is defined?
I recently had cause to use a couple of Rails plugins outside of a rails project. This experience has allowed me to resolve this question, and the answer is: include the new behavior in the core classes in the same file that you define the behavior. That way if you need to use a subset of the behaviors defined in a plugin you can just require that file. The people who use your plugin in ways you don’t yet anticipate will thank you.
Oh yeah, and please don’t rely on the automatic module creation that dependency base autoloading in ActiveSupport provides. It is a lot simpler for your users if you explicitly define all the modules you need.
07 Sep 2007
•
Miscellaneous
“you mention wabi-sabi, I do nothing
a blog I read mentions it, I follow the wiki link
maybe you could use links when talking”
– my wife
01 Sep 2007
•
Personal
Today is Audrey’s second birthday. Catherine has the important stuff covered here so I will just say, happy birthday Audrey. Oh, and show you a cute picture of her opening her presents.
19 Aug 2007
•
Personal
So said Elliot on the way home yesterday evening. And he was right.
We spent the morning at Boulder Reservoir for a company picnic. The food and the band were great. And the kids had a blast playing in the water, jumping in the bouncy castle and riding the boats.1
One the way home we noticed that there was a lot of air traffic around the Boulder Airport. So on a whim, we drove over to see what was up. It turned out that the second annual Airport Day was going on. Both Audrey and Elliot love airplanes so it was a big hit. There were many aircraft to look at and planes and helicopters where landing and taking off very frequently. The kids were in heaven.
And then Catherine spotted the glider rides booth. They were running a special for Airport Day. So Elliot an I took a short glider ride. It is a beautiful thing. The mountains and Boulder are gorgeous from a couple of thousand feet. Elliot is pretty sure that gliders are the best thing since sliced bread, now. All in all, a spectacular way to miss nap time.
After all that excitement we did manage to get the kids to nap for an hour or so before we dropped them off at a friend’s house so that Catherine and I celebrated our sixth wedding anniversary. We had a really nice, relaxing diner at Iron Mountain Winery. Followed by some coffee and perusing in a book store.
Yep, I think “Today was such a good day.” pretty much sums it up.
03 Aug 2007
•
Miscellaneous
On Wednesday Catherine, Joshua (get a blog) and I saw Modest Mouse at Red Rocks. They put on a really excellent show and Red Rocks has got to be one of the coolest venues in the country. As Scott Davis said “No one should die before seeing their favorite band play Red Rocks”.1 My ears are still ringing but that is a small price to pay for seeing such an amazing show.
My only real complaint is that the sound engineering was pretty crap. It took about three songs to get the levels right for the vocalists. For each of the three acts. I have a little bit of advice, as complete amateur, for the sound engineers at Red Rock: How about you set levels for the instruments with direct inputs to only be a few dB over the pain threshold. That way you will have some headroom when the singing starts. It will still hurt peoples ears so you would still be cool with your sound engineering buddies and we would be able to hear the, undistorted, vocals.