I found some other pages on the Net that suggested using “lp” for the Queue Name, but that didn’t work. I finally ended up downloading the “How to install a LPR printing port on WinXP” document from the SMC support site, and that told me to use “LPT1″ as the queue name instead.

If you want to get real work done in an office with cubicles, you have two options: work at home, or come in early or late or on a weekend, when no one else is there. Don’t companies realize this is a sign that something is broken? An office environment is supposed to be something you work in, not something you work despite.

I’m not a hacker (not sure I ever was). I’m a manager. But I think Graham’s advice applies to me for completely different reasons. I speak very loudly when I’m on the phone (my parents do this too; I think it’s genetic) and it’s hard to remember to keep my voice down. And if my boss or one of my employees comes by and we need to discuss something sensitive such as a negative performance review or an internal transfer, shouldn’t we be able to have that conversation without needing to wander around the floor looking for an open conference room?

I had an office (and a really nice chair) back when I worked at Adobe. I liked it better.

I’ve never been a big fan of Hungarian notation for variable prefixes. I do think prefixes have a place; within a library all function names need to be prefixed with some short (3-6 char) name so it’s easy to see which APIs you’re using. I don’t see the point of decorating my variable names like pchFoo. Maybe because it’s too distracting to be constantly thinking of the Pacific Coast Highway.

I was cleaning out some boxes from my parents’ garage and found a bunch of 1.44MB floppy disks. Most of them were garbage, but I found one of them that contained a dotfiles.tar from October 1993. Here’s a few examples of the time-warp material I found inside:

.plan

I plan to make a more original plan someday.
Login: mradwin Name: Mike-bo Radwin
Directory: /thayer/hole-in-the-wall Shell: /vdub/pasta/sauce
Last login Mon Sep 27 on ttyp1 from timevortex.cit.brown.edu
Plan:
I plan to make a more original plan someday.

I think this was funny at one point in time. I’ve seen many examples of folks who added false finger protocol stuff to their .plan file to make you think that you were reading another entry, and it looks like I was part of the same big Unix inside joke. Apparently I also had an obsession with food; Hole In The Wall was one of my favorite sandwich shops in Providence and the Vee-Dub was the nickname of Verney-Woolley dining hall.

Looks like I had a buddy list of exactly two people. And that’s what bookmarks/favorites looked like in the pre-Web days.

.article

Newsgroups: tellink.general
Subject: c compiler
Summary:
Expires:
Sender:
Followup-To:
Distribution: local
Organization: tellink -- the final frontier
Keywords:
does cc use SYS V syntax only? because I was trying to compile something
that I wrote which conforms to ANSI C standards, using prototypes for
functions, and cc choked on it.
it also didn't like function(void), something that the wonderful product
turbo C++ absolutely loves.

An article I posted to an internal newsgroup of my ISP. Even 10 years ago I was a standards freak.

DBM-style flat files are great, but sometimes it’s hard to deal with binary formats. Being able to have data in a textual format can be very handy for transferring between different platforms, modifying in your favorite editor, crunching with standard tools like grep, etc. There are a couple of text-friendly DBM export out there, each with advantages and disadvantages.

Suppose you have a DBM hash that contains two key/value pairs like the following:

one=Hello

two=Goodbye

Good ol’ BerkleyDB comes with a utility called db_dump which lets you export a binary database to a text format and then use the equivalent db_load tool to import the data. It’s easiest to see your data when you use the -p option. Here’s a simple database with two records:

format=print

type=hash

h_nelem=5

db_pagesize=512

HEADER=END

one

Hello

two

Goodbye

db_dump is pretty easy to use as it is, but it becomes a little cumbersome when you’ve got non-printable characters to display (control characters, newlines, and anything that isn’t 7-bit clean). You end up with a dump that looks like this:

You don’t lose any information, but it becomes impossible to work with when you’ve got UTF-8 data and you want to be able to edit it in your favorite Unicode-savvy editor.

Perl hackers are probably familiar with Data::Dumper, which looks like this:

$VAR1 = {

'one' => 'Hello',

'two' => 'Goodbye'

};

Data::Dumper is easier than db_dump to use with your favorite text-centric tools, and it has the advantage that it keeps each key/value pair together on the same line (handy for grep). Unfortunately, it’s very Perl-centric; you’re intended to load the data by calling eval(). I suppose you could write a parser in C that understood that format pretty easily and you could use it in non-Perl programs.

On one of the mailing lists at work today someone mentioned the cdb constant database format. I took a look at the page and was amused to see the cdbdump record format. It’s an interesting alternative to db_dump’s format and works nicely with UTF-8.

+3,5:one->Hello

+3,7:two->Goodbye

It’s a pretty concise format, and it’s totally 8-bit friendly. The key and data may contain any characters, including colons, dashes, newlines, and nulls. As a consequence it’s very easy to write generators and parsers for this format, and they’re typically very efficient. Like Data::Dumper, it keeps key/value together on the same line.

One disadvantage of the cdbdump format is that it uses explicit integer lengths, so it’s not very friendly for editing data in a text editor (every change you make requires that you fixup the beginning of the line).

I’ve been seeing more and more bzip2-compressed files these days, and I want to be able to open these files in GNU Emacs without the need to decompress them.

About 10 years ago I copied someone’s ~/.emacs file and noticed some mention of a crypt++ module. I asked them what it did and they told me that it allowed them to view *.gz files in an Emacs buffer by doing the decoding on-the-fly. Combined with the built-in support for tar-mode, this is very handy.

I’ve been using it to browse *.tar.gz and *.tgz files since the emacs-19.34 days, but today I needed to view the source code of php-4.3.4.tar.bz2 and it didn’t work.

After a little bit of investigation, it turned out that the ancient version of crypt++.el I’ve been using for the past decade didn’t support bzip2 files. So I went and grabbed the latest version (2.92, released January 2003) and added the following 6 lines to my ~/.emacs file:

For the most part, blog comments have turned into a distributed link farm for perscription drug and porn websites. Instead of a vibrant community of ideas, about half the comments on my blog are a steady stream of Viagra, Propecia and Phentermine ads.

I’ve had enough of this crap.

Instead of disabling comments altogether, I have disabled HTML and URL auto-linking. I also updated my Individual Entry Archive template to use this tag instead:

<$MTCommentAuthorLink show_email="0" show_url="0"$>

(Another way to solve this problem is to replace the <$MTCommentAuthorLink$> tag with <$MTCommentAuthor$>.)

Now blog spammers can post to my site all they want (and they probably will continue to do so) but their links will be ineffective. Ha!

It looks like there are a couple of MT plugins (like Bayesian and CloseComments) which try to solve this problem as well.