Alcoholism - not just for homo sapiens

Posted by admin, Thu Feb 02 07:01:12 UTC 2006

Birds Die From Flying ‘Drunk’ Into Windows – Yahoo! News

The birds — whose remains were carefully examined to ensure they were not victims of avian influenza — had livers so diseased “they looked like they were chronic alcoholics,” Sonja Wehsely, a spokeswoman for Vienna’s veterinary authority, told Austrian television Thursday.


Ok, this one caught my attention because I remember my mom’s “drunk tank” for the cedar waxwings that used to haunt the front yard of our house when we had an ornamental crab apple tree in the front yard. In winter, the birds would gorge on the rotting, fermenting apples, and then proceed to fly drunkenly into the living room window.

After she watched the neighbours’ cat lurking in the front yard, and running off with a stunned (but not dead) bird,  she got an old cardboard box (drunk tank), lined it with rags, and found a pair of rubber gloves to handle the birds.  Every time she heard a bird hit the window, she’d go out and see if it was dead (broken necks are obvious when you pick them up) or alive.  If alive, but stunned, she’d pop it into the drunk tank for a couple of hours.  Then she’d tip it out of the box when it woke up enough to fly away.

Mom is such a softy.  :-)

0 comments | Filed Under: | Tags:

Found an excellent Abstract Factory pattern example

Posted by admin, Tue Jan 31 09:16:25 UTC 2006

I was hunting for a decent example of the Abstract Factory Pattern for ruby, and eventually stumbled across this gem:

Modular Architectures with Ruby

Summary Any reasonably complex end-user application is going to require some sort of customization and enhancement for effective deployment. This article shows one way to create a modular architecture as a way of leaving the door open for advanced users or consultants who want to extend the functionality without modifying the source.

Now I just wish everyone who was writing about patterns in Ruby could do as excellent a job as Jack has done here.

0 comments | Filed Under: | Tags:

Oops. Good thing I only had one user.

Posted by admin, Fri Jan 27 11:33:05 UTC 2006

Dump or Slurp YAML Reference Data (and Fixtures) | Ruby on Rails for Newbies

Sometimes you need to save data and use it again when you deploy a server or continue a project on a different machine.I wrote a plugin for ActiveRecord that lets you do this easily.
I really liked the idea of this plugin, but it could be a little more robust.

Just make sure that the first thing you try is “User.dump_to_file”. I used the “User.to_fixture” first, then I tried the “User.load_from_file”. And I got a nice users fixture file (which wiped out my existing fixture file without asking), and then…

$ script/runner "User.load_from_file"/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/runner.rb:27: ./script/../config/../vendor/plugins/ar_fixtures/lib/ar_fixtures.rb:12:in `initialize': No such file or directory - /Users/lori/rails/test/db/users.yml (Errno::ENOENT) from ./script/../config/../vendor/plugins/ar_fixtures/lib/ar_fixtures.rb:12:in `load_from_file' from (eval):1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `eval' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/runner.rb:27 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in `require' from script/runner:3 Lo and behold, it wiped out my USERS table. Oops.

0 comments | Filed Under: | Tags:

There are no new developers

Posted by admin, Fri Jan 27 09:45:26 UTC 2006

This article is entertaining… and frightening in it’s own way.

Hacknot – The A to Z of Programmer Predilictions

Sometimes I fancy that I have met them all. There will be no new developers for me to work with in future – only the reanimated ghosts of projects past. The same quirks and foibles that I’ve endured in the past will haunt me the rest of my days.

I recognized all too many of these characters. You will, too. It is sad, however, that there was only one female in the entire bunch. Really. I know that there are a lot more male programmers, but < 4% female? Come on. Get real.

0 comments | Filed Under: | Tags:

In-Place Editor with RJS Templates

Posted by admin, Thu Jan 19 10:31:03 UTC 2006

Excellent. I love it when someone solves my problems before I’ve had to waste a bunch of time figuring it out for myself ;-)

I read about this via the Rails mailing list, which has a stunning number of daily posts, but is proving to be a gold-mine of information.

0 comments | Filed Under: | Tags:

XCode 2.2 and Ruby headers

Posted by admin, Mon Jan 16 10:43:45 UTC 2006

Argh!  So this is why I could not get termios installed today.  That’s really annoying.  I just installed XCode 2.2 last Friday.  I wonder if some of the DarwinPorts problems I had today came from this, too…

Gem wouldn’t update some Ruby extensions with XCode 2.2 & 10.4.3 | jpb’s blog

Google to rescue though, it turns out that a bunch of header files that used to be searched for in /usr/lib/ruby/1.8/universal-darwin8.0 are now expected to be in /usr/lib/ruby/1.8/powerpc-darwin8.0, and of course, aren’t, so gem can’t build the extension any more.

0 comments | Filed Under: | Tags:

Using the Switchtower "put" helper

Posted by admin, Mon Jan 16 08:51:20 UTC 2006

It would be really nice if the “put” helper worked as advertised.  Unfortunately, when I used it today, I ran into an annoying problem.  The destination file already existed, and it’s size was larger than the source file.  So what I got was a munged file that started with the source file contents, and ended with leftover crap from the original destination file.  This was definitely not what I intended. 

It is an easy enough problem to work around.  One uses the “delete” helper on the original destination file, first. 

SwitchTower: Automating Application Deployment |

The put helper let’s you transfer data from the local host to a file on the remote host. In this case, though, the file is transferred to all associated servers via a single call to put. If Net::SFTP is available, it will be used to transfer the files, otherwise a less-robust method is used (pipe to cat).

1 comment | Filed Under: | Tags:

Flip4Mac to the rescue

Posted by admin, Fri Jan 13 18:08:25 UTC 2006

In case anyone missed it, Microsoft won’t be supporting the Windows Media Player for Mac any more.

Music stops for Mac Windows Media Player | CNET News.com

Microsoft has officially halted development of its Windows Media Player for the Mac and plans no future Apple Computer versions of its music-playing software, CNET News.com has learned.
Not to worry.  For the purposes of playback, you can download the free version of Flip4Mac, which sounds like it works better, anyway…

Products – Flip4Mac WMV
With the Windows Media® Components for QuickTime by Flip4Mac, you can play Windows Media files (.wma and .wmv) in QuickTime Player and view Windows Media content on the Internet using a web browser.

0 comments | Filed Under: | Tags:

Performancing rocks!

Posted by admin, Fri Jan 13 09:54:48 UTC 2006

On the off hand that there is anyone out there who blogs, and uses Firefox 1.5, and HASN’T yet installed Performancing… here is one more plug.  LOVE IT!

Performancing for Firefox | Performancing.com

Performancing for Firefox is a full featured blog editor that sits right within Firefox. Just hit F8 or click the little pencil icon at the bottom right to bring up the blog editor and easily post to your Wordpress, MovableType or Blogger blogs.

0 comments | Filed Under: | Tags: