Sunday, December 11, 2011

Windows command line survival: findfiles, find+xargs's dim cousin

Sometimes, we have to use the Microsoft Windows cmd.exe command line. Maybe it's at a client site or on a user machine where installing PowerShell, Cygwin or Mingw isn't appropriate. Maybe you're on a domain member so locked down by group policy you can't do anything if you want to. Either way, you have to use cmd.exe, and you're swearing.

I find out about the odd useful command that makes the Windows shell more usable, and I'll be trying to post them here. The first is forfiles, a basic alternative to find -exec or find|xargs.

Bulk conversion of OpenType (OTF) to TrueType (TTF) or Type 1(PFA/PFB) fonts using FontForge

FontForge is a great tool for converting fonts. I needed to convert a lot of OpenType fonts to TrueType or Type 1 format to use them with Apache FOP, as FOP doesn't yet support OpenType fonts with CFF glyph formats. Doing the conversion in one FontForge script didn't work well, because (a) it leaked memory until it got OOM-killed and (b) it only used one CPU. So I wrote a helper shell script to control the job - posted here in case anyone else needs it later.

Wednesday, December 7, 2011

PostgreSQL: Great even when you can see the warts

I’m a very happy PostgreSQL user, and was interested to read a recent post by an MS SQL Server DBA advocating PostgreSQL.

This post is a response, enumerating areas where Pg may not be so hot after all. You might say it's my tendency to always see the negative, or perhaps it's just my desire to inform others of the downsides of something so the loud advocacy doesn't leave them feeling let-down when the reality hits. I'd like to think it's the latter. Telling someone how it is from the start is much better than showing them the rosy-goggles view until they're committed. So, from an enthusiastic PostgreSQL user who spends a lot of time helping out on the mailing lists, here's a list of some of the warts and quirks I'm aware of, so you don't have to find out about them the hard way:

This post is based on PostgreSQL 9.2. Each version improves a great deal, so don't be surprised if some of these issues are gone soon.