Page 4 of 36
Here’s a gotcha that I came across today: don’t define a constant as something in one Rails rake task file, and then define the same constant as something different in another file, because the last constant will supercede them all:
DATA = ‘Hi there!’
desc “Test A”
task :testa do
DATA = 'Hallo!’
desc “Test B”
task :testb do
$ rake testa
$ rake testb
I guess this happens because Rake is loading all of the task files before running the requested task. There’s probably a way to namespace the constant, but I need to do more research on that. In the meantime I’ll use different constant names!
A couple weeks ago I went north to Tennesee for the 2008 BugGuide Swarm. Two and a half days of bug photography in the Smoky Mountains. I didn’t get much sleep as we stayed up late taking pictures of moths at the lights and then up early to head out for day trips into the national park. The bug photos and IDs are still coming in, but we’ve turned up lots of interesting bugs so far. It was a blast.
Then while cutting my grass this week, I spotted a striking pattern slowly gliding across the rocks that border our shrubbery. My foot on the riding mower was maybe a foot away from those rocks when I saw it. I quickly recognized that pattern as that of a copperhead. I was freaked out about it being so close to the house where my boys play. Fortunately while I was debating what to do about it, I saw the snake slither its way from the house and into the woods out back. It was only about 18" long, but still spooky with that bold coloration. Note to self: keep the grass trimmed and the yard more tidy in the summer!Katie Reider, 1978 - 2008
Katie is part of my family, and it hurts so much that her fight had to end this way.
Keep her singing in your heart.
I was initially disappointed when it was announced that Ruby on Rails was moving its version control system from Subversion to Git. There’s enough to keep up with in Rails that I didn’t relish having to keep up with this as well. It wasn’t so much that Rails was moving, but related code began to move too, so we’re currently in this limbo where many plugins have both git and soon-to-be-deprecated SVN repositories, and it’s just another detail to keep track of. Hopefully there will be tools to sort all this out soon.
I could take or leave git by itself, but I love GitHub. They make it so easy to fork an existing project, make your own changes to it, and share it back with the world. Your changes can easily be pulled back into the original projects, too. I’ve been able to make a couple of small contributions to shoulda and actsasxapian.
So git is fun after all, and I’m looking forward to using it more; especially when the GUI tools show up.
I’ve been getting a little more kayaking in lately, mostly to new places. In February I paddled the South Fork Edisto River. In March I went on my first whitewater trip to the Lower Green in North Carolina. My 14.5’ boat managed the Class II rapids and I stayed dry, but plenty of that was luck. Last week I did a jaunt along the Lake Greenwood shoreline and found Black Crowned Night Herons living in an inlet near my neighborhood. This past Saturday I paddled the Enoree River. It started with an hour of steady rain, but ended with quite pleasant weather. It’s good to get out on the water!