Fri, 25 Nov 2005

10 Free Burritos From Chipotle

I eat at Chipotle probably twice a week. A couple days ago, I dropped my business card in the fishbowl next to the register. Today, I got a call from Shabby at Chipotle, telling me that I had won 10 free burritos. Unfortunately, it's 10 free burritos to be ordered for a single lunch, to feed an office of people.

I work from home. I don't think I even know 10 people who live in Northridge. Anybody want to join me for lunch next week?

business | Permanent Link

Sun, 20 Nov 2005

Using udev and autofs Under Debian with an iPod and Camera

Last week, I set up udev on my desktop machine. udev is the Linux 2.6 way of dynamically managing the /dev directory. It populates /dev only with devices that actually exist, and adds and removes entries as devices are plugged in or removed from the system. In addition, it allows the entries in /dev to be named consistently.

Consistent naming of /dev entries solves a big problem with using USB devices under Linux. Many USB devices use the usb-storage module, appearing as SCSI devices. The problem is that the name the kernel gives to the devices depends on the order in which they are plugged into the system.

For example, I might plug my iPod Shuffle into my computer, and the kernel would name it /dev/sdd. Then I plug in my camera, and the kernel would call it sde. But if I had plugged them in in the opposite order, their names would have been reversed. This makes it difficult to mount them without first checking dmesg to find out what the device has been named.

udev solves this problem by allowing me to tell it what to name a device when it is detected. udev uses information from sysfs to determine which device is plugged in. I have configured udev to name a device whose vendor attribute is "Apple" /dev/ipod and a device whose vendor is "Pentax" /dev/camera. The Debian udev packages put the udev rules in /etc/udev/rules.d. So I created /etc/udev/rules.d/50-custom.rules which contains:
BUS=="scsi", SYSFS{vendor}=="Pentax", NAME{all_partitions}="camera", GROUP="plugdev"
BUS=="scsi", SYSFS{vendor}=="Apple", NAME{all_partitions}="ipod", GROUP="plugdev"

The NAME{all_partitions} part tells udev to create device entries for all of the block device's partitions, so it will create /dev/ipod[1-15] and /dev/camera[1-15], allowing me to mount the FAT partitions on each. See Daniel Drake's guide to writing udev rules for more information on configuring udev.

Now that my iPod and camera are consistently named, I'd like to be able to access them from within gtkpod and digikam, the applications I use to manage the files on them, respectively, without having to manually mount them. While gtkpod has an option to mount the iPod, digikam does not. I have my camera set up in digikam as a generic USB mass storage device, for which you just need to configure a directory to browse.

Following the debian-administration.org tutorial, I set up autofs to automatically mount the usb devices when they are accessed, and unmount them when they're no longer being used. So after installing the autofs package, I added the following line to /etc/auto.master:
/var/autofs/removable /etc/auto.removable --timeout=2

And in /etc/auto.removable, I put:
ipod -fstype=vfat,rw,gid=46,umask=002 :/dev/ipod1
camera -fstype=vfat,rw,gid=46,umask=002 :/dev/camera1


Then I made /media/ipod a symlink to /var/autofs/removable/ipod and /media/camera a symlink to /var/autofs/removable/camera. When I access /media/camera, automount automatically mounts /dev/camera1 as /var/autofs/removable/camera if it has been created by udev. After it hasn't been accessed for two seconds, it will be unmounted (which might take a little while if there are buffers which haven't been flushed out to the drive).

Update (8/12/06): I fixed the rules to use the proper equality test, == rather than =, which newer versions of udev require. Thanks to Andrew Schulman for pointing this out.

tech | Permanent Link

PayFlow Pro PHP Extension on Debian

This is how I built a php4-pfpro package for Debian. Tested with 4.3.10-2.
# apt-get build-dep php4
# apt-get source php4
Follow this part of the instructions from the PHP Documentation

You will require the appropriate SDK for your platform, which may be downloaded from within the manager interface once you have registered. Once you have downloaded the SDK you should copy the files from the lib directory of the distribution. Copy the header file pfpro.h to /usr/local/include and the library file libpfpro.so to /usr/local/lib.

Edit debian/control. Add the following:

Package: php4-pfpro
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${php:Depends}, php4-common (= ${Source-Version})
Description: Verisign's Payflow Pro module for php4
 This package provides a module for Verisign's Payflow Pro for PHP scripts.
 .
 PHP4 is an HTML-embedded scripting language. Much of its syntax is borrowed
 from C, Java and Perl with a couple of unique PHP-specific features thrown
 in. The goal of the language is to allow web developers to write
 dynamically generated pages quickly.

Add the following line to debian/modulelist:
pfpro PayFlowPro
Add the following line to the CFLAGS in the configure-apache-stamp rule in debian/rules:
--with-pfpro=shared,/usr/local \
If you're building apache2 modules, add it to the configure-apache2-stamp rule too, but I haven't tested that. I also had problems building the caudium packages so I removed all of the caudium related stuff from debian/rules.
Here's the full patch.
# ./debian/rules binary

Update 11/06/06: I've updated the Sarge package to 4.3.10-18.
Update 05/05/07: I've updated the Sarge package to 4.3.10-20.

tech | Permanent Link

Thu, 17 Nov 2005

Make Pretty Charts with PHP/SWF Charts

PHP/SWF Charts is a PHP script and flash file that can build great looking charts. The flash part does all the work. The PHP script just generates the HTML tags to embed the flash file. It can generate a number of different types of charts including line, column, and pie charts.

We're using it at Postica to generate charts for our customers showing statistics on the number of spam and malware blocked, for example.

tech | Permanent Link

What The Hell Is Wrong With Google Analytics?

Google Analytics, their new hosted web stats application based on Urchin, seems to be completely broken. Every time I log in, I get the following message.

Analytics has been successfully installed and data is being gathered now. Your first reports will be ready within twelve hours.

The problem is that I added the Google javascript to my site three days ago. I want my pretty graphs, damn it.

tech | Permanent Link

Sun, 13 Nov 2005

Coffee Bean Inconsistency

Hey Sunny, I was hanging out at one of your stores today, the one at Devonshire and Reseda in Northridge. You really need to get your franchisees to get their shops in order. While overall, you guys make good coffee, much too often, I get a terrible one. It's quite a crapshoot to get a coffee at one of your stores. There's simply no consistency in the coffees made at The Coffee Bean. While on a good day, your lattes are quite delicious, I'd estimate that about 10% of the time, I get a terrible coffee. Part of problem seems to be under-trained staff. Different baristas in the same store often make coffees differently. The first iced latte that I sent back today was clearly disproportioned, lacking the nice milky tone; it looked like coffee-water. Nonetheless, I drank some of the bitter swill and added some more milk. Alas, it still tasted quite bad. I had the latte remade, and while the second looked right, it still tasted poorly. Hoping that perhaps someone spilled some dish water into the ice maker, I had it replaced with a hot latte. Unfortunately, the hot one was not much better. I did burn my tongue a bit on it which helped keep my taste buds from revolting. I suggest that you visit the shops and make sure that they're cleaning out the espresso machines regularly. Or perhaps they are using low-grade coffee beans in order to widen the narrow profit margins on $3 cups of coffee. Please let me know what your research turns up and when it's safe to return to Coffee Bean stores. Thanks, Christian

business | Permanent Link

Reunion Recap

My high school reunion last night was a bit disappointing. There were a handful of old classmates that I remember, but most of good friends from yesteryear didn't show up.

There were a number of law enforcement officers and teachers in attendance. There were also a surprising number of people still living in Rosamond.

I did get contact info for a bunch of people, so I'll try to get in touch with some of the people who didn't show up. That means you: Lee, Ian, Malia, Elsie, Josh, Chris. (I hope nobody else is insulted by my poor memory.)

misc | Permanent Link

Sun, 30 Oct 2005

Rosamond High School Class of 1994 Reunion

My 10-year high school reunion is in two weeks. Yes, 1994 was actually 11 years ago, but I guess it's close enough. I haven't kept in touch with many of my friends from high school, so I'm hoping there's a good turnout.

If you happen to have gone to school with me, please send me your contact info, and I hope to see you at the reunion.




I was a big supporter of the hair gel and optical glass industries in 1994.

misc | Permanent Link

Fri, 28 Oct 2005

Checking References

Company X submits a proposal to Organization Y to do some work. Company X, having been in business for quite a while, has a rather extensive list of past clients listed on its web site. Organization Y decides to contact some of the listed clients to ask about their experiences with Company X rather than asking Company X for a list of references.

Some of the organizations contacted aren't very happy to be contacted out of the blue by Organization Y and complain to Company X.

Did Organization Y act inappropriately? I'm not sure, but I tend to think not. Assuming Organization Y can find people in the past-client organizations who were involved in the work done by Company X, doing so seems like prudent research before completing a deal for thousands of dollars.

business | Permanent Link

Thu, 27 Oct 2005

Using a Verisign SSL Certificate with mod-ssl

I received a Verisign-signed SSL certificate today. When trying to install it under Apache/mod-ssl, I got the following errors:
[Thu Oct 27 12:18:26 2005] [error] mod_ssl: Init: Unable to read server certificate from file /www/.../www.example.com.crt (OpenSSL library error follows)
[Thu Oct 27 12:18:26 2005] [error] OpenSSL: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Thu Oct 27 12:18:26 2005] [error] OpenSSL: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error

I got a similar error when trying to inspect the certificate using openssl directly:
$ openssl x509 -in www.example.com.crt -noout -text
unable to load certificate
32741:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:946:
32741:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:304:Type=X509_CINF
32741:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_D2I:nested asn1 error:tasn_dec.c:566:Field=cert_info, Type=X509
32741:error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 lib:pem_oth.c:82:

Thanks to Dr. Henson on the OpenSSL mailing list, I discovered the the certificate was packed in the PKCS#7 format. So, after converting the certificate using the following command, openssl was able to read the certificate:
openssl pkcs7 -in www.example.com.crt -print_certs -out www.example.com.crt.new

tech | Permanent Link

Sat, 08 Oct 2005

Oracle Buys Innobase

Oracle announced yesterday that they've purchased Innobase. There aren't too many details yet.

Innobase is the Finnish company which developed the InnoDB engine for MySQL. InnoDB brought MySQL many of the features necessary for deployment in non-trivial installations, including support for transactions, row-level locking, and foreign key constraints. These are some of the features that would allow MySQL to be used in place of a commercial database such as Oracle. With the imminent release of MySQL 5.0, which includes support for stored procedures, triggers, and views, even more applications could be built on MySQL.

One of the main features in which Oracle beats out MySQL is in clustering. MySQL's clustering, the NDB engine is stil rather immature, and from what I understand, not having ever used Oracle, it has some nifty clustering. I'm sure that it has some other cool features that I've heard of. So, are we likely to see some Oracle technology make it's way into MySQL? Or more pressure to purchase licenses where they aren't needed?

tech | Permanent Link

Thu, 06 Oct 2005

Data URL's

You learn something new every day. Jeremy's linkblog include a link to a data: URL image encoder. I'd never even heard of the data scheme.

The data: scheme allows data to be embedded within an HTML page (or other document that supports URLs). For example, take a look at the source of this image:



Neat, huh?

It's not very efficient since the embedded data can't be cached separately from the page, but it's still kind of cool.

tech | Permanent Link

Blackberry 7290

I bought a BlackBerry 7290 a couple weeks ago. I mainly wanted it so I could keep tabs on my email, and ssh into servers when I'm away from my desk. Being a BlackBerry, it handles email pretty well, of course. After logging into T-Mobile's web site, it only took a minute or two to add my IMAP account. I just had to enter my email address and password, and it figured out the username, server, and that it should connect to the IMAPS port.

The BlackBerry service frequently logs into my IMAP server and delivers new messages to the handheld (RIM lingo for their phone/PDA devices). Deleting a message on the handheld can optionally delete it on the IMAP server. So far, I've had one incident in which the BlackBerry pulled in a few old messages as new. I'm not sure how it decided to pull in these three or four messages from my inbox of 8900 messages (yeah, I'm do for a cleaning). The BlackBerry mail software is not a full-fledged IMAP client. It's not possible to retrieve mail from folders other than the INBOX, nor even get to old messages already in the INBOX. I may look for a better third-party IMAP client.

Getting an SSH client to work on the BlackBerry was much more frustrating. It supports MIDP, which allows small Java applications to be installed. So immediately after getting the device, I installed midpssh, an open source SSH client. It was unable to connect to any ssh servers, though. Digging through the BlackBerry forums, I tried changing my APN settings, using different gateways and experimenting with entering my username and password vs leaving it blank. Nothing worked. I spent about five hours over the course of four days on the phone with T-Mobile support. I tried using Idokorro SSH, a commercial SSH client, with the same results. I was pretty sure that either something was wrong with my handheld or that my account hadn't been provisioned properly.

T-Mobile won't provide support for third-party applications, even ones provided on their co-branded Handango site, but the third or fourth BlackBerry support guy I talked to suggested that I could set up my BlackBerry as a modem to verify that it is working properly, and that they would be able to help troubleshoot if it wasn't.

So I set up the device as a modem in Windows within VMWare since there's absolutely no support for BlackBerrys under Linux, and I had the same problems. I was able to authenticate and bring up a PPP connection, but any type of network connections other than DNS queries failed. After another hour or so on the phone with T-Mobile, I was told someone would call me back on the next business day. Waiting for the call back, I tried once again to use the device as a modem, and what do you know, it worked. I started up midpssh, and it worked too. I'm sure my account just hadn't been set up properly despite having asked T-Mobile repeatedly to verify that it had been.

It's definitely not speedy to work in an interactive session over GPRS, but it'll do in a pinch.

The BlackBerry comes with a well-featured web browser. It's a full HTML browser which supports JavaScript and CSS. It even supports flash and svg, though I have those disabled.

Another great third-party application is Google's Local for mobile, which provides access to Google Maps (aka Google Local) from a custom J2ME application. I went to visit a friend in Santa Barbara last weekend and I didn't have to print out a Google Map like I usually do. You just step through each turn on the handheld. I used to use Google SMS from my old phone to find a nearby book store or the phone number of a restaurant, but this is much more useful.

I was actually planning on getting the 7105t, which has a normal phone form factor, but having tried to type on the 7105t's 20-key keypad, I'm glad I went for the full keyboard.

tech | Permanent Link

Sun, 02 Oct 2005

The Economist Subscription Discount

The Economist is offering its subscribers discounts on gift subscriptions. The first gift (or personal renewel) is $98, and additional subscriptions are only $69. Unlike most magazines, it's pretty much impossible to find discounts on subscriptions to The Economist. Amazon sells subscriptions at the normal rate of $129.

The Economist is the only magazine I read now. I cancelled my subscription to Time after I started reading The Economist. It's great for keeping up on what's going on in the world without having to read a broadsheet, the format of which I hate.

If you're interested in a subscription, let me know, and we can split the difference between the gift price and my renewel, making each $83.50. The subscription would start at the end of December with the double issue.

business | Permanent Link

Sun, 11 Sep 2005

Monitoring MySQL Replication Slaves

Drawing inspiration from the replication chapter of Jeremy and Derek's MySQL book, I recently set up monitoring to measure how far a MySQL slave is behind the master.

I created a simple table to store a timestamp.

CREATE TABLE `heartbeat` (
  `timestamp` datetime NOT NULL default '0000-00-00 00:00:00'
);
INSERT INTO heartbeat SET timestamp = NOW();
Master

The master updates the timestamp every second using a simple PHP script called write_mysql_heartbeat.php.

<?php

$dbHost = 'dbhost';
$dbUser = 'mysql_admin';
$dbPass = 'PASSWORD';
$dbName = 'mysql_admin';

$conn = mysql_connect($dbHost, $dbUser, $dbPass) or die('Failed to connect to database');
mysql_select_db($dbName) or die('Failed to select database: ' . $dbName);

define_syslog_variables();
openlog('mysql_heartbeat', LOG_PERROR | LOG_PID, LOG_DAEMON);

$sql = 'UPDATE heartbeat SET timestamp = now()';
while (true) {
        while (mysql_ping($conn) === false) {
                syslog(LOG_WARNING, 'Lost connection to database.  Will retry in 30 seconds.');
                sleep(30);
        }
        if (! mysql_query($sql, $conn)) {
                syslog(LOG_ERR, 'Failed to insert record: ' . mysql_error());
                die();
        }
        sleep(1);
}

I have restartd make sure that write_mysql_heartbeat.php keeps running with the following entry in /etc/restartd.conf:
write_mysql_heartbeat write_mysql_heartbeat "php4 -q /usr/local/bin/write_mysql_heartbeat.php"

Slave

On the slave side, I wrote a simple munin plugin to check how far the slave is behind the master. Munin is also configured to send alerts through nagios if the slave gets too far behind.

Here's /etc/munin/plugins/mysql_slave_delay:

#!/usr/bin/php4
<?php

$dbHost = 'slave-1';
$dbUser = 'mysql_admin';
$dbPass = 'PASSWORD';
$dbName = 'mysql_admin';

if ($argv[1] == 'config') {
        # The host name this plugin is for. (Can be overridden to have
        # one machine answer for several)

        # The title of the graph
        echo "graph_title MySQL Slave Delay\n";
        # Arguments to "rrdtool graph". In this case, tell it that the
        # lower limit of the graph is '0', and that 1k=1000 (not 1024)
        echo "graph_args --base 1000 -l 0\n";
        # The Y-axis label
        echo "graph_vlabel seconds\n";
        # We want Cur/Min/Avg/Max unscaled (i.e. 0.42 seconds instead of
        # 420 milliseconds)
        echo "graph_scale no\n";
        # Graph category. Defaults to 'other'
        echo "graph_category mysql\n";
        # The fields. "label" is used in the legend. "label" is the only
        # required subfield.
        echo "seconds.label seconds\n";
        # These two are optional. They are only used if you have
        # configured your munin to tell a Nagios-server about any
        # problems
        echo "seconds.warning 30\n";
        echo "seconds.critical 120\n";
        # This one is purely to add an explanation to the web page. The first
        # one is for the graph itself, while the second one is for the field
        # "seconds".
        echo "graph_info This graph shows how many seconds this MySQL slave is behind the master\n";
        echo "seconds.info Number of seconds behind master\n";

        # Last, if run with the "config"-parameter, quit here (don't
        # display any data)
        exit;
}

$conn = mysql_connect($dbHost, $dbUser, $dbPass) or die('Failed to connect to database');
mysql_select_db($dbName) or die('Failed to select database: ' . $dbName);

define_syslog_variables();
openlog('mysql_heartbeat', LOG_PERROR | LOG_PID, LOG_DAEMON);

$sql = 'SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(timestamp) from heartbeat';
if (false === ($result = mysql_query($sql, $conn))) {
        syslog(LOG_ERR, 'Failed to get record: ' . mysql_error());
        die();
}

if (mysql_num_rows($result) != 1) {
        syslog(LOG_ERR, 'Failed to find record for heartbeat: ' . $hostname);
        die();
}
list($delay) = mysql_fetch_array($result);

echo "seconds.value $delay\n";
Output



The slave is falling behind while backups are running. I still need to do something about that.

tech | Permanent Link

Pentax S5i

I bought my first digital camera last week. It's a Pentax S5i. I got it at Costco for $300, plus $90 for the 1GB SD card.

I wanted a camera that was small enough to carry around easily, but that takes great-looking pictures. The Pentax fits the bill. It has a ton of features that I haven't figured out how to use properly yet. I'll need to get a book on photography to learn when to adjust the white balance or exposure. Out of the box, it takes very pretty pictures though.

The macro mode allows me to take pictures very close-up.

I'm also enjoying the black-and-white filter and sunset mode.

Works with Linux

The camera plays nicely with Linux. It came with a USB cable, and upon plugging it in, it is detected as a scsi device using the usb-storage module, just like the iPod Shuffle.

misc | Permanent Link

Mon, 29 Aug 2005

Housing Bubble Fun

I spent way too much time figuring out how to use ImageMagick for that last post to let it go to waste.

business | Permanent Link

Right Now Pricing

There's a Jiffy Lube around the corner from my apartment. Sometimes when I walk to lunch in the afternoon, the mechanics are standing outside on the street with signs advertising their oil change service to passing cars. I think that's a good idea; rather than just hanging out waiting for customers, they're out touting.

But I didn't realize something even more interesting about their sales technique until yesterday. A few days ago, I pulled into the Jiffy Lube to ask how much an oil change was; it was $29.95 or $29.99. That seemed a bit expensive so I passed.

Yesterday, while I was walking home from Starbuck's after enjoying my free latte from Insider Pages, I read the signs that the mechanics were holding. They read:
Right Now
$19.95
Oil Change

When they don't have any customers, they cut the price by $10 bucks. That seems pretty smart. Other companies might want to try that. What other errands would you take care of at the vendor's convenience for a hefty discount?

I was at Chicago For Ribs last week with Denisa. It was about 2 or 3 in the afternoon, and there were 4 or 5 tables of customers. On staff were two servers and a bus boy. I wouldn't have thought anything of it, but Denisa pointed out that the management should send home the bus boy and one of the waiters. She briefly worked in the Chicago For Ribs in Santa Monica. That one was always over-staffed, and closed a few months after opening. (They also had a problem in that they gave away buy-one-get-one-free certificates on Third Street Promenade every day so every customer came in with a coupon.)

If they didn't want to send some of the extra staff home, why not have them stand outside with a sign advertising a Full Rack of Baby Backs for $10 Right Now?

business | Permanent Link

Mon, 22 Aug 2005

How Spaghetti Breaks

Some researchers in France figured out why, when a piece of spaghetti is bent, it breaks into multiple pieces, rather than just breaking in half. They have a number of videos of their experiments. They found that even releasing one end of a bent piece of spaghetti can cause it to break.

The multiple breaking of bent rods, like dry spaghetti pasta, can then be understood as a cascade of releases (loss of cohesion upon breakings) followed by stress increases leading to new cracks.

tech | Permanent Link

Fri, 19 Aug 2005

More Housing Bubble T-Shirts

Barry at The Big Picture points out another popular housing bubble t-shirt, a parody of Mr. Bubble.

Barry thinks that the fact that because there are declarations of the bubble everywhere, that it is must not be a bubble.

I find that somewhat ironic -- the same people who missed the largest stock bubble in human history have now become expert in spotting bubbles. And they now are spotting bubbles everywhere.

I cannot quite put my finger on precisely why the entire world declaring a housing bubble exists makes it less likely to be so at the moment.

I think, because so many people lost their shirts in the nasdaq bubble just a few years ago, it makes sense that many would be able to recognize the housing/credit bubble. I find it remarkable that so many people have been party to the current bubble. It's not like previous bubbles where there have been multiple generations between bubbles, causing the lessons of the past to be forgotten. There must be a propensity among people to assume that if the banker wants to give them a loan for 10 times their income, it must be in their best interest.

culture | Permanent Link

Thu, 18 Aug 2005

Plazes

Plazes is pretty cool new service that tracks your physical location based on the MAC address of your default gateway. The idea is that when you connect to a network, a litle program on your computer called a launcher checks your default route, looks up its MAC address in your arp cache (doing something like
netstat -rn | grep '^0\.0\.0\.0' | awk '{print $2}' | xargs /usr/sbin/arp | tail -1 | awk '{print $3}'), and sends it to Plazes.

If it's a MAC address that Plazes doesn't know about yet, it lets you put in a name for the location and an address. Then you can share your location, perhaps by integrating it into an IM client or on your blog.

You can also look up the location of a Plaze user using a url such as http://beta.plazes.com/whereis/xn, and you can look for people within a certain radius of your location.

Note that if you're using the GTK launcher on Debian, it expects to find arp in /sbin.

tech | Permanent Link

Hocus Pocus

In response to Kansas becoming the latest state wanting to teach "Intelligent Design" in a science classroom, one of Denisa's professors, Robert Cleve, suggested that doing so is akin to splitting a physics class in two, and teaching magic during the second half. I thought that was a clever and apt analogy.

culture | Permanent Link

Mach3 Power Scam

I have been using Schick Tracer FX razor for years. It's a great razor; the best feature is that its two blades flex, giving a close shave for people without two-dimensional faces. It's increasingly difficult to find Tracer FX blades, though. Apparently, Schick has eliminated the product, and replaced it with the Xtreme 3 (3 blades) and the Quatro (4 blades), which reminds me of this:

Hitchhiker: You heard of this thing, the 8-Minute Abs?
Ted Stroehmann: Yeah, sure, 8-Minute Abs. Yeah, the excercise video.
Hitchhiker: Yeah, this is going to blow that right out of the water. Listen to this: 7... Minute... Abs.
Ted Stroehmann: Right. Yes. OK, alright. I see where you're going.
Hitchhiker: Think about it. You walk into a video store, you see 8-Minute Abs sittin' there, there's 7-Minute Abs right beside it. Which one are you gonna pick, man?
Ted Stroehmann: I would go for the 7.
Hitchhiker: Bingo, man, bingo. 7-Minute Abs. And we guarantee just as good a workout as the 8-minute folk.
Ted Stroehmann: You guarantee it? That's -- how do you do that?
Hitchhiker: If you're not happy with the first 7 minutes, we're gonna send you the extra minute free. You see? That's it. That's our motto. That's where we're comin' from. That's from "A" to "B".
Ted Stroehmann: That's right. That's -- that's good. That's good. Unless, of course, somebody comes up with 6-Minute Abs. Then you're in trouble, huh?
[Hitchhiker convulses]
Hitchhiker: No! No, no, not 6! I said 7. Nobody's comin' up with 6. Who works out in 6 minutes? You won't even get your heart goin, not even a mouse on a wheel.
Ted Stroehmann: That -- good point.
Hitchhiker: 7's the key number here. Think about it. 7-Elevens. 7 doors. 7, man, that's the number. 7 chipmunks twirlin' on a branch, eatin' lots of sunflowers on my uncle's ranch. You know that old children's tale from the sea. It's like you're dreamin' about Gorgonzola cheese when it's clearly Brie time, baby. Step into my office.
Ted Stroehmann: Why?
Hitchhiker: 'Cause you're fuckin' fired!

Update (09/15/05): The above is even more apropos with the announcment of Gillette's Super-Mega-Turbo-Mach-Power, 5-blade, facial-hair-obliterating gizmo. (via Seth)

Anyway, fretting the day when my supply of Tracer FX blades runs out, I have been on the lookout for a replacement razor. Enticed by a four-dollar Costco coupon, I bought a Mach3 Power. I knew the razor-cum-vibrator was a marketting gimmick and a way for Gillette to sell more Duracell batteries now that many battery-powered devices come with Lithium-Ion or other rechargable batteries. But, just what if all of those Ph.D.'s slaving away for years in Gillette's labs really did make a huge breakthrough in shaving technology. Did I really want to miss out on the revolution? (It was televised, but my Tivo sheltered me from the 30-second clips.)

In short, the Mach3 Power is nothing special. Because it's vibrating, it sounds similar to barbers' clippers. This doesn't make for a better shave, though. I'm also not very fond of the swiveling cartridge; I feel like I don't have enough control of it.

I'll be on the lookout for old stock of Tracer FX blades before they become a relic of history.

Update: I guess it's "Mach3" rather than "Mach 3". I've made the appropriate copy changes.

business » marketing | Permanent Link

Opt Out of Social Security

Join a church. Separate from state.

While doing my taxes this year, I discovered IRS Form 4029 which allows an individual to opt out of social security and medicare. To do so, you must be conscientiously opposed to accepting benefits of any private or public insurance that makes payments in the event of death, disability, old age, or retirement; or makes payments for the cost of medical care; or provides services for medical care. While I am conscientiously opposed to public insurance, I have no objections to private insurance. Of course, there are a couple other stipulations. You must also join a collectivist organization with a belief in the supernatural which has been in existance since at least 1950.

Individuals who wish to be self-sufficient or participate in private insurance programs rather than be part of the state's welfare system are unable to do so. I find this to be egregious. I have contact my elected representatives in Congress to let them know how I feel, but I'm not expecting much considering that both Senators Boxer and Feinstein have petitions on their home pages to preserve social security as is.

Here's the short note I sent to Congressman Sherman and the Senators, and the non-responsive form letter response from Ms. Boxer.

Congressman Sherman, As President Bush and Congress are currently working on the reform of Social Security, I would like to propose that one of the reforms include the ability of citizens to opt out of participation in the Social Security and Medicare insurance programs. Being a responsible individual, I plan to save enough money during my productive years to fund my retirement until death. I am conscientiously opposed to accepting welfare from the state and would be happy to waive all rights to Social Security benefits in return for not being required to contribute to the program. Such an option is available to members of certain religious organizations, and I would appreciate your support in ending such unconstitutional discrimination. Thank you for you time and I would be delighted to hear your thoughts on the issue. Sincerely, Christian Warden
Date: Fri, 4 Mar 2005 09:21:31 -0500 From: senator@boxer.senate.gov To: cwarden@xerus.org Subject: Responding to your message March 4, 2005 Mr. Christian Warden 18531 Prairie Street, Apartment 214 Northridge, California 91324-3156 Dear Mr. Warden: Thank you for writing to express your concerns about President Bush's plan to partially privatize Social Security. I appreciate hearing from you. Social Security is a crucial insurance program and an indispensable safety net for our people. It has been enormously successful. Before Social Security, over half of all seniors were poor. Today, 10 percent live in poverty. That is still too many, and we want to take care of that. What we do not want to do is go back to the days when 50 percent of our seniors were living in poverty. Under the President's plan, Social Security benefits would be cut by 45 percent. The average yearly payment would be only $5,700, which is 35 percent below the poverty line. That would be a tragic reversal of fortune for our people. Certainly we know that Social Security needs periodic adjustments. However, President Bush is misleading the American people by calling this a "crisis." According to the Social Security Trustees, there is enough money to pay full benefits until 2042. And according to the Congressional Budget Office, there is enough money to pay full benefits until 2052. Now more than ever -- as we are faced with an aging population, the imminent retirement of the baby boom generation, the costs of the war on terrorism, 40 million Americans without healthcare, and a ballooning budget deficit of well over $400 billion -- we cannot afford to divert needed funds away from an already stressed Social Security system. ^L This is too much of a risk to take with funds that so many workers are counting on for their retirement. Privatization would also impact people with disabilities, survivors of deceased workers, and 3 million children who depend on Social Security benefits. I feel strongly that we should not weaken Social Security or compromise its financial condition. Rest assured, I am committed to preserving the integrity of Social Security for generations to come. And it is not difficult to solve this challenge, just as we did in 1983. Again, thank you for taking the time to voice your concerns. Please continue to keep me informed about the issues that matter to you. Sincerely, Barbara Boxer United States Senator

Disclaimer: As a child, my mother received welfare. And while it allowed her to spend time raising me, given the choice, I would not want to be a burden on my neighbors.

business » taxes | Permanent Link

Fri, 29 Jul 2005

mnoGoSearch PHP Extension on Debian Sarge

The mnoGoSearch extension is one of the few PHP extensions that isn't packaged by Debian. Additionally, the version of the mnoGoSearch extension in PHP 4.3.10 seems to be incompatible with the version of mnoGoSearch in Debian Sarge. Here's how to upgrade the extension and build a php4-mnogosearch package:


/usr/src# apt-get build-dep php4
/usr/src# apt-get install mnogosearch-dev mnogosearch-mysql
/usr/src# apt-get source php4
/usr/src# cd php4-4.3.10/
/usr/src/php4-4.3.10# ./debian/rules patch
/usr/src/php4-4.3.10# curl http://xn.pinkhamster.net/download/php4-mnogosearch.patch | patch -p1 
/usr/src/php4-4.3.10# cd ext/mnogosearch
/usr/src/php4-4.3.10/ext/mnogosearch# curl http://mnogosearch.org/Download/php/mnogosearch-php-extension-1.96.tar.gz | tar xvz
/usr/src/php4-4.3.10/ext/mnogosearch# mv 1.96/* .
/usr/src/php4-4.3.10/ext/mnogosearch# rmdir 1.96/
/usr/src/php4-4.3.10/ext/mnogosearch# cd ../..
/usr/src/php4-4.3.10# ./debian/rules binary

You can now install the php4-mnogosearch package located in /usr/src. If you're using SQLite or PostgreSQL, you should be able to install the correct mnogosearch-* package instead of mnogosearch-mysql, but I haven't tested doing so.

For the lazy, you can just add this to your /etc/apt/sources.list:
deb http://packages.pinkhamster.net/ sarge main
Then run apt-get install php4-mnogosearch.

Update 11/02/05: I've updated the Sarge package to 4.3.10-16.
Update 11/06/06: I've updated the Sarge package to 4.3.10-18.
Update 05/05/07: I've updated the Sarge package to 4.3.10-20.
Update 08/10/07: I've updated the Sarge package to 4.3.10-22. I also put a copy of the mnogosearch extension tarball in my download directory because mnogosearch.org is currently down.

tech | Permanent Link

Thu, 21 Jul 2005

Napster Marketing



At least somebody noticed that Americans weren't really going for that whole "ownership society" thing.

business » marketing » advertising | Permanent Link

Watered-Down California Wine

Intelligent Life, a new magazine from the publishers of The Economist, has a story about how much of the wine produced in California is "watered back", i.e. diluted with water. Apparently, this is done to keep alcohol content down or to make sure that fermentation occurs if there is too much sugar in the grapes. I'm no wine connoisseur, but I'd be surprised if very many wine drinkers were aware of this.

…French towns and villages are a great deal more picturesque than anything that northern California can offer. Calistoga and Yountville are not exactly Beaune and Châteauneuf-du-Pape. But for the winemaker the obvious difference is the weather: California has longer and warmer sunshine—which means that the fully ripened grapes may well produce a wine with a bit too much alcohol for comfort (too much, also, for the bottom line, since wine and liquor are taxed according to their alcohol level).

One obvious solution would be to pick the grapes earlier, except that that would be at the cost of the "full-bodied" flavour and "big" character of the typical Californian wine. Hence a preference for the other obvious solution: adding water during the fermentation process. At which point, everyone gets a little coy, even a trifle alarmed. Witness the concern of a spokeswoman for California's Wine Institute. "How did you hear about this?" she demanded. "This is a long, long story—it's kind of a stylistic thing."

business | Permanent Link

Congress to Slow Earth's Rotation

According to the Chicago Sun-Times (via Max Clark), Congress is planning to add two months to Daylight Saving Time.

"The more daylight we have, the less electricity we use,'' said U.S. Rep. Ed Markey (D-Mass.), who co-sponsored the measure with U.S. Rep. Fred Upton (R-Mich.).

Shifting daylight from the morning to the evening doesn't create more of it. See Wikipedia for more details on DST.

culture | Permanent Link

Sat, 16 Jul 2005

Smoke Detector From Hell

Apparently, Friends episodes are based on true stories. Do you remember The One Where Phoebe Destroys Her Smoke Detector? My smoke detector must have seen it, and decided to recreate the episode last night. In the middle of the night, it started beeping, loud enough to wake me up, and just frequently enough to almost let me fall back to sleep before beeping again. I got up without putting on my glasses, followed the blurry glowing green light in the dark, and felt around for the button on it. Now, I know the button is to test the device, but for some reason I thought it might also serve as a "shut up, it's 3 in the morning" button. Remarkably, after pushing the button, and pissing off my wife (born without the ability the hear the ultrasonic beeps) with the squeal asserting to the world that smoke detector was still doing its job admirably, the beeping stopped.

Alas, sometime not much later I guess, the beeping resumed. I got back up, twisted the alarm off the wall, and tried to disconnect it from the mains. After struggling for a bit, I put on my glasses and turned on the light, vexing my wife considerably more, and successfully disconnected the alarm. I placed it on my desk, and went back to bed. Of course, that didn't stop the beeping; it has a battery backup so that it can keep beeping in the case of a power outage.

So, I took the alarm to the kitchen, closed the bedroom door, and retired to my bed once again. The little alarm persevered: the beeping was still loud enough for me to hear it. I got up, returned to the kitchen, and disconnected the 9-volt battery. The beeping continued. We have a small apartment. There wasn't anywhere to put the alarm farther away from my bedroom. I considered putting on some clothes and taking it out to my car. I also thought about putting it in the refrigerator. Or, I could leave it out in the hallway of my apartment building. I might still be able to hear it there, but at least I'd be able to share my hell with the guy across the hall whose alarm clock goes off for hours and hours every afternoon.

Feeling pretty clever for 3am, I decided to wrap it in a little blanket and sandwich it between two throw pillows. Finally, I was able to get some sleep. My wife still wanted an apology in the morning.

misc | Permanent Link

Thu, 07 Jul 2005

Damn You, Macy's

The secret to a happy marriage is two comforters. Why is it imposible to find twin-size duvet covers by any of the "luxury" bedding makers?

(No, I don't really care, but Denisa is no longer happy with our IKEA bedding.)

misc | Permanent Link

How To Make An Awesome Smoothie

It's starting to get hot here in the Valley. And when it's hot, I like to drink smoothies. Here's my recipe for a smoothie that tastes great and is good for you. It doesn't have any sugery "juice drink concentrate" in it, just juice and fruit.

  1. Fill a pint glass about two-thirds full of frozen strawberries, probably about 6 or 7 strawberries.
  2. Fill the glass with orange juice, stopping about an inch or so from the top.
  3. Dump the glass of strawberries and orange juice into a blender.
  4. Add a small banana to the blender.
  5. Blend on high for about 10 seconds.
  6. Pour the smoothie back into the pint glass and enjoy a glass of fruity yumminess.

misc | Permanent Link

Wed, 22 Jun 2005

High-Availability SMTP with UCARP on Debian

At customer request, we're going to start offering outbound SMTP service to Postica customers. Doing so requires a much greater guarantee of availability than is required when only accepting mail from other MTAs. MTAs are able to use multiple MX records when attempting to deliver mail, and will queue mail if none of the MX hosts are available. MUAs, on the other hand, can generally only be configured with a single hostname to use as the SMTP server for outbound mail, and tend to show the user an unpleasant error message if there is a problem connecting to the SMTP server.

To provide high-availability, load-balanced SMTP service, I decided to use round-robin DNS in combination with CARP, the UCARP implementation specifically. CARP is a protocol for supporting failover of an IP address, very similar to VRRP.

I installed the Debian ucarp package on two servers. Each server is the preferred server for one ucarp-managed IP address and the backup for the other; smtp.postica.net points to both addresses. I also installed the iputils-arping package which is used to send gratuitous arps when the IP address moves to a new server thus causing the MAC address to change. Note that the arping program in the iputils-arping package is different than the one in the arping package.

I added two up options to /etc/network/interfaces on each server to start one ucarp process for each IP address when the physical interface to which the ucarp addresses are bound is brought up.

/etc/network/interfaces
auto eth0
iface eth0 inet static
   address 192.168.1.101
   netmask 255.255.255.0
   gateway 192.168.1.1
   up ucarp -i eth0 -s 192.168.1.101 -v 201 -p secretPassword -a 192.168.1.201 \
     --upscript=/etc/ucarp/vip-201-up.sh --downscript=/etc/ucarp/vip-201-down.sh -P \
     -z -k 10 --daemonize
   up ucarp -i eth0 -s 192.168.1.101 -v 202 -p secretPassword -a 192.168.1.202 \
     --upscript=/etc/ucarp/vip-202-up.sh --downscript=/etc/ucarp/vip-202-down.sh -P \
     -z -k 0 --daemonize
   down pkill ucarp

The interfaces file is essentially the same on the second server, but the values of -k arguments, the advertisement skew which determines priority, are swapped. If you were running ucarp on multiple interfaces, you probably wouldn't want to kill all ucarp processes when bringing an interface down; you might want to use start-stop-daemon with --make-pidfile and --background instead of using ucarp's --daemonize option.

The --upscript and --downscript arguments tell ucarp what scripts to run when taking over or releasing an IP address, respectively. Here's an example of each:

vip-201-up.sh
#! /bin/sh
exec 2> /dev/null

/sbin/ip addr add 192.168.1.201/24 dev "$1"
start-stop-daemon --start --pidfile /var/run/ucarp-arping.192.168.1.201 \
  --make-pidfile --background --exec /usr/sbin/arping -- -q -U 192.168.1.201
vip-201-down.sh
#! /bin/sh
exec 2> /dev/null

/sbin/ip addr del 192.168.1.201/24 dev "$1"
start-stop-daemon --stop --pidfile /var/run/ucarp-arping.192.168.1.201 \
  --exec /usr/sbin/arping
rm /var/run/ucarp-arping.192.168.1.201

In theory, it should only be necessary to send a single (or maybe a couple) gratuitous arp. I had a problem when using vrrpd, though, in which the backup host would briefly become the master, the arp table on the router would get updated with the MAC address of the new master, then it would go back to being backup. During this period, the other host would think it was the master the entire time, and so would not send any arp updates making the IP address unreachable until the router's arp table was updated. I don't know if this could occur using CARP, but I prefer to play it safe and have the master continue to send unsolicited arps by using start-stop-daemon to spawn a long-running arping process.

In summary, round-robin DNS is used to balance the load across the two servers, and in the event that one of the servers goes down, both IP addresses will be handled by a single server.

tech » mail | Permanent Link

Replicating a Subversion Repository Using Git

I recently had to replicate a subversion repository into an existing svn repository. I wanted to import a vendor's svn repo into an existing repo, recording the full history from the source into the destination. Development was continuing in the source repo so I also needed a solution that would allow repeated syncs from the source to the destination.

First, I looked at using svnsync to do this. It handles the requirements for preservation of history and repeated syncs, but it requires a brand new repository to write to, and only svnsync should be allowed to write to the destination.

I also briefly looked at using svnsync to replicate to a new local repo, then using svndumpfilter (or svndumpfilter3?) to generate a dump that I could load into the existing destination repo, but doing this repeatedly didn't sound like fun.

So I figured out how to replicate changes from one svn repository to another using git-svn. If you want to do something similar, here's how I did it.

# create a git repository to use for the migration
git init migration
cd migration

# git-svn doesn't manipulate revision properties to store the original author,
# so the commits in the destination repository will be attributed to the user
# committing to the repo.  Setting svn.addAuthorFrom will add a From: line to
# the end of the log messages in the destination repo.  The svn.useLogAuthor
# will read this value out of svn commits so git will report the correct
# author.
git config svn.addAuthorFrom true
git config svn.useLogAuthor true

# Initialize the source and destination repositories.  Set a prefix for each since we're using two.
# Both source and destination repositories can be any valid svn URL.
# We're not doing development in git so we don't tell git to treat svn branches
# and tags like git ones.  If we have a standard svn layout with trunk,
# branches, and tags, we just treat them like normal directories as far as git
# is concerned.
git svn init -R source --prefix source/ https://example.com/path/to/source
git svn init -R dest --prefix dest/ file:///path/to/dest

# Map svn usernames in the source repository to names and email addresses.
# These values will end up in the From: line in commits.  You may want to edit
# the svn-authors before running `git svn fetch` if you want more descriptive
# names.
(for i in `svn log https://example.com/path/to/source | grep -P '^r\d' | cut -f2 -d'|' | sort -u`; do echo "$i = $i <$i@example.com>"; done) > .git/svn-authors

# Add the username of the user that will be performing the commits to the destination as well.
echo "cwarden = <cwarden@xerus.org>" >> .git/svn-authors

# Tell git to use the list of authors you just created.
git config svn.authorsfile .git/svn-authors

# Pull in both svn repositories to git.  This might take a while.
git svn -R source fetch
git svn -R dest fetch

# Create local branches from the remote branches.  `git cherry-pick` requires a
# local branch, and I like the symmetry of using one for the source as well.
git branch source remotes/source/git-svn
git branch dest remotes/dest/git-svn

The rest of the steps can be wrapped up in script to be run each time you want to migrate changes from source to dest.
#!/bin/sh
# Update the source from svn.
git co source
git svn rebase || exit 1

# And update the destination repo in case anyone else is writing to it.
git co dest
git svn rebase || exit 1

# Take all of the changes that are in source, but not dest, and
# individually apply them to the local git copy of the repo.
git cherry -v dest source | grep ^\+ | awk '{print $2}' | xargs -I{} sh -c "git cherry-pick {}; git diff --quiet || exit 255" || exit 1

# Commit the changes that we just cherry-picked to svn.
git svn dcommit || exit 1

# Now the somewhat ugly part.  Because the two histories remain separate, we
# tell git that we've applied commits from the source to the destination using
# the git grafts feature.
# This eliminates the previously applied commits from the list that
# git needs to look through the next time we run `git cherry`.
(git show-ref -s dest; git show-ref -s source) | paste -d' ' -s | xargs -d '\n' -I{} sh -c "test -f $(git rev-parse --show-toplevel)/.git/info/grafts && grep -q '{}' $(git rev-parse --show-toplevel)/.git/info/grafts || echo '{}' >> $(git rev-parse --show-toplevel)/.git/info/grafts"

As an alternative to cherry-picking commits, you could use git merge source instead. This frees you from having to store the graft points, but at the expense of having each merge appear as a single commit in the destination svn repo, so you don't get the full history from the source.

Update: The script that's run for each synchronization now aborts if an error occurs, most likely a cherry-pick that results in a conflict. Thanks for fr0sty on #git for coming up with the git diff --quiet solution to detect failed cherry-picks because the exit status is ambiguous.

tech | Permanent Link

Tue, 21 Jun 2005

I'm an Art Collector

On Saturday, Denisa and I bought our first pieces of art. I took her down to Scala Galleria to show her Carrie Graber's stuff that I liked. She wasn't quite as impressed as I was, but she thought some of pieces were pretty good.

We ended up buying two small, 9x12 pieces, one original and one print. The original is Room Full of Blues.



The print is The Letter.

culture | Permanent Link

Fri, 10 Jun 2005

Does Russell Get Frugality?

Apparently not.

Russell Beattie is a "work[er] at Yahoo! focusing on new mobile products," but seems *amazed* that somebody who works for a living might find that spending $500 on a mobile phone is extravagant. My goodness!

In his latest "Online notebook" post about Leslie Katz's post about Jimmy Buffet's lost Sony Ericsson mobile, Russell breathlessly recounts Leslie's "snarkiness and ignorance" as she "breathlessly recounts that a bus boy who found the phone may have crank called Bill Clinton, 'whose number was stored in the $500 phone's directory,' and warns there might be more phone calls coming since, 'Apparently, the fancy phone's memory card with the names, numbers and some addresses' is still missing." Emphasis mine. Double emphasis his.

Astounding. For some reason this rubbed me the wrong way - just the snarkiness and ignorance of it. Could someone at Yahoo please give this man a decent financial planner and tell him to get a clue? Thanks.

-Xn

tech | Permanent Link

Tue, 07 Jun 2005

Apple Service Pretty Damn Good

In addition to not shuffling, my iPod Shuffle started having some problems being detected upon plugging it into a usb port. I tried multiple usb ports on multiple computers with which I had previously used the Shuffle, so I concluded that the problem must be with the iPod.

Friday afternoon, I opened a service request with Apple online. I was told they would send out a replacement with a postage-paid envelope in which I could send back the defective iPod. There would be no cost, but they took my credit card number in case I didn't send back the broken one.

My new Shuffle arrived this morning (Monday) around 10 am. That's a pretty amazing response time. I plugged the new one in, initialized it with gtkpod, and copied over some mp3's. The new one even works in shuffle mode. I put the old one back in the envelope and scheduled a pickup with DHL, who picked it up a couple hours later. I'm happy.

In other Apple news, new Macs will have Intel CPU's.

However, Schiller said the company does not plan to let people run Mac OS X on other computer makers' hardware. "We will not allow running Mac OS X on anything other than an Apple Mac," he said.

Nevermind, there's not much of a story here.

tech | Permanent Link

Sun, 05 Jun 2005

Credit Card Expiration Date Maxim

Steve Friedl has long maintained the "No Dashes Or Spaces" Hall of Shame which catalogs web sites that require visitors to enter their credit card number without spaces as dashes. As he points out, it's trivial to strip out the extraneous characters server-side so there's no reason to have this stupid restriction in web applications.

I would like to proffer an additional maxim of credit card entry. Credit card expiration dates should never be entered using the name of the month. While I don't have an extensive list of offenders like Steve, I would estimate that there are thousands of web sites that request your credit card expiration date with two pull-down menus, one for the month, January, February, etc., and one for the year. As far as I know, every credit card in existence has the expiration printed as either MM/YY or, less commonly, MM-YY.

When somebody is making a purchase online with a credit card, they simply need to copy the card number (hopefully, without stripping out the whitespace) and the expiration date into a form. The customer shouldn't need to mentally convert the format of the expiration date on the card to the format required on the web site. Additionally, there's no reason to use pull-downs to enter the expiration date. A small text box is the perfect format for entering a 5 digit string.

I suggest the following regex be used to validate expiration dates:
^((0?[1-9])|(1[0-2]))[/-]?(2[01])?\d\d$
This is probably even more liberal than necessary. It allows a one- or two-digit month and a two- or four-digit year, optionally separated by either a slash or a dash. Here's a PHP function to validate such a date string and normalize it to MM/YYYY:

   define('MPE_CREDIT_CARD_EXPIRATION', '~^((0?[1-9])|(1[0-2]))[/-]?(2[01])?\d\d$~');

   /**
   *
   * Check whether a string is a valid expiration date.  Returns the
   * normalized string if it is valid; else returns false.
   *
   * @return   mixed
   * @access   public
   */
   function validateExpiration($expiration, $asOf = null, $expiredOK = false) {
      if (is_null($asOf)) {
         $yearMonth = date('Ym');
      } elseif (is_numeric($asOf)) {
         // unix timestamp
         $yearMonth = date('Ym', $asOf);
      } else {
         // assume mysql datetime (YYYY-MM-DD HH:MM:SS)
         $yearMonth = substr(str_replace('-', '', $asOf), 0, 6);
      }
      $expiration = preg_replace('/\s/', '', $expiration);
      if (! preg_match(MPE_CREDIT_CARD_EXPIRATION, $expiration)) {
         return false;
      }
      if (strlen($expiration) <= 4) {
         // [M]MYY => MM/YY
         $expiration = sprintf('%02d/%02d', substr($expiration, 0, -2), substr($expiration, -2));
      } elseif (! preg_match('~[/-]~', $expiration)) {
         // [M]MYYYY => MM/YYYY
         $expiration = sprintf('%02d/%02d', substr($expiration, 0, -4), substr($expiration, -4));
      }
      // [M]M-[YY]YY => [M]M/[YY]YY
      $expiration = str_replace('-', '/', $expiration);
      list($month, $year) = explode('/', $expiration);
      strlen($year) < 4 && $year += 2000;
      $month = sprintf('%02d', $month);
      if (! $expiredOK && $year . $month < $yearMonth) {
         return false;
      }
      return sprintf('%02d/%04d', $month, $year);
   }

It will also verify that the expiration date is in the future, as of the current date or an optional date passed as a second parameter. If the third parameter is true, dates in the past will not be rejected.

tech | Permanent Link

Great Beer and Great Art in Los Angeles

I went down to the Scala Galleria on Montana in Santa Monica yesterday to check out their art by Carrie Graber. They had about 10 pieces of hers including a couple small original paintings and a number of giclees on canvas. Her paintings are amazing.

I had never checked out that area of Santa Monica before, so I wandered down Montana towards the beach. It's mostly little boutiques, but there are also a number of coffee cafes and restaurants. I stopped at the bluffs and read for bit. On the way back, I stopped in a little pub called Father's Office. From the "Beer" sign outside, I thought it would be a dive, but it was actually a trendy little place.

It reminds me a bit of City Pub in Redwood City. They have 36 beers on tap, mostly California microbrews and a few international beers. I had a great IPA, Bear Republic Racer 5, and an even hoppier double IPA, Russian River Brewing's Pliny the Elder. Both were fantastic beers. Surprisingly, they had Greene King Abbot Ale. I've never seen Greene King in the states. I asked if they ever get the IPA, which is probably my favorite English beer, but the manager said that it doesn't travel well, which is kind of weird considering IPA's were originally made for export.

The only disappointment was the food. They have an absurd policy of "No substitutions, modification, alterations or deletions. Yes, really." When did beer snobs become food snobs? Since I couldn't get a burger without cheese, I ordered some chorizo which wasn't very good.

culture | Permanent Link

Fri, 03 Jun 2005

Novafoam Mattress Holding Up to the Heat

Memory foam is designed to soften based on your body temperature. I was a bit worried that my Novafoam mattress might start to feel like a waterbed as the weather got hotter. (The Sleep Number salesguy told me as much.) Summer has started here in the valley, and so far, I'm still sleeping comfortably.

misc | Permanent Link

Car Insurance

Jonathan, over at MyMoneyBlog, has a couple posts up about car insurance. His most recent is about collision and comprehensive. I dropped these on my 1999 Honda Civic a couple weeks ago. I'm saving $750 a year without it, and it wouldn't cause too much of financial burden if the car were involved in an accident. 21st Century fixed their web site so I was able to change my coverage without talking to Patrick. We dropped it on Denisa's car, which is only worth maybe $3k, a long time ago.

Jonathan's earlier post on liability coverage is interesting to me too. Since I started driving, I've always had the minimum liability coverage required by law. Since I didn't have many assets for someone to come after, this was fine. As I start to build up my net worth, I should definitely increase the amount of my bodily injury and property damage coverage.

I think Jonathan is a sucker to buy uninsured motorist coverage though. His collision insurance will cover his car in an accident, regardless of whether the other party has insurance, and his medical insurance should cover his medical bills. I don't think uninsured motorist coverage covers hit-and-runs either, so it's really a waste of money.

business | Permanent Link

Shorting Real Estate

It looks like we're one step closer to being able to short real estate. There's a company called HedgeStreet (Via The Big Picture) which allows trading futures on housing prices and mortgage rates. It's not quite the same as shorting a house as there's no underlying asset being bought and sold, nor even an option on an underlying asset; rather, it's basically a bet on which way prices (or rates) will go.

The web site is terribly slow so I haven't read all of the details. If it gets significant volume, it may become a valuable tool for predicting future prices, as markets seem to be pretty good at this type of thing.

business | Permanent Link

Idiots Lose Money "Investing" in Real Estate

Two of my favorite blogs are Housing Bubble and Housing Crash. Housing Bubble collects articles about the housing bubble in the United States. Housing Crash is mostly Patrick's chronicle of the housing bubble in the San Francisco area, but he also posts articles related to the housing bubble nationwide.

There seem to be an equal number of people who claim that there is no housing bubble as those who warn of it. The former group includes all of the real estate agents, mortgage lenders, and county tax assessors. The higher real estate prices go, the more money they make. The latter group is made of economists who point out that sales prices to rental rates ratio is out of whack, that housing prices and debt service costs have far outgrown household income, and that the residential real estate prices have been driven up by all of the easy money thrown at borrowers (well, easy until those 5/1 ARMs get past the 5 part). See The Coming Crash in the Housing Market : 10 Things You Can Do Now to Protect Your Most Valuable Investment for a thorough discussion.

Las Vegas seems to be leading the nation in the bursting of the bubble. Home builders have started lowering the prices of new homes. It's got to suck to know that your neighbors bought their houses for $100k less than you. Las Vegas has tons of open land to be developed so the surge in home prices was probably largely driven by speculators. Housing Crash points us to the story of some of those speculators.

"They call you and say 'you are so lucky .. this just came across.. it's going to be worth 100k before it closes,'"said Dyan Harmell. "We came with the hopes of buying two houses. We left the first day owning four. Within the next week, owning 6 -- all the way up to 19."
"We were told there were 80 people in the lottery for 15 homes. And lo and behold, every single person we knew got a home in that lottery,"said Pulte home buyer Cathy Wodka.

That's a pretty good marketing ploy. They must be targeting the same people who click on flashing banner ads that tell them they've won a new iPod.

Tips for Buying Real Estate

I know I wasn't the only idiot who lost a bunch of money a few years ago "investing" in equities. But at least I learned something. Don't buy something because it has gone up in value; it doesn't mean that it is going to keep going up in value indefinitely.

business | Permanent Link

Thu, 26 May 2005

Wedding Gift Stagnation

It pays to get married young. From my experience, wedding gifts tend to not keep pace with inflation. My friends, Gina and Kat, recently got married. Since they've been living together for a while, they don't really need kitchenware and linens; so, instead, they asked for cash to help pay for their honeymoon. I don't really like the idea of giving cash as a gift. We wanted to give them a gift certificate that they could use while on their honeymoon, which would show at least some thought went into the gift. But we started a bit late in the search for an appropriate venue from which to purchase a gift certificate, and didn't find anything that we were sure that they would appreciate, so we ended up just giving them cash.

I think the standard wedding gift price is $100. To me, this amount is neither too rich nor too poor. But this is the same amount that I've been giving since 1998 when my friends started getting married. (If you've received a wedding gift valued at less than $100 from me, sorry, I might have been low on funds at the time. Sometimes people don't design their gift registry to optimize the gift value per gift-giver. I wouldn't want to give a $70 frying pan with three washclothes, for example. When picking out items for a gift registry, one should come up with appropriate bundles of items that come close to $100 in value. That said, I've never set up a gift registry. I think it's more tacky than asking for cash. The last time I went through a catalog listing things I wanted someone to buy me was when I listed just about every toy on the market for Christmas, 1984.)

My point was that, in terms of gifts received, you would have been better off getting married in 1998 than in 2005. Unless, of course, you asked for computer hardware or consumer electronics for your wedding, in which case a dollar goes a lot further today. This observation isn't solely based on my generosity (or cheapness) in gift giving. About a year after Denisa and I got married, we had a reception in Slovakia so we could share the joy of our matrimony with her family and friends; and so the Krizan (Denisa's maiden name) family could get a return on the investments they made in the marriages of various cousins. The investments turned out to not be very profitible in real terms though. It seems SKK 5000 is the standard Slovak wedding gift from family members. (This was about $100 when Denisa and I met, but due to the falling dollar was closer to $200 when we got it.) But this is the same amount as Denisa's parents gave the cousins 10 years earlier. Slovakia had double digit inflation for a while which means 5000 Sk isn't nearly what it used to be. While wedding gifts aren't being devalued quite as quickly in the US (unless you're planning an international honeymoon), you're better off getting married sooner rather than later.

What should those considering marriage and those considering attending a marriage keep in mind for the future? If inflation stays low, there's not likely to be a revaluation of the wedding gift anytime soon. A few people might bump up their gifts to be $100 plus tax, but the next big gift amount is probably not until $200. If inflation picks up, gifting might move up to this level ahead of inflation. Those looking to get married would probably be better off during a recessionary period though. It is unlikely that there is much downside in the gift level so a fall in consumer prices would increase their gift values in real terms. Alternatively, a stronger dollar may increase the amount of linens from China that a dollar purchases (and prevent an undergarment war).

culture | Permanent Link

Sun, 15 May 2005

iPodder With XMMS

I've added XMMS support to the iPodder Debian package using PyXMMS.

I'm just starting to learn Python. The only thing I'd written in Python previously is a script to remove large attachments in email messages and store them in a database, replacing them with a link in the message to retrieve the attachment over http. This task was made much simpler than it would have been in other languages because of the Python email module. I'm very impressed with the large library of Python classes available.

tech | Permanent Link

iPodder Debian Package

After my experiment in packaging JavaHMO, I decided to try to package iPodder. The results are encouraging. I haven't figured out how to use all of the debhelper tools yet, but dpkg -b seems to do the job adequately well while I'm learning.

The iPodder package is in my repository, which you can add to your sources.list:
deb http://packages.pinkhamster.net/ unstable main
Since wxWidgets 2.5.3 appears to have been removed from sid, I've copied it from snapshot.debian.net into my repository to satisfy iPodder's dependencies.

tech | Permanent Link

Sat, 14 May 2005

JavaHMO Debian Package

JavaHMO is an application that allows you to use the Tivo Home Media Option to access music and photos stored on your Java-supported computer (Linux is a good choice) via your Tivo. I previously created a Debian init script for JavaHMO. Dave posted a comment on that page saying that he was having problems getting JavaHMO to start. It looks like the init script doesn't work with newer version of JavaHMO.

So I've started working on a more proper Debian package for JavaHMO. Rather than simply using alien to convert the RPM, I've tried to make it more of a proper Debian package. I've removed all the capital letters from directory and file names, so the config directory is /etc/javahmo rather than /etc/javaHMO, for example. It also creates the javahmo user and sets up the init script links.

I'm quite new to Debian packaging, and I haven't made it through the whole Policy Manual yet. Suggestions for improvements to the package are welcome.

Installation Instructions

You'll need to have a JVM installed. I recommend using make-jpkg with Sun's JRE.

Add the following line to /etc/apt/sources.list:
deb http://packages.pinkhamster.net/ unstable main
and run apt-get install javahmo. The JavaHMO configuration file, /etc/javahmo/configure.xml, is writable by group javahmo. Add any users who should be able to configure JavaHMO to this group. Run jhmo gui to start up the gui configuration tool and enable the plugins that you would like to use.

tech | Permanent Link

Fri, 13 May 2005

One Broken Condom

I don't actually know the circumstances leading to conception, but I am now an uncle. At one week, Klarka is starting to become a cute little thing.



Her eyes are huge!

misc | Permanent Link

Sun, 08 May 2005

Commercials That Make You Think

Commercials that make you think are always good. Here's an example.

business » marketing » advertising | Permanent Link

Walter Block on Walmart and Banking

Liberty Guys points us to a clip from CNBC in which Walter Block, Austrian economist, smacks down a congressman and a banking trade group representative who are whining about Walmart wanting to get into the banking industry. Good stuff.

My local Walmart has a Mexican bank in it for some reason, next to the McDonald's.

business | Permanent Link

Sun, 01 May 2005

The God Delusion

Salon recently published an interview with evolutionary biologist Richard Dawkins who has written a number of books explaining evolution. I hadn't heard of Dawkins until a few months ago when I saw him on NOW with Bill Moyers. I've been meaning to pick up one of his books.
Some choice quotes from the interview:

For a long time it seemed clear to just about everybody that the beauty and elegance of the world seemed to be prima facie evidence for a divine creator. But the philosopher David Hume already realized three centuries ago that this was a bad argument. It leads to an infinite regression. You can't statistically explain improbable things like living creatures by saying that they must have been designed because you're still left to explain the designer, who must be, if anything, an even more statistically improbable and elegant thing. Design can never be an ultimate explanation for anything. It can only be a proximate explanation. A plane or a car is explained by a designer but that's because the designer himself, the engineer, is explained by natural selection.
You are working on a new book tentatively called "The God Delusion." Can you explain it?

A delusion is something that people believe in despite a total lack of evidence. Religion is scarcely distinguishable from childhood delusions like the "imaginary friend" and the bogeyman under the bed. Unfortunately, the God delusion possesses adults, and not just a minority of unfortunates in an asylum. The word "delusion" also carries negative connotations, and religion has plenty of those.

culture | Permanent Link

Sat, 30 Apr 2005

American Housing Statistics

Mother Jones has collected some interesting housing statistics.

culture | Permanent Link

The Housing Bubble in Pictures

From Calculated Risk

From Northern Trust

From The Miami Herald

business | Permanent Link

Clever 3M Ad



Apparently, only some of the money is real, but it's a brilliant idea nonetheless.

business » marketing » advertising | Permanent Link

Thu, 28 Apr 2005

Eats, Shoots & Leaves

I read Eats, Shoots & Leaves last weekend. I suspect that it's one of the few books on the reference/humour shelf at the bookstore. It's a book about punctuation. Remarkably, it was a best seller in Britain and has received a number of good reviews. The author, Lynne Truss, rants about poor use of punctuation by shopkeepers (and, based on the number of times she complains about greengrocers, she must live in the vegetable capital of the UK), gives some history about how various punctuation marks came into being, and gives some tips on how to use them correctly.

I found some comfort in learning that nobody agrees on the proper use of commas, and, so, I will use them aggressively, as I see fit. I will also try to incorporate more colons and semicolons into my writing; a key that was, up until now, largely reserved for writing code will be set free. I was also happy to learn that British authors, like any programmer, know that it's proper for trailing punctuation to appear without quotation marks.

One bit of punctuation that I would like to bring back is two spaces after a period (full stop). I learned it in typing class in high school, and didn't realize that it doesn't exist in books until Ms. Truss pointed it out.

culture | Permanent Link

Tue, 26 Apr 2005

Email Security Silliness

It's amazing the number of times I've received email saying something like, "Here's the first eight digits of my credit card number. I'll send the second eight in another email (for security)."

This is not security. I wonder how people come up with these ideas. Do they think criminals accidentally intercept random emails sometimes? Or that they are able to intercept some messages, but there's no way they would be able to get two in a row?

If you're concerned about security, ask someone who is knowledgeable about the subject. In the case of email security, use PGP/GPG or S/MIME.

tech | Permanent Link

Tue, 19 Apr 2005

My iPod Shuffle Doesn't

I got my free iPod Shuffle yesterday. I spent way too many hours trying to get it working. On my laptop, with a 2.6.9 kernel, hotplug loaded the ub module instead of usb-storage. I upgraded makedev and created the /dev/ub* devices, but I couldn't access the /dev/uba device. Finally, I tried it on my desktop with a 2.6.10 kernel, and after plugging it in a second time, I was able to access the Shuffle's vfat filesystem as a scsi device.

I installed gtkpod, and was able to create the appropriate directory structure and copy over some mp3's to the Shuffle. I plugged in the headphones, turned it on, and it played. It sounds decent with the headphones Apple supplies, but better with my Sony ones. Apple really should have integrated the headphones into the lanyard it comes with. Or there should be a spring-loaded device to coil up the wires.

One thing my Shuffle doesn't do is shuffle. It works in normal, linear mode, but in shuffle mode, it won't play anything. Perhaps gnupod didn't create the directory structure correctly or something. I'm an album listener rather than a single listener so it's not a big deal, but I don't like knowing that my new gizmo isn't functioning properly. One other problem is that when it's plugged into my usb port, the light always blinks orange. It's supposed to be green when fully charged, but I left it plugged in all night, and it greeted me with flashing orange in the morning.

tech | Permanent Link

Sat, 16 Apr 2005

Irrational Real Estate Exuberance

Robert Shiller, the author of Irrational Exuberance, was on NPR's Talk of the Nation last week to discuss the housing bubble and to tout the second edition of his book. You can listen to it online.

One caller was a real estate agent who claims there's not enough land in Las Vegas and that it will become a land of high-rise living. Another said that Cleveland was becoming too expensive. As an aside, I spent a couple hours in Cleveland in 2000, and left with a favorable impression. Downtown seemed to be undergoing a lot of development.

From the book:

Irrational exuberance is the psychological basis of a speculative bubble. I define a speculative bubble as a situation in which news of price increases spurs investor enthusiasm, which spreads by psychological contagion from person to person, in the process amplifying stories that might justify the price increases and bringing in a larger and larger class of investors, who, despite doubts about the real value of an investment, are drawn to it partly through envy of others' successes and partly through a gambler's excitement.

business | Permanent Link

iPod Shuffle On Its Way

My free iPod Shuffle from ex24 is on it's way. Like Jonathan, I bought one share of Costco. At its current valuation, the iPod cost me between $2 and $3.

business | Permanent Link

Fri, 15 Apr 2005

Amazon, Screen Scraping and More Yahoo Pipes

When playing with Yahoo Pipes the other day, I mentioned that it would be nice if it had a screen-scraping module to build feeds for pages that don't one. It turns out there are a handful of services that already do that. I used Feedity to create of feed of the Prudent Bear news since my script stopped working at some point.

This morning I decided to update my Amazon aStore since they now allow you to add more than just the nine items on the homepage. I wanted to add a bunch of stuff from my wishlist. So I decided to try to get a list of ASINs for the items in my wishlist using Yahoo Pipes. Amazon provides RSS feeds of wishlists, but they only contain the last 10 items, so I used Ponyfish to create a screen-scraped feed. (I triggered an application error trying to do so with Feedity.)

Then I used Yahoo Pipes rename module to change the title of each item to the link, and the regex module to change the title to ASIN by extracting it from the URL. This gives me a feed of ASIN's. Admittedly, this is quite a convoluted solution to the actual problem I was trying to solve; curl and sed would have worked fine in this instance. It gave me a chance to play around with Yahoo Pipes, though.

tech | Permanent Link

Copying a Crapload of Files is Hard

I was recently faced with what turned out to be an unexpectedly difficult task. I had to copy about 700GB of data from one filesystem to another. The data was comprised of the backups of about 40 servers as stored by BackupPC. BackupPC is a great piece of software for backing up a network of servers. It can backup machines using SMB, rsync, and tar over rsh/ssh. It compresses the backed up files and pools them so multiple copies of the same files are stored as hardlinks to the compressed files in the pool.

In order to increase the storage capacity of the backup server, I was tasked with adding a second RAID array. I set up an LVM volume on the new array, and then needed to copy all of the files from the old array to the new one.

First, I started up rsync and let it go. For a long time, the rsync process just kept growing and growing. Before it starts copying any files, it goes through all of the files to figure out what it's going to copy. A known limitation of rsync is that it uses a lot of memory when there are a lot of files involved. I didn't know how many files we had, but with 4GB of RAM in the machine, I was pretty confident that we would be ok. After more than 24 hours, before it had started actually copying any files, rsync died as it hit the 3GB per-process memory limit.

For my next attempt, I used cp -a. cp started out alright. Throughput from source volume was pretty abysmal, but after about 5 days, the entire pool of compressed files had been copied. As it was copying the individual servers' backup directories (which contain the hardlinks to the pool), cp also hit the 3GB limit and died.

I briefly thought about using sgp_dd to do a lower level copy of the data, but we really wanted to use XFS for the new filesystem; the original filesystem was EXT3. I didn't confirm whether it would work with LVM volumes either.

I ended up just starting with an empty BackupPC directory. We'll keep the old backups for a while until we have sufficient history. Then, we'll add the old array to the new volume for additional disk space.

An interesting project might be to add an optional argument to rsync to allow it to use a dbm file to maintain state rather than keeping everything in memory. I guess nobody anticipated terabyte-sized disk volumes being used with 32-bit processors.

tech | Permanent Link

Taxes Kill Productivity

Cantillon's Paradise points to an AP story which says that Americans spend 6.6 billion hours on their taxes. It's rather ridiculous the lengths a citizen must go to in order to comply with the law. Luckily, our civil servants are working to resolve this issue.

Sensitive to the demands that tax laws put on weary taxpayers, the IRS has seven people working full time to reduce the anguish for filers. The IRS Office of Taxpayer Burden Reduction looks for requirements that can be streamlined, reduced or eliminated under the law.

Of course, there's only so much they can do considering the amount of tax law that are in charge of enforcing. Congress is responsible for the mess.

I've probably spent at least 60 hours on taxes so far this year, mostly reading IRS publications, including best sellers Business Expenses, Business Use of Your Home, and the much referenced tome, How to Depreciate Property.

My wife recently decided to change her major to accounting. I think I have the perfect internship for her.

business » taxes | Permanent Link

Pricing That Doesn't Make Sense is Annoying

Seth Godin is trying to make a point about how people act differently when on camera.

Odd segue: Today, in anticipation of a dinner party, I stopped at a lobster seller in Chelsea Market in NYC. I asked for a six pound lobster. The pricing at the store is $9.95 a pound for small lobsters and $8.95 a pound for lobsters six pounds and up.

The lobster weighed (I'm not making this up), 5.97 pounds. For reference, that's just less than a pound by the weight of a penny. Feed the lobster a plankton and it would be six pounds.

He started to ring me up at $9.95 a pound. I pointed out the price breakdown and the guy shrugged and said, "It doesn't weight six pounds."

Two co-workers came over and with precisely the same uncomprehending grin, repeated his point. I added a penny to the scale but they weren't swayed.

So, the two questions are, "Do you think the owner wanted them to act this way?" and "Would they have acted differently if they were on camera?"

Maybe because it's obvious, but he doesn't mention the absurdity of the pricing scheme. The price for the lobster should, of course, be something like $9.95/lb for the first pound and $8.95/lb for each additional pound. Damn, it's annoying when you run into companies that have stupid pricing.

Mark Hurst describes a conversion with a Dell sales rep in which the sales rep explains that a computer without a monitor costs $400 more than the same computer with a monitor.

business | Permanent Link

What To Do With The Big Moo?

The two books by Seth Godin that I've read, Purple Cow and The Big Red Fez, were both good. So, when Seth announced The Big Moo on his blog, I was excited about getting my hands on it. The Big Moo is a collaboration between Seth and 32 other business writers, with each writing contributing a chapter on how to make your business remarkable. As an interesting marketing idea, galleys (pre-release) versions of the book were offered in boxes of 50 for $2 each ($100 per box). Their goal was to get word of the book out early so big companies would buy truckloads of the book for their executives.

Back in 2000, the president of BNW bought everyone a copy of Tom Peters's The Professional Service Firm 50. The Big Moo is a similar type of book, but without the annoying typography (lots of different font sizes, bold, exclamation points, etc. I hate the style of writing in Peters's book. If you need to trick me into getting excited about your writing, you haven't written a very good book. Get me thinking, and I'll be excited.) It's not that it's a bad book, but it definitely under-delivers. Each of the authors contributed a single chapter, and most "chapters" are two or three pages long. It feels like you're reading a brain fart that the author couldn't bother to think through fully.

It's definitely not the type of book that forever changes your thinking: it wouldn't be included in a personal MBA list. So I'm not sure what I should do with 48 unread copies of the book (I did give one copy away). I can't give it to people saying, "You have to read this!" And I don't really want to give it someone and say, "Here's an OK book you might want to read if you don't have anything better to do."

If you want a copy, let me know. Some other readers enjoyed it more than I did. Meryl at Blogcritics.org gave it a decent review.

The book does what it sets out to do: motivate the reader to get out there to put ideas to work to develop a remarkable organization that gets everyone buzzing.

As does Jack at 800-CEO-READ. Though he seems to like the book mostly because the proceeds go to charity. That's not a very good reason to read a book. You'd be better off giving the money directly to charity and avoiding the printing costs.

Update (10/10/05): I managed to unload two copies. Thanks, Heather!

Update (10/18/05): John, who also took a copy off my hands wrote up a review on his blog.

business » marketing | Permanent Link

Sun, 03 Apr 2005

3ware 9500 Notes

I recently upgraded a Pogo Linux StorageWare server. The server came with a 3ware 8506-8 SATA controller and 7 250 GB drives which we have configured in a RAID 10 array with one spare (the OS is on a separate 80GB drive). The server has 16 drive bays in total, so we decided to buy a second controller and 7 more drives to be configured in another RAID 10 array with one spare.

I had a couple problems getting the new card working. First, I had to upgrade the kernel to get the 3w-9xxx module. The Debian package for 2.6.10 worked. The next problem was using the 3ware management utilities. 3ware provides two utilies, a command-line one called tw-cli, and a web-based interface called 3dm2. According to their web site, the "in Engineering Phase" software should be used with a 2.6 kernel. When I tried using the software though, both tw_cli and 3dm2 reported "Application too old for controller firmware". I contacted the always helpful Pogo support folks who advised me to use version 9.1.5.2 of the 3ware software, which is a released version. The 9.1.5.2 software was able to detect the 9500, but not the 8506, so I tried version 9.2 which was able to access both. So it seems that "in Engineering Phase" means outdated as it's older than the released version.

Having gotten the 3ware software working, I was able to create and delete arrays from within Linux rather than having to use the BIOS utility. Then I could benchmark various RAID configurations. I tested RAID 10, RAID 50, and RAID 5 with 6 drives and with 7 drives. (RAID 10 is striping across mirrored sets of disks and RAID 50 is striping across RAID 5 arrays) In any configuration, the 9500 blows the 8506 out of the water. I ran my benchmarks using bonnie++. With RAID 10, I was able to get about 170 MB/s write speeds and 185 MB/s reads. Setting a large read-ahead value of 16384 (blockdev --setra 16384 /dev/sdc1) significantly improves read performance so I will have to tune it for the best performance once we put the new drives into production. Striping across 2 3ware RAID 5 or 3 RAID 1 arrays using LVM gave almost as good performance as RAID 50 and RAID 10 3ware arrays, respectively.
With RAID 5, using 7 drives in the array rather than 6 gives better read performance, but poorer write performance. The additional drive also seems to adversely impact file creation and deletion speeds.

XFS seems to give the best overall performance. Ext3 gives good read performance, but mediocre write speeds. Reiserfs is very fast at creating and deleting files, but doesn't give as good throughput.

tech | Permanent Link

Scary Housing Numbers

(Via Housing Bubble) LA Times has a story about the increasing popularity of interest-only mortgages. An astonishing 47.8% of homes sold last year in California were purchased with interest-only, adjustable rate mortgages. In 2001, it was 1.4%, and I'd bet that almost all of those were purchased by investors who wouldn't be holding the property very long.

Many of these people are buying with no money down so when interest rates rise and they can no longer afford their mortgage payments, there's no disincentive to simply walk away from the property. You don't need to have very good credit to buy a house these days; what's a little bankruptcy blemish on one's credit report.

"I have $40,000 in student loans from my master's degree," Herron said. "I have high credit card debt. I'm a typical American. And yet they wanted to give me more debt to buy a house."

She wonders sometimes if she'll end up in foreclosure, if the bank will take her beloved home away from her when she can no longer pay her bills. Maybe it was a mistake to give her this money, maybe it was a mistake for her to take it. But she wasn't about to protest.

"If you're like me, you're so incredulous that anyone would give you any money whatsoever, you just close your eyes and sign the papers," Herron said. "I would have signed anything."

business | Permanent Link

Housing Crash Links

I've created an rss feed of Patrick's Housing Crash links. Many of the links don't make it to his blog.
Subscribe here

business | Permanent Link

Mon, 21 Mar 2005

How You Like Them Apples?

Five Apples

  1. I can't believe that once I've counted four apples, there are no more apples.

culture | Permanent Link

Quasar for Accounting

I decided to use Quasar to do my accounting. It's a huge improvement over GnuCash. Almost all of the fields have tab completion. For example, to create an invoice, I type the first few letters of a companies name, tab, and it fills in the company name and address. This works for accounts, tenders, and pretty much anything that is stored in another table.

I'm still learning how to use everything, but it's very well thought out. Initially, I didn't realize I could create a sale by entering the tender (Visa, American Express, etc.) on an invoice. I was creating an invoice, then a payment against the invoice, which took me a lot longer. I still need to figure out how to make invoices default to Account type rather than Item.

The account reconciliation feature works great. It helped me track down a transaction for which Authorize.Net didn't send me a receipt email.

Quasar has a ton of features related to running retail stores. I don't need to deal with multiple stores and cash registers, but it's great that it's there if I ever open up that pub.
Some of the cool features that I'll actually use include:

Quasar has a good chance of becoming the de facto accounting package in the open source world.

business » accounting | Permanent Link

Bow and Arrow Taxes

All of the archers out there will be happy to hear that the Arrow Tax has been repealed. Alas, the Bow Tax still applies.

Bows

The 11% tax on bows will apply to bows having a peak draw weight of 30 pounds or more. This replaces the current law which applies to bows having a peak draw weight of 10 pounds or more. Broadheads suitable for use with certain arrows will be taxed as a part and accessory at the 11% bow tax rate. The effective date for both provisions is for articles sold after November 21, 2004.

Repeal of Arrow Tax

The tax on arrows that was in effect for arrows sold after November 21, 2004, and before December 23, 2004, has been repealed. The rules used prior to November 22, 2004, for arrow components still apply for the 4th quarter of 2004. Any tax that was imposed by the manufacturer, producer, or importer on arrows after November 21, 2004, and before December 23, 2004, may have to be refunded to the purchaser. See Changes Effective for the Second Quarter of 2005 for details on the tax on arrow shafts effective after March 31, 2005.

How much are we paying the members of Congress to make these laws? (Hint: It's less than $155,101)

Update: Unfortunately, those arrows aren't really tax free. Beginning March 31, there will be a tax on the arrow shaft.

business » taxes | Permanent Link

Sat, 19 Mar 2005

Bums Can't Work, Silly

Neville has a couple ideas for how to make a little money without spending much money.

1.) Sell Water. That's right. Buy a 24-pack of bottled water, ice it, then sell on a hot day. Your $3.00 investment has turned a $21 profit in a small amount of time. This may seem like something only a bum would do, but trust me, you will learn more from this experience than in any marketing class. Water can be substituted with soft drinks, hot coco etc.

This sounds like a good idea. Just go buy some water and sell it. You'll be in business in 15 minutes. On the way to the park, just stop off to get a Business License, Seller's Permit, and Sidewalk Vending Permit. Here's a list of the other licenses and permits you might need to be in the Bottled Water or Sidewalk and Street Vending industries. Of course, if you don't live in California, it might not be so easy to get your business started because, as Governor Schwarzenegger says, California wants your business.

business | Permanent Link

Fri, 18 Mar 2005

Fed to Inflate Overseas

Tim, over at The Mess That Greenspan Made (my favorite economics blog by a non-economist), has compiled a good summary of the responses surrounding the Fed's notice that they're going to stop reporting M3.

If this comment is accurate, it's pretty interesting:

Perhaps you should wonder why even U.S. based contractors are being paid with suitcases of $100 bills, when they would prefer the payments be made by direct deposit to their U.S. account.

Buy gold.

business | Permanent Link

The No-MBA Book Club

Seth Godin says that, in many cases, an MBA is a waste of time and money.

The fact is, though, that unless you want to be a consultant or an i-banker (where a top MBA is nothing but a screen for admission) it's hard for me to understand why this is a better use of time and money than actual experience combined with a dedicated reading of 30 or 40 books.

Not having been to business school, unlike Seth, it's hard for me to judge. I'm a big fan of book learning, but not school. I read two or three books per month. Recently, I've been reading more investment related books than business books. [Currently, I'm reading When Genius Failed and Conquer the Crash.]

Seth didn't list the 30 or 40 books to read, so Josh Kaufman picked up the thread. I'm surprised at how many books are on there that I haven't read. He has Guy Kawasaki's Art of the Start in there. The only Kawasaki book I've read is Rules For Revolutionaries which was hard to take seriously considering he added footnotes containing URLs for every company mentioned in the book. The one valuable lesson that I took away from the book was "Judge your results and other people's intentions" rather than vice versa.

There are a couple of books conspicuously absent from Josh's list.

I'd probably also include Differentiate or Die and The Discipline of Market Leaders. I haven't found an "A Ha!" marketing book yet, but these two books both have good ideas. The premise of the former is that there must be something that differentiates your company from competitors. The author gives a few examples of ways to differentiate. The first is having your company's product or service associated with a specific attribute the way Volvo is (was?) associated with safety. The goal is to have your customers think of your company when they think of the attribute. Other attributes might be reliability, speed, spiciness, or indestructibility. Other ways to differentiate suggested is specialization and having a "secret ingredient". Interestingly, customers don't need to understand what the secret ingredient is or does. The author used the example of Sony's Trinitron. Customers want it, but what the hell is it?

The Discipline of Market Leaders breaks successful companies into three groups.

  1. Operationally Efficient - companies that develop very organized systems to run with the utmost efficiency, e.g. Walmart and McDonald's
  2. Product Innovators - companies that that constantly invent new things, e.g. Sony and 3M
  3. Customer Intimate - companies that go out of their way to do whatever it takes to make their customers happy, e.g. Ritz Carlton and Nordstrom's

Our goal at Postica is to be operationally efficient.

Update: There should really be an accounting book included. Accounting the Easy Way is fantastic. I wish I would have read it years ago. Before reading any books on investing (fundamental analysis), you should learn at least as much accounting as is covered in this book. I convinced a women at Border's who was wanting to learn bookkeeping to buy this book.

business | Permanent Link

Mon, 14 Mar 2005

Fixing Web Sites with Javascript

Hat tip1 to John Battelle for pointing out Greasemonkey, a Firefox plugin that allows you to run Javascript scripts on arbitrary sites to improve their appearance or usability.

The one script I find most immediately useful is one that fixes some deficiencies of Allmusic. Allmusic is a fantastically useful site, but since it's redesign, it has the annoying trait that every biography is truncated and ends with a Read More link. The script replaces those links with Javascript links that pull in the full biography using XMLHttpRequest. It is remarkably fast considering how sluggish the site often is in general.

1. John must get a lot of hat tips considering he has the number two result on google for hat tip on a page for which the term only appears in links to it.

tech | Permanent Link

Blosxom Static Rendering with Writeback Plugin

This site runs on a poor little Pentium MMX 200, so the performance of Blosxom, the software that drives the site, isn't very good. Luckily, Blosxom has a static rendering mode which allows Apache to serve flat html pages. In order to use the writeback plugin, though, POST requests to trackback an entry or post a comment must be handled directly by Blosxom.

So I set up Blosxom in a hybrid manner where new entries are rendered statically every 15 minutes, and the entire site is re-rendered every two hours to bring in comments and trackbacks to the flat pages. All POST requests are handled by Blosxom, as are requests for pages which haven't been pre-generated yet. I can also temporarily disable static rendering if I want to preview a new post without it showing up on the index pages.

My crontab

*/15 * * * * test -f /usr/local/www/xn.pinkhamster.net/.gen && /usr/lib/cgi-bin/blosxom -password=xxxxxxxxxxx -quiet=1

# regenerate all pages to pull in comments
15 */2 * * * test -f /usr/local/www/xn.pinkhamster.net/.gen && /usr/lib/cgi-bin/blosxom -password=xxxxxxxxxxx -all=1 -quiet=1

I can remove the .gen file and preview an entry by going directly to the entry's URL.

Apache Rewrite Rules

RewriteCond %{REQUEST_METHOD} !^POST [NC]
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{DOCUMENT_ROOT}/static/$1 -f [OR]
RewriteCond %{DOCUMENT_ROOT}/static/$1 -d
RewriteRule ^/blog(/?.*)$ /static/$1

I test for an empty query string so that Blosxom will handle the request when I want to enable autotrack. Also, if I want to preview changes to an entry that has already been generated, I can just tack something on to the query string.

It looks like this is similar to Rael's setup, but he only serves the statically rendered index pages directly from Apache and has Blosxom handle all individual entry pages.

tech | Permanent Link

"I Refuse Your Business"

There's a story on CNN Money about some dude that makes t-shirts who refuses to sell them to Wal-Mart. There's no indication in the story that Wal-Mart wants to buy his t-shirts, which apparently feature naughty words and poker-related imagery. Good job in the publicity department, Mr. Carlton.

business » marketing | Permanent Link

Finished 1120S

I finally finished the federal corporate taxes for Postica, the 1120S and related forms and schedules. It took a long time, but less than the 184 hours that the IRS estimates. Seriously, the IRS estimates it will take more than one man-month to file just the 1120S and K-1.

I filled out the return by hand first, and then copied the information into Taxsoftware.com's forms. Their software is very minimalist, especially compared to TaxAct which I've been using for years to do my taxes, first their Windows version, now the online version. The Taxsoftware software is a bunch of Java applet forms which, once completed, are used to generate a PDF form of the tax forms. Unfortunately, I couldn't figure out how to fix the background color of selected fields so I had to fill out each field blind, then remove focus to verify that I had entered the correct value. I tried changing a bunch of X resources to get the color to change, but was unsuccessful.

I'm almost done with the California return, 100S, too. Luckily, it's mostly copying data from the federal return. I do have to keep a separate depreciation schedule though since California doesn't allow the 50% bonus depreciation.

business » taxes | Permanent Link

Sleazy Used Car Sales Tactic

I received an advertisement in the mail from Superior Nissan of Mission Hills, located in Mission Hills, California. The return address on the envelope identified the sender as GM Notification Sender for some reason.

As part of their used car sales promotion, they claimed to be giving away some prizes. In the envelope was a card with two scratch-off numbers. If the numbers match, you're a winner of one of five prizes. The prizes are A) an XBox or PlayStation 2, B) a $500 gas card, C) a $1,000 shopping spree, D) a 60" Wide Screen Color TV, and E) $15,000. They might as well have made a trip to Mars one of the prizes too.

I scratched off my matching numbers, but of course, it doesn't say which of the fabulous prizes I've won. Instead, it tells me to call an 800 number to set up an appointment to pick up my prize at the dealership. If you're clever, you may have already figured out the scam. Here's what the small print says:

...the odds of winning prize A, B, D & E are 0:10,000, prize C is 10,000:10,000.

Everyone gets the "$1,000 shopping spree" on goshoppingmall.com which charges an outrageous amount of money in shipping and handling fees, generally between 40% and 60% of the price of the item. How slimy.

business | Permanent Link

Renting Cheaper Than Buying

NPR picked up The Economist's story about it now being cheaper to rent than buy in many markets.

(Via patrick.net)

business | Permanent Link

Sun, 13 Mar 2005

New Mattress is Alright

After a couple weeks on the new mattress, I decided that I like it. I no longer feel like I'm sinking into the mattress, and while I sleep on my side and stomach, it is very comfortable when lying on my back too. So, the Novafoam mattress gets a thumbs up.

misc | Permanent Link

Smith Barney is Silly

After Apple's recent run up to almost $70 a share (over 10% since I sold half my shares 10 days ago), Smith Barney downgrades AAPL to hold, advises selling, and at the same time, increases their 12-month target to $75.

"Despite the fact that we are raising our target multiple on calendar 2006 operating earnings this morning from 26 times to 29 times, we cannot justify more than a $75 fair value in 12 months. And while this suggests another 10% upside from current levels, we can no longer recommend that medium- to long-term investors place new money into the shares," the brokerage wrote.

The downgrade occured today when the stock opened at 66.13. A 13% increase within 12 months seems like a good investment. So what should investors do, Smith Barney? Hold, sell, or buy this undervalued stock?

business | Permanent Link

Getting a Toll-Free Number

We're getting business cards printed for Postica so we decided to get a toll-free number to put on them. It will be good to have on the web site too, since we currently just have our support email address.

A search on Google for 800 number or toll-free number brings up a ton of ads. We went with GotVMail because the price is good and we were able to sign up online in about 10 minutes. We didn't have to talk to a salesperson or fax any forms like other companies require. We're paying $9.95/month plus 7.4 cents/minute. If we start getting a lot of calls, we can start buying blocks of minutes for about 5 cents/minute.

business | Permanent Link

Thu, 03 Mar 2005

iPodder on Debian

I still don't quite understand what all the hoopla around podcasting is about, but since KCRW started offering feeds of their programs, I thought I'd check it out. I don't have an mp3 player, so I was thinking I might listen to some programs while working or listen to them through my Tivo.

I downloaded an RPM of iPodder, converted it to a Debian package using alien and installed it. It looks like it requires wxPython 2.5 so I installed the libwxgtk2.5.3-python package. Since I also have wxPython 2.4 installed, I had to update /opt/iPodder/iPodderGui.py to use the right version. Here's the diff:

--- iPodderGui.py.orig  2005-03-03 11:28:58.000000000 -0800
+++ iPodderGui.py       2005-03-03 11:29:06.000000000 -0800
@@ -1,3 +1,5 @@
+import wxversion
+wxversion.select('2.5')
 import wx
 import wx.xrc as xrc
 import  wx.lib.filebrowsebutton as filebrowse

I still don't see what's so great about this. I'd be happy if straw supported enclosures so I could just download the mp3s from there.

Update: Mostly as an exercise, I've created a Debian package for iPodder.

tech | Permanent Link

Tue, 01 Mar 2005

First Night on a New Novafoam Mattress

We bought one of those memory foam mattresses, a Novafoam one from Costco in particular. Buying a mattress sucks. We went to bunch of different stores and looked at pretty much all of the different types of mattresses out there.

We live in a small apartment with only room for a full-sized bed so we didn't want to spend a lot of money on a mattress because we'll probably buy a queen or king in a couple years. We've been using a futon mattress that's about 4 years old. It was great when I bought it, but now, the middle of it has been compressed to about 25% of its original thickness making it not very comfortable.

First, we went to Robinson's May and Sear's in the Northridge mall. The mattresses at Sear's were filthy so I couldn't get Denisa to try many out. Plus the sales guy yelled at potential customers, "Don't do that! Never do that!", as they were touching the mattresses. "Never just touch the mattress. You have to lie down on it."

Robinson's May was much nicer, but after lying on a couple mattresses, I was ready to call it a day. I thought it was just the clothing, but everything in the mall sucks the life out of you. I don't know how I spent all those days after school during my junior-high years wandering around the Del Amo mall. We stopped by the Select Comfort store before leaving. They are the ones that make those "sleep number" air mattresses. The beds were pretty comfortable, but the sales guy was too pushy, telling us how important it is to get a good night's sleep. Duh, that's why we're shopping for a bed. Plus, the fact that they charge $200 to add the digital remote control that shows the sleep number instead of the remote without an LCD display pissed me off. Not that I'd need it, but I just think that's ridiculous. But I guess the marketing ploy works for them. The sales guy did tell us that we should try the Tempur-Pedic mattresses.

Tempur-Pedic's gimmick is that their memory foam was developed at NASA. We tried it out at a mattress warehouse store and it was very comfortable. At around $1,300, we passed. The mattress warehouse place actually had the type of mattresses that I had been looking for all along. Denisa's mattress from childhood is about 20 years old, made from foam, and is still in great shape. It's nice and firm and hasn't lost its form at all. If communists were making such mattresses 20 years ago in Czechoslovakia, surely they must be available in the U.S. Well, this store did have some foam mattresses, latex and polyurethane, but they cost as much as an inner spring mattress. Our search continued.

We went to Costco to see what they had. They have good old-fashioned Sealy Posturpedic mattresses, but they didn't have the firm ones in the store, just a softer one. And they only had queen and twin. We could have ordered the firm full-size one, but we couldn't test it out first. We would have to make a decision by touching a dirty one-foot square sample.

So we decided to buy the Costco version of the memory foam mattress online. It's made by a company called Sleep Innovations. I figured it would feel similar to the Tempur-Pedic one, and if it weren't comfortable, Costco will take anything back.

It arrived yesterday. It weighs about 80 pounds and comes in a box. Within the box, the mattress is folded up in a vacuum sealed bag. The instructions say to let the mattress decompress for 24 to 72 hours, but by the time we were ready for bed last night, about six hours after I removed it from the bag, it looked like it was ready. It's 12 inches thick, putting us at least 8 inches higher off ground than we were before.

Unfortunately, I didn't sleep very well last night. I woke up at around 4am and had a hard time getting back to sleep. It felt like my pelvis was sinking too deep into the bed. Denisa loves the new mattress, mostly because it's much warmer than the futon. I'll have to give it some time. Hopefully, I'll get used to it.

Update: After a couple weeks, I've decided I like the mattress. For some reason, my old feather pillow seems inadequate though. I'm tempted to get some of these fancy Novafoam pillows to go with the mattress, but $100 each seems pretty steep.

Update (11/12/2008): Three years later, we're still happy with the mattress.

misc | Permanent Link

MySQL with SSL on Debian

Due to licensing issues, the Debian packages for MySQL are not built with OpenSSL support. In order to enable SSL, the packages must be recompiled.

server:/usr/src# apt-get build-dep mysql-server
server:/usr/src# apt-get install libssl-dev
server:/usr/src# apt-get source mysql-server
server:/usr/src# cd mysql-dfsg-4.0.23 (or whatever version you're building)
server:/usr/src/mysql-dfsg-4.0.23# vi debian/rules

Change --without-ssl to --with-ssl.

server:/usr/src/mysql-dfsg-4.0.23# vi debian/changelog

Add an entry to the top of the changelog.

mysql-dfsg (4.0.23-4-zerolag-1) unstable; urgency=low

  * Compile with OpenSSL support

 -- Christian Warden   Fri, 25 Feb 2005 12:32:05 -0800

Then build and install the packages.

server:/usr/src/mysql-dfsg-4.0.23# ./debian/rules binary
server:/usr/src/mysql-dfsg-4.0.23# dpkg -i ../*mysql*.deb

If you already an SSL certificate that you're using with mod_ssl, you can use that. Otherwise, generate a new key and certificate. See /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt.gz for information on how to generate a self-signed certificate. Add the key and certificate to /etc/mysql/my.cnf.

[mysqld]
...
ssl-key=/etc/mysql/server.key
ssl-cert=/etc/mysql/cert.key

Create a user in MySQL that requires SSL encryption.

mysql> GRANT ALL on db.* to user@10.0.0.10 IDENTIFIED BY 'password' REQUIRE SSL;

Now, you should be able to connect over SSL. Remember that the client must have been compiled with SSL support too. In order to use SSL, the client must use the --ssl-ca option, either on the command-line or in ~/.my.cnf (or [mysql] section of /etc/mysql/my.cnf).

client:~$ mysql --ssl-ca=/dev/null -h server -u user -p 

As far as I can tell, there's no way to actually force the client to validate the servers certificate so it doesn't matter what value you set for ssl-ca. It doesn't even have to exist. This, of course, means that while the connection is encrypted, it's vulnerable to man-in-the-middle attacks.

See /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt.gz if you want to use client certificates to authenticate clients rather than, or in addition to, passwords.

Update: I originally forgot to note that you should update the changelog before building the packages.

tech | Permanent Link

Mon, 28 Feb 2005

mutt-ng

It looks like mutt development is starting to pickup again. For those not familiar with it, mutt is the best email client out there. Development has forked and there is a new mutt-ng project. Kyle Rankin has written up a little summary. So far, it's mostly just integration of many of the third-party patches that have been available for a while. Since the Debian package includes many of these patches already, including one of the most important, header caching, that's not too exciting.

Two of the new features included in mutt-ng are a sidebar and nntp support. The sidebar is similar to those in most gui mail readers which shows the number of messages in the folders in your mailboxes. With pager_index_lines set, mutt basically looks like a text-mode version of the common three-pane interface in most gui clients. I'll probably unsubscribe from the exim-users mailing list once the newsreader works since I can just read the gmane group. Right now, trying to read a usenet message causes a segfault unfortunately.

mutt-ng seems a bit slower too. Returning from the pager to the index takes an extra second or so.

Debian packages for sid are here:
deb http://people.debian.org/~nobse/debian/ unstable/

tech » mail | Permanent Link

Show stdin in a Web Browser

This is brain-dead simple, but useful.

For example,

$ pandoc example.rst | stdin2www

tech | Permanent Link

Sun, 27 Feb 2005

In Bubble Wrap Champ

I'm an In Bubble Wrap champ! I love free books, and today I got my first free book from In Bubble Wrap, Creating Customer Evangelists.

In Bubble Wrap is an advertising program run by 800ceoread in which you can win free business stuff, mostly books, every day. Thanks go to Seth for the head's up.

In other free book news, I have Paul to thank for a free copy of The Number. I haven't finished reading it yet, but so far it's pretty good. The Number, by Lee Eisenberg, is about the amount of money you need to retire, and discusses the ways different people think about the Number. The book is targeted to those in their 40s and 50s getting closer to retirement who, for a variety of reasons that Eisenberg investigates, don't know what their Number is, but it's a worthwhile read for those of us pushing 30.

Its discussion of retirement being a rather new concept is pretty interesting. One hundred years ago, most people worked until they died. Then, people started to live longer, get kicked out of their jobs, and die in poverty. Then came Social Security. Next up, long lives requiring savings somewhere north of -1.5% during the productive years.

business | Permanent Link

ChangeThis Gets Lazy

ChangeThis, the publisher of cool little "manifestos", has gotten lazy with their latest batch. ChangeThis manifestos are digital pamphlets that focus on one specific topic. They usually short enough to read in one sitting, but packed with more information than you can fit on PowerPoint slides (not that I encourage the use of PowerPoint). The format is similar to slides, but they are designed to look good both on the screen and printed out. What makes them special is the thought that has gone into the design, making them difficult to avoid reading once you have opened one up. The content is generally a call to action or the author's insight into their particular area of expertise.

For example, they've taken a number of Joel Spolsky's essays (which are already compelling reading) and formatted them as manifestos.

This week, they've released two manifestos which, as they'd say on Sesame Street, are not like the others. The first, Shhh!, contains little cards that can be printed out and given to annoying strangers talking on cell phones. The design is clean, and the idea is cute, if somewhat tired. It doesn't follow ChangeThis philosophy, though. There's no individual behind it and it's not presenting much of an idea other than not to be rude on one's cell phone.

The second misfit is called Two Tomatoes, and actually is some kind of manifesto telling consumers what kind of tomatoes to buy, I guess. I'm not really sure what the content is because it's not readable on my screen. Except for the cover page, it doesn't look like anything else that ChangeThis has released.

Here's a typical page from a manifesto:

And here's the tomato one.

business | Permanent Link

Sun, 20 Feb 2005

NyQuil > Robitussin

I've been sick with a head cold for almost a week. Following the sore throat, fever, and mucus flood, my cough set in a few days ago. Denisa bought me some Robitussin Honey Cough Syrup. It's supposed to work for 6-8 hours per dose, but I was lucky to get an hour of suppressed coughing out of it. Coughing all night does not make for a happy patient nor wife.

So last night I bought some NyQuil. Actually, I bought the Wal-Mart generic version. That stuff is fabulous. It stopped my cough, and I slept straight through the night.

If your stuck with the lesser cough medicine, you might want to chase it with a Tylenol, Sudafed, and a shot of whisky which should make up for the extra ingredients in NyQuil. (Note: I am not a doctor)

misc | Permanent Link

Fri, 18 Feb 2005

Where Google Sucks

I was trying to think of Suze Orman's name while composing an email today. I could picture her face, and I know she's a popular speaker and author on personal finance. So I tried searching for different combinations of "female", "financial advice", "speaker", "author", "personal finance", etc. That didn't get me anywhere, so I tried searching on Google Images and threw "blond" in there. No luck.

Eventually, I gave up and went to Amazon to look for personal finance books. None of her books were in the Most Popular list, but a picture of one of her books happened to show up in the Listmania! section on the right.

I'm sure all of those social network companies maintain the kind of metadata on individuals that would be necessary for this type of search to work, but it needs to be web-accessible, and I'm not sure who would maintain such data on third-parties who aren't part of the network.

As an aside, Google also needs to update their advanced search so that date searches can be more granular than the current past 3/6/12 months options. Remarkably, Bloglines doesn't even support date ranges. Luckily, Straw, my aggregator, does. That allowed me to quickly find a post I had read this morning about yet another new social networking company.

tech | Permanent Link

Sun, 06 Feb 2005

Excessive Gratitude or the Return of Written Correspondence?

Yesterday, I received a thank-you note from my friend, Mike. He hasn't recently gotten married, had a child, or had a birthday (at least, not that I know of). In fact, I hadn't bought Mike a gift for anything. He sent my wife and me a note thanking us for having him and his girlfriend, Lisa, over for dinner. It was a very nice note, but it seems completely unnecessary.

My mother always told me how important it is to send thank-you notes after receiving gifts, but I'd never heard of sending them after being invited to somebody's home. I would assume that Mike is just extremely polite, but his note was the second such note we've received in the past couple of months. After a little party we had, my friend, Meagan, sent us a similar note.

Did I miss a lesson by Miss Manners? Is American society becoming gracious? Or do people just want to take advantage of the fewer and fewer opportunities to actually use hand-written correspondence?

culture | Permanent Link

Thu, 27 Jan 2005

Humans Replacing Computers

My auto insurance company, 21st Century Insurance, has had a nice web site for quite a while which would allow customers to update their policies online. Last year, for example, I removed my wife's comprehensive and collision insurance since her car isn't worth much compared to the premium.

Today, I got my renewal notification email. The 6-month premium for our two cars is about $900. I only drive my car about one day per week now, and since we live two blocks from my wife's school, she drives less frequently than that. Therefore, it wouldn't be a catastrophe if one of our cars were totalled and we only had one car. So I'm thinking of dropping comprehensive and collision on my car which is costing me about $700 per year.

The 21st Century website has a nice interface where you can add and remove coverage, change deductibles, etc. and it will show you how much your premium would change. After you save your changes, they send you and updated policy and bill you or refund the difference. Today, I clicked on the Change Coverage button and got the following javascript pop-up.

So I had to start up the Live Chat applet to ask Patrick about my policy change and register my displeasure with the recent changes to his company's web site.



business | Permanent Link

Mises University 2006

I've been awared a scholarship by the Mises Institute to attend Mises University this summer. Mises U is a one week program in Austrian Economics. It should be very educational. I can't wait.

economics | Permanent Link

Sat, 15 Jan 2005

Learning Accounting

I've decided it's time for me to learn something about accounting. I've been using GnuCash for a while to generate invoices, but without understanding the underlying accounting. GnuCash has the tendency to break either when it or one of it's many dependencies is upgraded, crashing while spitting out errors like undefined symbol: gnc_option_db_lookup_taxtable_option. It also has a long-standing bug which causes invoices not be be printed correctly when linked against GtkHTML 1.0 as it is in the Debian packages. So I'm also looking for another accounting package to replace it.

Software

The first one I tried was Lazy8 Ledger, a java program. It's built as a plugin to jEdit making the interface kind of bizarre with text editing widgets where they don't seem to belong. In general, the interface just feels awkward, though with time, it might make more sense.

The next program I tried was FibuSQL. This program seems to be pretty immature and lacking much documentation. It claims to have been tested against MySQL and PostgreSQL, but the table creation script fails when using InnoDB tables.

Next up was SQL-Ledger. This looks very promising with lots of features and a clean interface. It has almost no (free) documentation though. The author sells the manual for $190. It looks like it generates nice-looking invoices and reports which is a plus. SQL-Ledger will certainly be a contender.

Next up is Quasar. It has lots of documentation and seems to be feature-rich. It's compiling now. (Tip for compiling on Debian: Install the libqt3-mt-dev package and set QTDIR=/usr when running configure.)

I also have a demo of Linux General Ledger, a proprietary ncurses-based application, to try out. It seems to be mature and well-documented. If it does what I need (I'm not sure exactly what that is yet), I'd be happy to use a mouseless program. Those Function keys are kind of far away for me, though. I'd prefer VI key-bindings. It's on sale for $29.95.

Accounting

Of course, to use any of these programs, I need to know something about accounting. The Lazy8 website directed to this great tutorial by Bean Counter Accounting. I finally understand debits and credits. I also picked up a book called Accounting the Easy Way which, 20 pages in, is good and reinforces what I've learned so far from the Bean Counter.

business » accounting | Permanent Link

Fri, 07 Jan 2005

Blacklisting Fax Machines

Fax machines hate me. I used to receive a few calls a week from fax machines on my land-line. Eventually, I Googled my number and found that it was listed as a fax machine for USC. I emailed the webmaster and got the number removed, but it didn't really end the persistent fax machines.

I moved a few months ago and was able to ditch the land-line. (My previous landlord had DirectTV dishes installed and cut the cable to the building making DSL the only affordable option for high-speed Internet access.)

Now, I've got a fax machine calling my cell phone and it won't give. It's calling me every 60 seconds and leaving me voice mail. Damn you, 818-783-7049!
Why isn't there a button on my cell phone to block all calls from a number?

tech | Permanent Link

The state is that great fiction by which everyone tries to live at the expense of everyone else. - Frederic Bastiat