• So, that car I was hypermiling with started blowing oil smoke out its tailpipe (no comments from the peanut gallery, please). I just couldn't stand it: I'm trying to help reduce pollution by driving carefully, and my car is leaving a giant blue cloud behind.

    I took it to the shop. They need a part that'll take most of a week to get.

    The very next day, my wife crashed the minivan into a truck. The minivan had some body damage, but no structural damage. Some wires were cut, and it won't run. The shop says $3500 and 3 weeks.

    That leaves us with exactly 0 working cars.

    The rental is nice. $39/day. We're going to borrow a car from her parents.


  • I've been working on updating the Serendipity Karma plugin to include CSS graphical rating bars. (I just love the thought patterns behind "Serendipity Karma".)

    It started as a simple code cleanup, to make things more understandable to novice programmers and to comply with Serendipity coding conventions. It wound up nearly a complete rewrite.

    I committed it to the Serendipity trunk moments ago; that means it should make it into the next Serendipity 1.3 nightly build. If you don't want to upgrade to the nightly builds, or you just want the plugin on its own, read on...

    Update 2008-02-14: Misspelled class name fixed. New zip available.
    Update 2008-02-15: Ratings now correctly translated to words. New zip available.

    Continue reading "Graphical Rating Bars for Serendipity Karma Plugin"


  • I teach Math Superstars at my kids' elementary school. It's a supplemental math program (as if you couldn't guess). This year I'm teaching both kids' classes: one Kindergarten and one 4th grade.

    I wear a wizard's hat from an old Halloween costume, along with my old graduation robe (whaddaya know, it is good for something) and call myself a mathemagician. I think 4th grade is about the limit for this kind of thing, but at least I'm recognizable. In fact, they took my picture for the yearbook today.

    But sometimes you've got to wonder if I'm smart enough to do this.

    Continue reading "And I'm Teaching It"

  • I recently received a corporate-news email boasting that SAIC has joined The Climate Registry.

    Of course, my first thought was my favorite environmental topic: at-work charging for electric vehicles. So I wrote them the following letter. We'll see what comes of it.

    Sir or Madam,

    I was pleased to see that SAIC has joined The Climate Registry and started an inventory of its environmental impact, including carbon emissions. One commonly overlooked corporate environmental impact is employee automobiles. SAIC offers some work-at-home programs that can offset these costs, but most of our Orlando work requires on-site presence, either due to a collaboration or security requirement. However, there is another, less expensive means we could use to reduce these emissions: outdoor automotive charging.

    As an electric vehicle owner, I am aware of the advantages and disadvantages of battery-powered cars. Range and battery life issues make fully electric cars a poor choice for some employees. But the availability of charging at work greatly alleviates these issues for the vast majority of commuters.

    An outdoor charging station need be no more complicated than a simple electrical outlet with GFCI protection. An electric vehicle driven on an average commute will require less than 7kwh of charging -- less than $1 at today's prices! Providing charging -- for free or for a fee with a tag or sticker -- would be an inexpensive employee retention incentive.

    While only a small fraction of employees would be interested today, the popular hybrid cars of today are evolving to the plug-in hybrid (and fully electric) cars of tomorrow. When these cars can use electricity from a standard outlet to drive 30 miles, with the security of a gasoline-powered reserve, they will become even more popular. At that time, employer-provided charging will be considered a perk; eventually it will become expected.

    I urge SAIC to install at least one outdoor charging outlet as an "Electric Vehicle Parking Space" at each of its facilities. As an electric vehicle owner, I could demonstrate the utility of such an installation at the SAIC Pointe Orlando location.

    Thank you,


  • I'm working on some PHP right now, and I want it as fast as possible. Naturally, I have to output some interesting stuff; concatenated strings, with integer or floating-point values in them.

    The question becomes: is it faster to print values that must be formatted, such as the string "\n", or integers or floating-point numbers, by:

    1. Including them in one long double-quoted string
    2. Concatenating them between multiple single-quoted strings
    3. Using the heredoc format
    4. Using the sprintf() function

    I made a quick PHP script to do the benchmark for me. The results were interesting.

    Update 2008-05-02: source code!

    Continue reading "PHP String Formatting Performance"