My 25 things

I’m not happy about Facebook’s greedy terms of service, so rather than hand them content that they’re going to keep and monetize forever, I’m posting my “25 things you didn’t know about me” here…

  1. I ignore chain-letter-like things, which is why it’s taken me so long to give in and make this list (and why I haven’t tagged 25 more of my friends – you can thank me later).
  2. I started kindergarten when I was four.
  3. My partner Gina got me on Craigslist.
  4. Hearing “The Star Spangled Banner” usually makes me tear up, for about four different reasons.
  5. I’ve visited 38 states, mostly in one summer journey in my own small airplane.
  6. The least authentic of those visits was to Montana, where I did a touch-and-go at the southeasternmost airport, and only briefly put one wheel down.
  7. The most authentic of those visits was in Albany, Missouri, where I was introduced to the town doctor by his cousin who’d picked me up on the road into town (and I wasn’t even hitchhiking). The doctor bought me lunch (at one of the two open restaurants in town), showed me his restored car collection, took me on rounds at the hospital and introduced me to his patients, let me buy him & his wife dinner (at the other), put me up for the night, and gave me the keys to one of the cars to drive myself back to the airport in the morning.
  8. I can open champagne with a sword, one of many important things I learned from my father.
  9. The only times I cut class in junior high school was to watch the film & TV companies that often shot near where we lived (in a trailer park in Malibu). I was there when Fonzie jumped the shark.
  10. My first job was in the kitchen of the Sandcastle restaurant in Malibu, the blue and white building outside Jim Rockford’s trailer’s front door.
  11. I got into computers by getting lost my first time in Santa Monica, near a closed pizza place, a sketchy-looking bar, and the first computer store in the world. My first job in computers was entering BASIC programs from a book there – I never finished the book, and was never paid. (Hi Greg!)
  12. When I was into citizen’s band radio in the mid-70′s, my handle was “Condor”.
  13. I see a lot of movies: around 200 last year, around 80 so far this year (mostly at the Portland International Film Festival, underway now). The only genre I don’t bother with is horror.
  14. I value my oldest friends exceedingly highly; though I’m rarely in touch with them, I think of them often and miss them deeply.
  15. I once drove from Santa Monica to Malibu with my late best friend Lad, with my seat fully reclined and me unable to see, in traffic. I worked the pedals, he steered. This was about the limit of our high-school hijinks.
  16. My favorite movie line is when Harold gives Maude a coin stamped with “Harold loves Maude”, and she throws it off the pier and says “So I’ll always know where it is.”
  17. Everything I know about bowling, I learned from watching Dad: Get a heavy ball. Throw it really hard.
  18. My favorite film is “The Shawshank Redemption.”
  19. Baseball is pretty much the only sport I like watching, yet I don’t like extra innings; nine is enough. (Worst baseball decision ever: at a San Jose Giants game, I turned down a job offer from Mark’s friend Pierre at then-nascent EBay. I think the Giants lost that day, too.)
  20. I play guitar, but not very well. Other instruments I’ve attempted include drums, cello, piano, flute, banjo, ukulele, clarinet, and French horn.
  21. I never snuck into extra movies at the multiplex until my Dad got me to, when I was nearly 30. Now we rarely do, because we need to get home to the dog.
  22. Nowadays, I write software mostly in Ruby. Other languages I’ve been paid to use include BASIC, Fortran, Pascal, C, C++, Bourne shell, Postscript, c-shell, Perl, Bash shell, Java, Javascript, and Python, roughly in that order. Oh, also: 6502, 6800, 8080/Z80, 68000, and ARM assembly languages.
  23. I have a high-school diploma *and* a California high school equivalence certificate.
  24. Our dog is named after the little girl in “To Kill a Mockingbird”, of course.
  25. I own a straitjacket. Surprised?
8:37 am — GeneralComments (4)

My “Day On”

Today on Martin Luther King Day, I participated in Day On, yet another great Portland tech community event: local geeks gathered at CubeSpace to volunteer to help non-profits with technical issues. A couple of dozen folks showed up to offer help, and though only a few folks came by to ask for assistence or asked using the Day On website, a great time was had by all, and we hope the event will continue and grow.

I was one of several folks who got to help Dean Suhr of the MLD Foundation, a resource for families affected by Metachromatic Leukodystrophy; one page of the Foundation’s website displays a Google map showing families affected by the disease, and the map display wasn’t working right. I was able to find a workaround for a problem in a map-display library, and I’m hoping to work with the library’s developer to help fix the underlying problem.

After I showed Dean my fix, I got an unexpected bonus: Dean mentioned that he was considering using Google Maps’ “clustering” feature, which allows a single symbol to represent many individual map tacks when zoomed out to show a large map area — it’s a feature that helps reduce map clutter when a map holds a lot of symbols.

Dean had thus far elected not to use this feature — instead, when zoomed out, he’d used a smaller version of the butterfly symbol that represented each family, to help each individual family show up better on the big map. As he told me this, I thought about the effect of the disease on Dean and his family, multiplied by each of these families, and thought that Dean had already chosen the perfect representation (and said so).

I was lucky to be able to volunteer today, lucky to meet Dean and help a little with the Foundation’s site, and especially lucky to make that connection between the work today and groups like Dean’s who help so many people. Tomorrow I’m getting up early to head back to CubeSpace to watch the Inauguration with more of my Portland tech community friends, and I feel even more strongly that I’m lucky to be part of such a terrific community.

11:50 am — Around Here,GeekeryComments (4)

A Christmas tradition, from 1973

Christmas was a big holiday for my Dad: each year, he’d send out custom Christmas cards with obscure messages. He’d look forward to the phone calls that would result — people asking for hints, or badgering him for the new low of that year’s wordplay. He’d usually chide them (truthfully) that I’d gotten the answer in only a minute or so – I think my fondness for solving puzzles was inherited from his fondness for creating them.

It’s been 35 years since the first of these cards – I’m starting a new tradition, posting them here for the holidays. Here’s the first one.

10:33 am — GeneralComments (4)

Fixing a little VPN annoyance

I’m writing this in a coffee shop, and when I’m using a public wireless network, I like to secure my network traffic using a virtual private network (VPN) that I set up on my server at home. Without this, anyone else close by could spy on what I’m doing (including seeing passwords I’m sending to badly-secured web sites). Unfortunately, the connection appears to go bad after a short while, and it took me weeks to spend the minute it took to find a fix.
(more…)

11:54 am — Geekery,ToysComments (1)

The Android fonts on my desktop are beautiful

Droid family font sampleI’ve been tinkering with developing software for the Android phone platform (and loving my G1 phone that runs it)… the Android folks at Google hired Ascender to create a new font family for the phone, the only family that the phone comes with. Here’s a sample from Ascender’s press release.

It occurred to me that because the fonts were designed for legibility at small point sizes, Droid Mono might be a good replacement for the terminal font I do much of my programming in. It turns out that the whole family makes excellent replacements for the default fonts on my Ubuntu systems: they’re so legible that I’ve been able to reduce the default sizes as well, effectively giving me more screen real estate. Several times in the last couple of days, it’s occurred to me how much more beautiful my working environment is, now that I’m looking at a well-designed font.

You can get the fonts from within the Android SDK, but another helpful blogger has put them up as a separate download. (If you’re installing them on Linux like I did, put them in a folder in /usr/share/fonts, then do “sudo fc-cache -f -v” to get the system to notice them.)

11:15 am — GeekeryComments (2)

As the polls close…

“I find I’m so excited, I can barely sit still or hold a thought in my head. I think it is the excitement only a free man can feel, a free man at the start of a long journey whose conclusion is uncertain. I hope I can make it across the border. I hope to see my friend, and shake his hand. I hope the Pacific is as blue as it has been in my dreams. I hope.”

- Red, “The Shawshank Redemption”

5:50 pm — GeneralComments (1)

Android AIDL regeneration

I’m working on a couple of Android projects; one has an Android IDL file (.aidl) for a service, and for some reason, the development environment didn’t automatically generate the corresponding .java file from it. I wasn’t able to figure out what caused this, and recreating the .aidl file didn’t fool the IDE into doing it, nor was I able to find a solution to this with the usual Googling.

I did find that right-clicking the project in the hierarchy and choosing “Android Tools” -> “Fix Project Properties” fixed this. Subsequent changes to the .aidl file automatically regenerated the .java file, too, so that’s nice.

12:37 pm — GeekeryComments (0)

Clearing apt-cacher’s cache

I frequently reinstall Ubuntu from scratch, so I’ve set up apt-cacher on my fileserver to cache the packages I install – this not only reduces my impact on the mirrors, but also speeds up my installs.

Occasionally, though, I see strange problems during installs: apt-get install retrying the download of an apparently-cached package. I haven’t figured out what’s wrong, and frequently I just want to get the reinstall going again. In these situations, it seems optimal to just dump the cache and start over; I haven’t found clear documentation of how to do this, but in case it isn’t obvious, this works for me (my cache is in /var/cache/apt-cacher, and I run it as www-data):

# Stop the service
sudo /etc/init.d/apt-cacher stop
# Move the old cache out of the way, so we can delete it 
# in the background (it can take a while)
sudo mv /var/cache/apt-cacher /var/cache/apt-cacher.old
sudo rm -rf /var/cache/apt-cacher.old &
# Make the new cache hierarchy, and set its ownership properly
sudo mkdir -p /var/cache/apt-cacher/{headers,import,packages,private,temp}
sudo chown -R www-data:www-data /var/cache/apt-cacher
# Restart the service
sudo /etc/init.d/apt-cacher start

Update: I found this blog post helpful for manually removing troublesome packages from the cache.

11:25 am — GeekeryComments (0)

Rails script/performance/request needed a little help

While following another great Ryan Bates Railscast, I had a couple of problems on my Ubuntu 8.04 development machine:

  • Rails 2.1.0′s ActionController wants version 0.6.1 or later of the ruby-prof gem, but the usual gem repositories only have 0.6.0 now. I found suggestions to install Jeremy Kemper’s fork on Github, but though I’d added GitHub as a gem source, installing jeremy-ruby-prof didn’t work because that installed his version with that name, which didn’t help ActionController. What worked was:
    sudo gem uninstall jeremy-ruby-prof # be sure to uninstall old attempts!
    git clone git://github.com/jeremy/ruby-prof.git
    cd ruby-prof
    rake gem
    sudo gem install pkg/ruby-prof-0.6.1.gem
  • Then, script/performance/request ran, but generated several strange error messages instead of producing results:
    Couldnt get a file descriptor referring to the console
    Could not get a file descriptor referring to the console
    Couldnt get a file descriptor referring to the console
    Could not get a file descriptor referring to the console
    

    This turned out to be because script/performance/request wants to use ‘open’ to open its output files (a text file and an HTML document), but on Ubuntu, /usr/bin/open is a link to /usr/bin/openvt, which didn’t do what we want (and generated those error messages). I’m not sure what else uses ‘open’, but this did the right thing: it lets Firefox open the files:

    sudo ln -sf /usr/bin/firefox /usr/bin/open
10:29 am — GeekeryComments (2)

named_scope, joins, & includes

I used Rails 2.1′s named_scope to implement various ways to sort things on OsoEco. When I implemented “most discussed” on the Question model (questions have many comments), it involved joining in the comments table to count comments for each question. Initially, it looked something like:
named_scope :most_active, :joins => :comments, :group => "questions.id", order => "count(questions.id) desc"

That caused a problem, which the Pivotal Labs folks also commented on today:

When using named_scope, adding a :joins option will “mix-in” all of the attributes from that join table into your retrieved object, potentially overwriting any colliding attributes (including id … ouch!). There was consensus that this was a valuable feature, when used “properly”. Adding :select option can avoid this, or use :include.

Like they said, I fixed this with :select — the second try looked like this
named_scope :most_active, :select => "questions.*", :joins => :comments, :group => "questions.id", order => "count(questions.id) desc"

That worked (and fixed that problem), but it occurred to me that if my controller wanted to :include additional tables to add onto this scope (and that’s one of the cool things that named_scope enables), it wouldn’t work: Question.most_active.scoped(:include => :comments) raises a bad-SQL exception.

Fixing this required a bit of table aliasing, and led to this:
named_scope :most_active, :select => "questions.*", :joins => "left join comments as comments_for_count on comments_for_count.question_id = questions.id", :group => "questions.id", order => "count(questions.id) desc"

This worked, even with the :include added in a subsequent (anonymous) scope.

1:51 pm — GeekeryComments (1)
« Previous PageNext Page »