Thursday, May 22. 2008Git is Fun
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 like my SVN GUI tools, but it turns out that git works pretty well on Windows under Cygwin, if you can live with the command line. It's certainly sufficient for cloning plugin repositories. 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 acts_as_xapian. So git is fun after all, and I'm looking forward to using it more; especially when the GUI tools show up. Tuesday, April 15. 2008Recent Paddling
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!
Monday, April 7. 2008Printer held Hostage by Ink Cartridge
I've had a Canon Pixma MX700 multifunction printer since the beginning of the year. I've been pretty happy with it. It's worked well for scanning, copying, faxing and printing. Until today. Today I needed to scan something, and was greeted with the following message when I turned it on:
U150 The following ink tank cannot be recognized.The yellow cartridge was indicated. I though that it was an odd problem, but I didn't care for the moment, because I didn't want to print, just scan. But no button on the printer would bypass this error and let me scan. I ended up calling Canon, and happily received a domestic phone rep. He had me try a couple things, but eventually decided that the yellow ink would need to be replaced. They would send me one free. I asked if there was any way to bypass the error so I could just scan, and he said there was not. If I wanted to use it today I would have to go out and buy a yellow ink cartridge. So after driving all the way across town and spending $16, I have my printer back...for now. It seems like questionable design to cripple all the functions of the printer just because one color cartridge is faulty. A better failure mode would be to only prevent color printing. Black and white printing, and the other printer functions should still be usable. Hey Canon, how about updated firmware for this? Please? Friday, April 4. 2008Hiking Stevens Creek Heritage Preserve
Last week I took the boys for a hike. I decided on Steven's Creek Heritage Preserve, about an hour's drive south of here. In the past, I've enjoyed paddling and hiking Stevens Creek and its tributary Turkey Creek, so I figured this had to be a good destination (search the blog for 'Turkey' to see related posts). The DNR website notes that the preserve contains 15 rare plant species, so I wanted to check it out.
We got there around noon in fairly warm (for March - 78°F) and breezy weather. Soon we were geared up and on the trail. The early part of the trail was disappointing; we walked through a huge dry area of fallen pines. I'm not sure if this was storm damage or an attempt to down trees killed by pine beetles. The trail here was cleared by small earth movers and was soft. It would've been a mess if it was wet. Some of the trail work made the correct path unclear but we managed to not get lost. We descended a bluff through the damaged trees and finally started seeing normal growth again. Soon we came upon a little feeder creek, and wildflowers were in bloom everywhere: purples, pinks, whites, and yellows, gently resting on a background of green. I would have loved to spend an hour photographing them all, but the boys were too busy to stop for such things. So I just enjoyed the view. We walked along the base of a bluff with large rock faces, damp with moisture. If I were a botanist or just knew more about plants, I'd guess that some of the preserve's rare species would be found here. Someday I'd like to identify them, but for the day we were content to wander through a beautiful place. Soon we were walking parallel to Stevens Creek. The trail never quite gets to the bank of the river. I was hoping there would be a good spot for lunch here, but there wasn't much to work with. The trail began climbing a hill away from the stream, so we settled for a fallen tree as our picnic table. The boys ate heartily and drank most of their juice and all of mine. Then we were ready to finish the hike up the bluff. At the top it was dry and brown we had nice views of the other bluffs through the mostly bare trees. There were less fallen trees here. We ambled over a good flat trail. I saw my first dragonfly of the year, but it didn't wait to be photographed. Then I was startled to come around a bend and see a small, treaded, hydraulic digger staring us in the face. It was silent and no one was around. I figured we must be getting close to finishing the loop trail to be finding vehicles out there.... I was wrong: someone had driven that thing a heck of a long way up and down hills to get it there. It was hot and dry up on the hill, and the kids were starting to drag. As the trail began to descend, I realized we had yet to get off of this bluff and back to the starting bluff. We came upon the feeder creek again and had to begin the climb through the downed trees. Everyone was tired but we kept at it. Finally we got up the hill and arrived back at our car. The boys had done great, and we made a well-deserved stop for ice cream on the way home. It sure beat sitting around the house. More Info. Saturday, March 15. 2008Rough Weather
A stormy day today! There were rain and thunderstorms on and off, all day, especially in the afternoon. Our neighborhood had several trees knocked down including some big pines in undeveloped lots. A tree came down in our backyard and smashed our earliest-flowering tree as it fell. But we came out pretty well compared to other folks in the upstate.
I made an ill-advised trip to pick up pizzas for a birthday party. The skies in Greenwood were spooky with some very low hanging dark clouds. Winds and hail came as I arrived at the pizza place. Finally it abated and I was able to get the food and drive home through some heavy rains. It may be just me, but it seems that South Carolina's roads typically don't drain very well. It's been years since I lived in Ohio, but I don't recall dealing with water in the roads as much when I lived there. The birthday party was late on account of the weather, and attendees got to enjoy another episode of rain and hail, but the party went well, all things considered. A big thanks to everyone who braved the storms to be here. Monday, March 10. 2008Determining Image File Types in Ruby
Today I came across a PNG file that had been uploaded from a browser with a .JPG extension and image/jpeg MIME type. It's too bad that MIME types are apparently unreliable when it comes to file uploads. I went looking for a way to determine the file type by actually reading the file. This is probably a solved problem, but I was unsuccessful Googling for the answer. I came up with the following Ruby method which decides the image file type using up to the first 10 bytes:
def image_type(file) case IO.read(file, 10) when /^GIF8/: 'gif' when /^\x89PNG/: 'png' when /^\xff\xd8\xff\xe0\x00\x10JFIF/: 'jpg' when /^\xff\xd8\xff\xe1(.*){2}Exif/: 'jpg' else 'unknown' end end This works well on a small set of test files (400+ from a browser temp files directory). Let me know if there's a case where this code doesn't work, or if there's a better solution in general. Thursday, February 14. 2008Credit or Debit???
Please tell me why the credit/debit card producers cannot put a bit on their cards to let systems automatically determine if the card is a debit or credit card? What a waste of my time and the employee's time to ask me this question over and over again.
Tuesday, December 18. 2007paddling.net Photo of the Week, part 2
If you've clicked-through from my photo on paddling.net, welcome! Click here to see a larger version.
Some other links that might interest you:
Saturday, December 15. 2007I'm in Rails
I've made a code contribution to Ruby on Rails. It was minor, but I'm glad I could help. See ticket 10435 and changeset 8386.
Supposed to get some rain today...keeping my fingers crossed. Update 2007-12-17: Looks like my patch made it into Rails 2.0.2. And we did get that rain, but more would be good. Update 2008-03-17: I managed to get another small patch committed. Go open source! Monday, December 10. 2007Heat Wave"It was summer in December, blowing heat waves in my mind..."I think that line was meant to give you a feel for how unusual the southern hemisphere seasons must feel to those of us up "on top." But whether you've been below the equator or not, it hasn't been hard to get a feel for austral summer in South Carolina lately. It reminds me of being in Sydney in December years ago. Yesterday the temperatures here hit the mid 70s. I've seen that in December before in the years I've lived in SC. But I don't recall a December forecast like the one I saw this morning. Highs of 76°F for the next three days, then 72 and maybe some rain (please!) on Thursday, and then the cold rolls in on Friday, only a high of 67. Having grown up north of here, I guess I have a mindset that it's supposed to be cold for the holidays. And usually it is somewhat cold in upstate SC for December. But it's hot out and we should be kayaking instead of Christmas shopping!
(Page 1 of 17, totaling 165 entries)
» next page
|
CategoriesQuicksearchSyndicate This Blog |