Life and code.
RSS icon Home icon
  • We Don’t Need No Stinkin’ Statues In The Capitol

    Posted on December 17th, 2010 Brian No comments

    In a move one might describe as “adding insult to injury”, or perhaps as “petty and dickish”, the House has graciously decided that the tax-paying-but-unrepresented citizens of the United States who live in the District of Columbia may place one statue in the Capitol’s visitor center, instead of the two that their own constituents receive. So now – assuming it even passes the Senate – we get to choose whether we want Pierre L’Enfant or Frederick Douglass to be placed in the hallowed halls.

    You know what? Fuck ’em. We should keep our statues. Put them up in some nice city-owned parks somewhere, preferably in neighborhoods that are in want of some good statuary. I would love to see Frederick Douglass in Civic Plaza in Columbia Heights, and it would be cool to walk by Pierre L’Enfant coming out of the Waterfront Metro station. The one place I don’t want either of them is in the halls of Congress. The mere thought of those slimy, un-American politicians who continue to deny their fellow citizens representation smirking as they walk by the one statue which they have condescended to allow us to give them turns my stomach.

    Accepting this compromise is a symbolic acceptance of our indentured status. It is a moral defeat, it is unacceptable, and we should reject it.

  • Living 64-bit: Search Filters for Windows

    Posted on November 19th, 2009 Brian No comments

    One of the greatest features in Windows Vista that carries forward to Windows 7 is the Windows Search-In-The-Start-Menu.  Just hit the Windows key and start typing, and voila! you are instantly graced with search results.  Suddenly desktop search is useful!

    Unfortunately, the utility of the search is greatly limited by whether or not an appropriate filter exists for a particular file type.  Windows ships with filters for various barebones formats, such as text files and web pages, as well as Microsoft Office documents (of course).  Though filters for some formats can be found on the web, normally it is the job of the installer to properly configure filters to handle the application’s file types.

    And herein lies the problem.

    You see, when you’re running a 64-bit OS, most application programs you have are actually running in 32-bit mode.  Why?  Well, from an end-user’s perspective of the application, there is usually no difference between 32-bit mode and 64-bit mode.  There are virtually no performance differences, no look-and-feel differences, and no functional differences.

    But from an application vendor’s perspective, 64-bit support requires often drastic API changes, as well as compiling, testing, and releasing a 64-bit version.  It’s a lot of work to support something that your customer probably won’t even notice, and that’s not to mention having to explain to a confused grandmother that she downloaded the 64-bit version for her 32-bit machine and could she please try again.  So for most application vendors, 64-bit is something only done when absolutely necessary, and thus most applications get released in 32-bit versions only.

    So back to search filters:  One of the gotchas of 64-bit is that you cannot load 32-bit libraries into a 64-bit process, and on a 64-bit machine, the Windows Indexing Engine is a 64-bit process.  Thus most 32-bit applications will be unable to properly install their search filters on 64-bit Windows unless they go out of their way to do so.  OpenOffice currently suffers from this problem, as does Adobe’s PDF Reader.

    Fortunately, it has been recognized as a problem, and applications are fixing it.  OpenOffice is supposed to have it fixed in version 3.2, and Adobe offers a free 64-bit version of their PDF filter.  And in the meantime, you can often find good filters for free on, or some for free and for sale on

  • Useful PDF ImageMagick Recipes

    Posted on May 6th, 2009 Brian No comments

    It turns out that ImageMagick is really quite good at reading, writing, re-arranging, and otherwise mucking with PDFs.  Unfortunately, you need to know the proper incantation, which can take much trial and error to figure out.  So, for my own future reference:

    Split A PDF Into Parts

    $ convert -quality 100 -density 300x300 multipage.pdf single%d.jpg

    The quality parameter is the quality of the written JPEGs, and the density is the DPI (in this case, 300 DPI in both X and Y).

    Join JPEG Parts Into A PDF

    $ convert -adjoin file*.jpg doc.pdf

    Rotate a PDF

    $ convert -rotate 270 -density 300x300 -compress lzw in.pdf out.pdf

    This assumes a TIFF-backed PDF. The density parameter is important because otherwise ImageMagick down-samples the image (for some reason). Adding in the compression option helps keep the overall size of the PDF smaller, with no loss in quality.

    Now, if I can just figure out how to make future me remember to look here…