2007 Pittsburgh International Auto Show

Last night I went to the Pittsburgh International Auto Show at the David L. Lawrence Convention Center. I’ve been to the Washington Auto Show before so that was my main point of comparison. I was a little disappointed that more manufacturers’ sponsored vehicles weren’t there. For example, the year I went to the Washington Auto Show, Subaru has one of its actual rally cars on display.

All car manufacturers are prejudiced against tall people. There seems to be no correlation between the size of the vehicle and the amount of room inside. For example, the driver’s seat in the Mini Cooper was surprisingly nice, but the back seat in an H2 was tight.

The best thing I found at the auto show was that an auxiliary audio input is becoming standard equipment on a lot of cars. This seemingly trivial feature makes life a lot easier since, e.g., my cell phone, iPod, and laptop all have audio out.

I found a serious lack of availability in manual transmissions. Is America really so lazy that they’re willing to spend $100,000 on a sports car with an automatic? It’s just depressing.

I was also disturbed by the abundance of electronic door latches. Am I really supposed to drive around in a vehicle that locks me out if the battery dies? There was a corvette with this feature! I can at least understand the argument in mini-vans where the doors themselves may also be motorized to aid in accessibility (little kids and the elderly).

Not that I’m stuck on door latches, but most of them were pieces of crap. I’ll be very surprised if any of them last more than 10 years.

Finally, open the hood on just about any new vehicle and you’re greeted by a big piece of plastic. WHY? Does it help keep some mystical crud off the engine? People who open hoods want to see an engine!

Other observations are that many companies seemed unwilling to put in the effort to power the electronics in their vehicles while they were sitting on display. I.e., the batteries were disconnected. Clearly the vehicles with electronic door latches needed to be powered, but it wasn’t much fun to sit in the other cars when nothing works. Some manufacturers had little power supplies / battery chargers connected up.

I was impressed with the Toyota Tundra. The interior seems to be well thought-out and it was pretty spacious for my tall self.

Conclusion: not exciting at all.

Dreaming in Code by Scott Rosenberg

I have recently read “Dreaming in Code” by Scott Rosenberg. The book actually has a website.

I read this book because I thought it might explain the challenges of doing software in a way that some “regular people” in my life might find approachable. I still believe that to be true.

I liked this book, as it goes into great detail about an ongoing software project today. It helps to connect programs on a computer with the people who actually create them, and the kinds of problems they have in doing so. The project described in the book is called Chandler, which is named after a dog, and has nothing to do with Friends (good thing; I nearly stopped reading!). I also liked the book because it describes a lot of historical events in the computing industry.

I haven’t actually installed or used Chandler yet, but I might. Thunderbird 2.0 is supposed to integrate with Google Calendar though, which will solve a lot of my problems.

Internet Connection Sharing for Linux

The world is slowly becoming a better place, and so today I thought that perhaps the right-click-to-share-my-internet-connection reality had come to Linux. I.e., I was in no mood to manually setup IP Masquerading and a DNS cache and a DHCP server on my Linux box.

I found no useful articles. I swear every one of them was written before Linux kernel version 2.6 was even introduced. Anyways, I use Debian, and I figured out there exist two wonderful packages: ipmasq and dnsmasq.

aptitude install ipmasq dnsmasq

It is then necessary to edit /etc/dnsmasq.conf to enable its built-in DHCP server. That file is well-commented; you shouldn’t have much trouble figuring it out. Note also that dnsmasq keeps current leases in /var/lib/misc/dnsmasq.leases by default. This is configured in /etc/dnsmasq.conf with the dhcp-leasefile directive.

Also, if ipmasq gives you a hard time about your kernel:

FATAL: Module ip_tables not found.
iptables v1.3.6: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

…then you need a kernel with ip_tables support. Here is a Gentoo wiki page about building a kernel with iptables support.

UPDATE 2009.03.20

Here’s the kind of idiot’s guide I like to find: ConnectionSharing.

UPDATE 2010.02.17

It seems that a package called firestarter available for both Debian and Ubuntu (and more) also has a fairly painless point-and-click sharing option, but it sounds like having this peacefully coexist with a more sophisticated DHCP setup on the internet network could get painful.

Multi Precision Integer / Crypto libraries

More libs exist than I previously realized. Here are some:

OpenSSL – Everybody knows this one.
GNU Multiple Precision Arithmetic Library (GMP) – Big, but fast.
XySSL MPI (Bignum) source code – Very portable, pretty fast.
MPI: Arbitrary Precision Integer Arithmetic
Arjen K Lenstra’s Long Integer Package
libgcrypt – based on GnuPG code

Also relevant is this page listing Free systems and libraries for doing number theory and computer algebra

Fixing up scanned PDF files

I recently wanted to scan part of a book, and my lab has a machine that can auto-feed pages and email out a PDF file. Thus, I photocopied the relevant pages from the book, and fed them into the PDF-making machine. The problem is that the process of photocopying the book pages introduced a bunch of ugly black regions around the interesting text, and even that text has a tendency to be off-center and even rotated slightly. I fixed it using a combination of Acrobat Professional, Photoshop, and Illustrator.

Supposedly, Acrobat Professional will let you edit a page as an image directly by selecting the “TouchUp Object” tool from “Tools -> Advanced Editing”, clicking the page of interest, then right-clicking and selecting “Edit Image”. However, for me this results in an error message: “Could not complete your request because a color was specified using an unsupported color space”. My good friend Google told me this is a bug, and that my color spaces are just fine, thank you. So, what to do?

I found this article on Adobe Forums, which proposes an alternative that worked for me. To summarize (actually, to be verbose, the Adobe Forums messages are hard to follow):

In Acrobat, select “Advanced -> Export All Images”. I selected TIFF as the output file format for no particular reason, but it worked. Once the images are all exported, quit Acrobat and fire up Photoshop. Open your new image files (recall that the open dialog box allows you to select multiple files), and fix them up. The pattern I got into which worked pretty quickly was to press Apple-+ to zoom to a comfortable level, select the region I did like, the press Apple-X, Apple-A, Delete, Apple-V. This cuts the interesting portion, selects all the rest, deletes it, then pastes the interesting portion back. It has the additional benefit that the paste operation by default centers the newly pasted object. Then, if rotation is necessary, rotate it using Edit -> Transform -> Rotate (this does the “right thing” because the paste operation created a new layer). Select Layer -> Flatten Image, then Save, and repeat for the other pages.

Once the images are all edited, it’s time to recombine them into the PDF. I used Illustrator to do this, as it has a feature called “Re-link”. Select Window -> Links to display the “Links Palette”. Use it to replace the image on each page with the appropriate TIFF file.

AuthUserFile vs AuthDigestFile

I recently did an `aptitude upgrade` and Apache 2.0.something got upgraded to 2.2.something. This broke one of my sites which requires SSL and a username and password. The error was something to the tune of “Invalid command ‘AuthDigestFile’, perhaps misspelled or defined by a module not included in the server configuration.”

Well, apparently the name of this directive has changed to AuthUserFile. At least, changing it allowed the server to start and the expected functionality returned. Hopefully it has not opened up a big gaping security vulnerability.

The Apache Wiki also has something to say about it.

Getting from .wps to .doc or .odt

I recently was given a document in MS Works format that I wanted to convert to something more modern and useful. On my system I had neither Works nor Word installed. This ended up requiring two steps in Windows.

The first was to install the free MS Word Viewer 2003. While its web page claims it can open Works documents, it cannot by default. You must then install the Works 6.0 Converter for Works and Word Users. Once this was done, the Word Viewer was able to open my .wps file. I simply did select all and pasted it into a blank OpenOffice document. I saved as .doc from Windows XP, and all was well.

Another option may be the new libwps, although I did not try it as the above option worked for me.