Fazal Majid's low-intensity blog

Sporadic pontification

Fazal

The operating cost of a home server

Like many people, I keep a server running at home 24/7. In my case, it’s an old but relatively quiet Compaq Evo D315 AMD Athlon XP2000 PC with 1GB of RAM, 750GB total disk space and running Solaris 10. It serves as my personal email server (Postfix and Dovecot), to run Temboz, and miscellaneous auxiliary services like DNS, SNMP or being a staging point for off-site backups via rsync. All in all, very light usage, less than 5% average CPU utilization.

I have a Kill-a-Watt power meter measuring the load on that shelf, and the server, along with other devices on standby power, consumes about 160W. At PG&E’s marginal rate of $0.13 per KWh, that comes to $180 a year, or half the cost of the machine itself. I am thinking of upgrading to a machine with 6 750GB or 1TB drives in a 4+2 redundant RAID-Z2 configuration for reliable backups (the current setup runs on ZFS for snapshots but has no provisions for drive failure). I will definitely look at power consumption more closely in my decision process

Update (2007-08-25):

I ended up getting a Sun Ultra 40 M2 dual-core AMD Opteron workstation with 6 additional Seagate 750GB drives. It is remarkably quiet and consumes only 160W, which is pretty good since it does have 7 drives spinning inside. ZFS benchmarks at 160MBps sustained disk I/O…

MacWorld SF 2007 round-up

One of the perks of living in San Francisco is easy access to MacWorld Expo. I can literally see the Moscone center a mere two blocks from my new office window. This year’s show spanned both North and South halls, but in some ways was a let-down compared to the last two.

Of course, all the buzz was about the iPhone. The amazing thing is not that Apple should make one, but rather that not a single cell phone manufacturer has a clue about design and ergonomics. Nokia used to, but they have backslid badly with their sluggish and over-complex Series 60 allegedly smart phones.

The prototypes were securely held under glass bells, presumably to preserve them from the salivating legions of the Mac faithful. From the demos, it looks pretty snappy compared to the incredibly sluggish Symbian or Windows Mobile equivalents, but I have serious doubts as to whether even Apple can make on-screen virtual keyboards work.

The other marquee product is the Apple TV, essentially a severely anorexic Mac mini without an optical drive or separate power brick, and running an unspecified embedded OS with the Front Row user interface. Pity it is limited to 720p (the 1080i support is interpolated). At a time when CompUSA sells a top of the line 42 inch Sharp Aquos 1080p LCD flat panel for under $2000, the lack of 1080p support is puzzling.

I haven’t seen that much innovation among the third party vendor stands either. Here is what I did find at least somewhat noteworthy:

  • Fujitsu came out with a new model of its ScanSnap document scanner line, the S500M, the only document scanner with official Mac OS X support. They claim the new model is slightly faster, and has a much improved paper feed. Indeed, the 5110EOX2 I have is annoyingly prone to double-feeding. The new model is also bundled with ReadIRIS Pro and Acrobat 7 Standard, a pretty good bundle all in all since those two programs together retail for nearly the same price as the scanner.
  • Speaking of PDF, viewing the PDFpen demo makes me regret even more shelling for that piece of bloatware that is Acrobat. Simple, inexpensive software to manage and edit your PDFs. They have a show special, 20% off if you follow the link www.smileonmymac.com/macworld.
  • Invisible Shield was demonstrating its self-healing protective plastic film for various gizmos by shaking an iPod mini in a box filled with screws and bolts, and showing how it survived unscathed. They also make protective films for digital camera LCDs, this looks like an interesting option since DSLR LCDs are very easily scratched.
  • A number of stands were using the Logitech 3DConnexion SpaceNavigator controller. Ovolab (makers of the excellent Phlink answering machine peripheral, were demoing a photo geocoding application Geophoto, with lightning-fast Google Earth style navigation (oddly enough, the Google stand did not use this nifty human interface device). The controller has six degrees of freedom and is remarkable easy to pick up.
  • Logitech has a fairly subdued stand. There were no real demonstrations of their NuLOOQ controller for Photoshop users, nor of their newly acquired SlimDevices Transporter, or Harmony programmable remotes. The emphasis was on their laser mice. SlimDevices was a popular draw at previous MacWorlds, I am not sure whether Logitech has gotten a grip on how to market that product line yet.
  • Infrant had a small stand with a ReadyNAS NV+. I had never seen this NAS before, it is much smaller, quieter and more solidly built than I expected. The rep at the counter was a new recruit and not all that knowledgeable about the product (I asked whether they expect to support iSCSI soon, which would make it a killer expansion option for my Solaris 10 home server with ZFS). Infrant has a partnership with SlimDevices, and the bundle of a Squeezebox with a ReadyNAS is one of the most attractive networked digital music options available, far superior to the flashy but ultimately unsatisfying Sonos.
  • Matias was demonstrating a prototype of their new TactilePro 2.0 keyboard. They now make their mechanical keyswitches by themselves instead of buying them from Alps (as with the version 1.0 Tactilepro I am using to type this blog entry). I like the original version so much I bought a spare when Alps announced it was discontinuing the keyswitches. The feel of the 2.0 is slightly different from the old one, but it still has that honest-to-goodness clickety-clack feel, albeit with a more subdued sound. The other differences involve upgrading the built-in hub to USB 2.0 and adding the Optimizer feature, which turns the useless Caps Lock key into a shortcut key instead. I remap the Caps Lock key to Control anyways on Macs, Windows and Solaris, so this last feature is of dubious interest to me.
  • Intelliscanner was selling rebadged Symbol CS1504 scanners for $250. Save your money, buy the OEM Symbol version for under $100 and use my free Python driver instead.
  • Canon was out in force, as was HP. Nikon and Epson had smaller stands this year. I got to handle the excellent new Canon HV10 HD camcorder, the new 70-200mm f/4L IS lens (a version of the excellent 70-200mm f/4L lens I already own, with gyroscopic optical Image Stabilization added), and the upcoming new Pixma Pro 9500 pigment ink printer that should compete with the Epson R2400 and the HP B9810.

M8, a missed opportunity

Last Saturday, I became the proud owner of a Leica M8. Then, a not-so-proud owner. As of yesterday, an ex-owner…

I returned it and sprung for an Epson R-D1 instead, saving almost 50% in the process. I had already previewed one at MacWorld SF two years ago.

R-D1

Most people interested in a M8 know by now about its problems with sensitivity to near infrared, which manifests itself as a magenta cast in certain situations. There is a work-around (buy costly Heliopan or B+W IR filters for your lenses, although there are rumors Leica will provide two free filters), but many are legitimately angry at Leica for having rushed the M8 launch despite such a fairly obvious flaw. It’s not an ideal situation but I could deal with it, as long as Leica stood behind its product and committed to a free upgrade to the corrected model once a definitive fix becomes available.

The straw that broke this particular camel’s back was quality control, however, or the lack thereof. My M8 exhibited almost an entire column of dead pixels (the bottom 3/4 at x=2888). If you must, see this jpeg or the original DNG. This kind of flaw would be unacceptable in a sub-$1000 Canon or Nikon, it is simply outrageous in a camera as expensive as the M8.

The magenta cast is not an edge condition visible in limited conditions, by the way (Leica claims it only affects black synthetics under tungsten light), the photos I took last Sunday indoors in available light are completely unsalvageable, with a strong magenta cast everywhere that cannot be corrected by any amount of custom white balancing. Here is an example: JPEG, DNG.

Last, but not least, noise levels are excessive at ISO 1250, let alone 2500, with smearing in rows where bright highlights are present. Essentially, this camera as it stands today is utterly useless outside broad daylight conditions (I don’t have an IR filter, so I can’t comment on how effective they are). Of course, pretty much all cameras do reasonably well in daylight, even cheap and nasty point-and-shoots with too many megapixels crammed in a sensor too small. Rangefinders give you a two stop advantage due to the absence of mirror slap, but even with a Noctilux, the M8 has no edge over a Canon DSLR because of the noisy sensor. Then again, it is one of my rules of photographic thumb that Kodak stands for poor quality, and since they make the sensor in the M8, I should have expected the worst.

It’s interesting to note how the reviews published so far managed not to mention any of these problems, which are completely obvious, even with the most cursory of inspections. In at least one case (Michael Reichmann of The Luminous Landscape), the reviewer found out about the IR issue, informed Leica about it but neglected to mention it in the review. This confirms me in my belief Phil Askey’s reviews at DPReview are the only reliable online reviews of digital cameras.

Leicaphiles seem to be mostly in denial, or minimize the extent of the problem. I am as big a fan as any of Leica’s optics and their rangefinder cameras, but the flaws in my M8 were so glaring I can’t even begin to fathom the levels of cognitive dissonance required to sustain a positive opinion of this train wreck in the making.

All the reviews I have read so far have been raising hallelujahs and claiming the M8 feels like a real Leica M. It most certainly does not:

  • The body feels much thicker than the MP, and is just as thick as the R-D1, in fact, despite not having a flippable LCD like the R-D1.
  • The lightweight magnesium body does not have the same level of robustness as the R-D1, let alone a MP, and feels more like a CM. It’s not even to the same grade as the original Digilux.
  • The lens mount lock does not snap positively and reassuringly as it should, and the release button feels cheap compared to my MP or M6TTL.
  • The shutter release is mushy and unpleasant. The shutter sound itself is a loud thunk followed by a noisy motorized re-cocking.
  • Setting ISO is buried in a menu and you need even more keystrokes to change it than on a Rebel XT (the R-D1, in comparison, has a genuine knob to set it quickly with direct feedback).
  • The rangefinder on mine was slightly misaligned vertically, something one can tolerate in a $300 Bessa, but certainly not in a M (to be fair, rangefinder patch vertical alignment is an endemic problem with the R-D1 as well).
  • In another sign of sloppiness and poor quality control, the copy of Capture One LE included in the box was missing the serial number required to activate the program.

Doug ThackerAfter using the R-D1 for a few hours, the superiority of the design over the M8 is readily apparent (with the sole exception of the taller body and short rangefinder base length):

  • The R-D1 has perfectly acceptable ISO 800 and 1600, unlike the M8, making it suitable for available light shooting.
  • The LCD screen pivots and can be turned around to protect it from scratches (or resist the temptation of chimping).
  • The viewfinder has an honest to goodness magnification of 1.0x like the original M3, not one that panders to jaded wide-angle junkies (I never shoot wider than 50mm and my MP is a 0.85x mag, so yes, I am biased)
  • The power supply is a manageable size and even has a cord, unlike the bloated wall-wart type Leica supplies with the M8.
  • The shutter speed dial goes in the traditional direction, not the M6TTL/M7 direction…

One bright light in this fiasco: Doug Thacker at Calumet Photo San Francisco (above) went well above the call of duty to help me with my purchases, all with unfailing good humor (he once sent me an email at 11PM to let me know of the IR sensitivity problem before they started receiving theirs). He even set one M8 aside for me even though I had cancelled my initial pre-order (they are in short supply and are reportedly going for over $6000 on eBay right now, so the opportunity costs are considerable). I think I will switch from B&H to Calumet for the bulk of my photo purchases in the future.

Update (2007-08-25):

I must be a glutton for punishment, as after reading Phil Askey’s M8 review, remarkably thorough as usual, I decided to give it another chance and get one for my birthday. The first one I ordered (from Amazon) had a severely misaligned rangefinder – points at infinity would not coincide at all when the lens was at infinity focus. It had a low serial number, suggesting an early model with teething problems. Presumably Amazon does not sell that many, so I returned it and ordered another one from a place with much higher turnover, B&H. That one was a recent vintage (they have an orange sticker on the body cap), but its rangefinder was also misaligned, if not as severely.

In frustration, I went to my local Calumet and finally found one that focuses correctly. Wonder of wonders, it even seems like there are no dead pixels or highlight streaks. Conclusion: Leica’s M8 quality control is still spotty, your best bet is to buy locally and test the rangefinder in the store itself.

Inserting graphviz diagrams in a CVStrac wiki

CVStrac is an amazing productivity booster for any software development group. This simple tool, built around a SQLite database (indeed, by the author of SQLite) combines a bug-tracking database, a CVS browser and a wiki. The three components are fully cross-referenced and build off the strengths of each other. You can handle almost all aspects of the software development process in it, and since it is built on an open database with a radically simple schema, it is trivial to extend. I use CVStrac for Temboz to track bugs, but also to trace changes in the code base to requirements or to bugs, and last but not least, the wiki makes documentation a snap.

For historical reasons, my company uses TWiki for its wiki needs. We configured Apache with mod_rewrite so that the wiki links from CVStrac lead to the corresponding TWiki entry instead of the one in CVStrac itself, which is unused. TWiki is very messy (not surprising, as it is written in Perl), but it has a number of good features like excellent search (it even handles stemming) and a directed graph plug-in that makes it easy to design complex graphs using Bell Labs’ graphviz, without having to deal with the tedious pixel-pushing of GUI tools like Visio or OmniGraffle. The plug-in makes it easy to document UML or E-R graphs, document software dependencies, map process flows and the like.

CVStrac 2.0 introduced extensibility in the wiki syntax via external programs. This allowed me to implement similar functionality in the CVStrac native wiki. To use it, you need to:

  1. Download the Python script dot.py and install it somewhere in your path. The sole dependency is graphviz itself, as well as either pysqlite2 or the built-in version bundled with Python 2.5
  2. create a custom wiki markup in the CVStrac setup, of type “Program Block”, with the formatter command-line:
    path/dot.py –db CVStrac_database_file –name ‘%m’
    • Insert the graphs using standard dot syntax, bracketed between CVStrac {dot} and {enddot} tags.
For examples of the plugin at work, here is the graph corresponding to this markup:
{dot}
digraph sw_dependencies {
style=bold;
dpi=72;

temboz [fontcolor=white,style=filled,shape=box,fillcolor=red];
python [fontcolor=white,style=filled,fillcolor=blue];
cheetah [fontcolor=white,style=filled,fillcolor=blue];
sqlite [fontcolor=white,style=filled,fillcolor=blue];

temboz -> cheetah -> python;
temboz -> python -> sqlite -> gawk;
temboz -> cvstrac -> sqlite;
python -> readline;
python -> db4;
python -> openssl;
python -> tk -> tcl;

cvstrac -> "dot.py" -> graphviz -> tk;
"dot.py" -> python;
"dot.py" -> sqlite;
graphviz -> gdpng;
graphviz -> fontconfig -> freetype2;
fontconfig -> expat;
graphviz -> perl;
graphviz -> python;
gdpng -> libpng -> zlib;
gdpng -> freetype2;
}
{enddot}
Dot

Another useful plug-in for CVStrac I wrote is one that highlights source code in the CVS browser using the Pygments library. Simply download pygmentize.py, install it Setup/Diff & Filter Programs/File Filter, using the string path_to/pygmentize.py %F. Here is an example of Pygment applied to pygmentize.py itself:

#!/usr/bin/env python
# $Log: pygmentize.py,v $
# Revision 1.3  2007/07/04 19:54:26  majid
# cope with Unicode characters in source
#
# Revision 1.2  2006/12/23 03:51:03  majid
# import pygments.lexers and pygments.formatters explicitly due to Pygments 0.6
#
# Revision 1.1  2006/12/05 20:19:57  majid
# Initial revision
#
"""
CVStrac plugin to Pygmentize source code
"""
import sys, pygments, pygments.lexers, pygments.formatters

def main():
  assert len(sys.argv) == 2
  block = sys.stdin.read()
  try:
    lexer = pygments.lexers.get_lexer_for_filename(sys.argv[1])
    out = pygments.highlight
    block = pygments.highlight(
      block, lexer, pygments.formatters.HtmlFormatter(
      style='colorful', linenos=True, full=True))
  except ValueError:
    pass
  print unicode(block).encode('ascii', 'xmlcharrefreplace')

if __name__ == '__main__':
  main()

Not-so-pop cultural references

Cartoons can be the most subversive of genres. The Simpsons has been serving acerbic social commentary from deep within the bowels of the reactionary Fox network for over 10 years, yet they manage to stay fresh when other, more edgy shows like Family Guys struggle for relevance.

One of the main characters in Futurama, Matt Groening’s other animated show, is named Turanga Leela, a transparent reference to Olivier Messiaen’s Turangalîla Symphonie. The number of people who have even heard of this fairly esoteric work is quite limited, and those who actually like it (as opposed to professing admiration for it out of conformity) can probably be counted on the fingers of one hand. Thus we have established that Groening or his staff are intimately familiar with 20th century classical music.

Last week’s episode of The Simpsons featured the US Army showing a recruitment commercial at the Simpson kids’ school. It starts with a rousing martial score. I have extracted a 4MB clip of the scene (Quicktime 7 required) for those who missed it.

The piece in question is from Prokofiev’s Alexander Nevsky cantata. The music was composed for the epnymous anti-german propaganda movie by Eisenstein (although, in a little known consequence of the Molotov-Ribbentrop pact, Stalin made Eisenstein produce Wagner’s Die Walküre for the Bolshoi in atonement for the newly inconvenient Nevsky). The lyrics heard can be translated in English as follows:

Arise, ye Russian people,
to glorious battle, to a battle to the death:
arise, ye free people,
to defend our beloved country!
All honour to the warriors who live,
and eternal glory to those slain!
For our native home, our Russian land,
arise, ye Russian people!

Needless to day, the delicious irony is unlikely to be mere coincidence.