Archive for the 'Uncategorized' Category

Uncategorized

Tape to CD

I have to transfer a tape to CD — actually, to MP3 then to CD. Anyone have good ideas for how best to do this?

We have been playing Salman Rushdie’s Haroun and the Sea of Stories for Owen when he goes to bed at night. From the day he was born until about when he turned three, we played a National Geographic lullabies CD for him, both for his afternoon nap and at his bedtime (yes, Garrick, that’s why I thought you might like it). He started to resist the CD at naptime, though, (“No! I’m not tired!”) so we switched to Haroun. It’s a wonderful story. We used to keep several extra copies on hand just to give away. The audio version is actually read by Salman Rushdie, and Owen loves it. But it doesn’t seem to be available on CD, which I would prefer because then we could avoid the loud “clunk” of the tape stopping that wakes the boy up when he’s almost asleep. Plus, eventually it’s just going to wear out and I’d like an archival copy.

Uncategorized

Blogroll Updates and Ruby

If you visit this site in a browser instead of reading the RSS feed, as very few of you do, you’ve probably noticed the out-of-hand blogroll over there in the sidebar. I build that using a Perl script that periodically grabs my Bloglines OPML file and converts it to a static HTML file that gets included when this page is generated. For a long time, I was doing some really fragile XML parsing in the conversion. When I started using subcategories and the OPML changed, the parsing broke and the blogroll was incomplete. I knew it was coming, but rats!

I’d intended to use XPath for a long time, but never quite got around to setting it up. It’s not as if XML::XPath is a difficult module to use — Matt Sergeant knows his stuff and has done wonders for using XML in Perl — but somehow other things took priority over figuring out how to go about this.

Then I started learning Ruby. The XML library that ships as part of the Ruby Standard Library looked easy to use, so my very first attempt at writing something in Ruby tackled the problem I’d been avoiding:

require 'rexml/document'
require 'rexml/text'
require 'uri'
include REXML

xml = Document.new(File.open("blogroll.opml"))
links = {}
xml.elements.each("//outline") do |o|
 htmlUrl = o.attributes['htmlUrl']
 unless (htmlUrl.nil? || htmlUrl.empty? )
  links[ o.attributes['title'] ] = htmlUrl
 end
end

links.sort.each do |title,url|
 puts "<li>
  <a href=\"#{ Text.normalize( URI.escape(url) ) }\">
  #{ Text.normalize(title) }
  </a></li>"
end

I’m sure it could be improved in any number of ways, but it worked! And writing it just felt natural. Unfortunately, my web host has an older version of Ruby without REXML. I could probably route around that, but now that I’d written the code I knew the way forward with Perl. A few minutes later, I’d updated the script and was in business.

This is why I like the idea of learning at least one new language a year: I’m exposed to new ways of thinking about a problem, or am inspired to work on something I might otherwise avoid.

But something else is happening, too. I use several languages, but have long felt most at home in Perl. That’s beginning to change. Writing Ruby code feels right, it fits how I want to write code. Maybe some of that’s just the heady rush of a love affair. Certainly some of it is an extension of a approach to programming that I first discovered in Perl and that makes both Ruby and JavaScript fun to work with. (More on that later.) It’s not important, really: I’m having fun. That’s enough.

Uncategorized

Stack Level Too Deep

I mentioned a while back that I couldn’t get Rails installed on Jaguar. Actually, RubyGems was the problem. Something I’d read led me to believe it was a core ruby problem, but after a bit of thinking that just didn’t seem right. So I kept trying different things, and still kept getting a message “stack level too deep”.

At this point two things became clear:

  1. I’ve been slacking off on my Unix skills, because this should be more obvious; and
  2. late-night hacking isn’t doing much for my Google skills, either.

Finally I found an answer. I added ulimit -s 8192 to my .zshenv (yes, I’m a Z shell user), which increases the stack size. After that, everything worked like a charm. Editing the same line to /etc/rc.common should also work, but I played it safe by affecting only my account and am happy so far.

I’m especially happy because now I can dive into Rails with gusto. Until I got it working at home, my Rails exploration was limited to staying an hour late at work once a week.

Uncategorized

iBook’s back.

The iBook’s back. We dropped it off for repair on Tuesday, and it was back on Thursday in fine condition. This might not seem impressive until I tell you that they shipped it from St. Paul to Tennessee. They overnighted the thing to Tennesee and back, at no charge to us. Mighty fine.

At least I thought it was mighty fine until I got to thinking about how strange it is that the laptop had to be shipped out of state — at no small expense — just to crack it open, replace a card, and put it back together. Seems a waste. Apple has three retail stores in the Twin Cities, after all, and we have FirstTech… surely there are Apple certified techs in town.

But hey, the iBook’s back, the screen works, and we barely noticed its absence. And as a bonus, the wireless works better. It had been flaky. Yay!

Uncategorized

Lots of spam

Wow, in the last 12 hours a whole lot of spam has made it into my GMail inbox. That’s unusual. I think I’ve seen more in the last day than I have all month.

Uncategorized

Advent Calendars

Just a few days ago I was bemoaning the absence of a Perl Advent Calendar this year. I didn’t moan too loud, though, because I know it’s a lot of work and frankly I don’t have the time to do it myself, either.

A short while later, Drew McLellan launched 24 ways to impress your friends with web development tips and tricks. Nice.

I started to wonder if there were a Ruby Advent calendar. As it turned out, no. But then Joey deVilla started posting one (archived in the Ruby section over there on the Farm).

Today I read that there is an alternative Perl Advent calendar, put together by a kind soul with hopefully adequate time.

I never celebrated or observed Advent growing up, but I sure do now!

Update: Now there’s a Catalyst Advent Calendar, too. I do miss mod_perl.

Update: And a Symfony Advent calendar. Which reminds me that I need to look at Symfony.

Uncategorized

Washington Post’s Congress votes database

Adrian Holotavy just announced the Washington Post’s U.S. Congress Votes database, which lets you browse every vote back to 1991. Marvellous. There are RSS feeds, of course, so now it will be trivial to keep track of my representatives/senators. Subscribed.

I can’t wait for the mashups.

Update: Garrick Van Buren wasted no time putting together MNRep: How Minnesota’s Congressional Representatives Vote.

Uncategorized

Presentation Tip

Learn from my mistakes. When typing CSS in public presentations, use color hex values rather than color names. Otherwise when you try to type

background-color: white;

you’ll actually type

background-color: shite;

Guaranteed.

Of course, if you’re presenting to an audience that would appreciate it, it shouldn’t be that hard to put together a Greasemonkey script to support that background color.

Uncategorized

Link dump

Catching up with what’s caught my eye in recent weeks.

Jason Fried gave a talk earlier this year about lessons learned building Basecamp, their development process at 37 Signals, and Getting Real. I’d long meant to listen to the presentation but didn’t get around to it until a couple weeks ago. Then I listened to it again and again, a half-dozen times in two days. Wow. Inspiring. Energizing. He captures a process that makes software development exciting. It’s a big part of what interests me in Ruby on Rails.

Editsite.net, a hosted content management system. Astounding. The bar for browser-based CMS has been seriously raised. After spending a few minutes with Editsite, my first thought was that not to have CMS at this point is pathetic — at least if you want one. Especially if you’ve spent, say, five years thinking about it. Not that I know anyone who’s done that. :)

Remember The Milk. I’m a list maker. I’ve tried lots of ways to organize what I do. I need something a bit more involved than Ta-da List, less project-focused than Basecamp, more easily accessible than a pad of paper on my desk (not helpful when I’m at home), a bit less neurotic than Getting Things Done. ;-) Right now I’m using Remember The Milk. Two words: keyboard shortcuts. Read much of Kathy Sierra et al? Using RTM makes me feel like I kick ass. I haven’t played much with its RSS feeds, email or IM integration, but man am I gonna.

A Moleskine notebook is a thing of beauty. Sublime.

What is Web 2.0? Some are perturbed by the label “Web 2.0”. I am indifferent, but you should at the very least read this essay by Tim O’Reilly, one of the most important software essays of the year.

Speaking of essays, Bill Moyers’ “9/11 And The Sport of God” is marvellous, as is Arthur Schlesinger, Jr.’s “Forgetting Reinhold Neibuhr”. The New York Times have done something to break or impede the direct link to Schlesinger’s essay, but you should be able to find it on the book review page for September 18, 2005.

An interview with Anders Hejlsberg about C#, part 1 and part 2. There’s some very interesting activity on the C# front, notably LINQ, which embeds a query language right into the .NET framework. See the whitepaper for more detail. Combine this with Monad (MSH), Microsoft’s innovative command shell that lets you pipeline objects from .NET-aware apps, and you’ve got something very, very cool indeed. Seeing lambda expressions come to C# … nifty.

BuildSecurityIn, a new portal from the US Department of Homeland Security designed to provide developers and architects information and guidance about building secure software. Its Software Engineering Institute roots are clear in the academic nature of the articles. Usually heady and abstract, sometimes disappointing, sometimes useful. There are holes, but there’s good stuff there. You might want to start with the process agnostic article view” diagram.

The folks over at Particletree have now released two issues of their beautifully produced web development magazine Treehouse. Always worthwhile.

Uncategorized

Another scene from my life with Owen

A few weeks ago during dinner, Kiara poured ketchup on her plate and set the bottle back on the table. “No,” Owen objected, “that’s the wrong way!” He pointedly turned the bottle around so it was facing him and peered intently at it. “K—K—Ketchup! K is for ketchup!” Almost three years old and the boy occupies odd moments reading ketchup bottles.

Heh. Like father, like son.

« Prev - Next »