IT

Push recruiting

As I was debugging why feedparser is mangling the GigaOM feed titles, I found this easter egg on the WordPress hosted site:

zephyr ~>telnet gigaom.com 80
Trying 72.232.101.40...
Connected to gigaom.com.
Escape character is '^]'.
GET /feed HTTP/1.0
Host: gigaom.com

HTTP/1.0 301 Moved Permanently
Vary: Cookie
X-hacker: If you're reading this, you should visit automattic.com/jobs and
apply to join the fun, mention this header.
Location: http://feeds.feedburner.com/ommalik
Content-type: text/html; charset=utf-8
Content-Length: 0
Date: Thu, 20 Mar 2008 23:36:17 GMT
Server: LiteSpeed
Connection: close

Connection closed by foreign host.

Knowing how to issue HTTP requests by hand is one of my litmus tests for a web developer, but I had never thought of using it in this creative way as a recruiting tool…

Adobe “Creative” Suite 3, a mixed bag

I installed Adobe Creative Suite 3 on my home PowerMac and my MacBook (the license allows you to install it on two computers as long as they are not in simultaneous use). The only real reason I upgraded is to get a native Intel version. I have barely started using it already and I already have peeves:

  • Bridge looks butt-ugly, is even slower than before and with a more amateurish interface than ever
  • The install procedure is incredibly annoying and Windows-like. There is no justification for an install procedure that chokes if the beta was not uninstalled officially (although I have to give some brownie points due to the fact the cleanup script is written in Python).
  • The icons are aesthetically bankrupt. What kind of credibility does Adobe think it has with creative people with such an astoundingly lackluster effort?
  • Barely installed and already in need of software updates. The widespread availability of fast Internet connections is no excuse for shoddy release management or a “we’ll patch it post-release” mentality. Speaking of which, the only proper time to interrupt users with a software update dialog is as they are quitting the application, not by getting in the way of whatever task they are trying to get done by starting up the app.
  • Don’t clutter my hard drive with legal drivel in twenty different languages. It’s called “Creative Suite”, not “Boilerplate Suite”.
  • All the tie-ins to paid add-on services like Adobe Stock Photos or Acrobat Conferencing are incredibly obnoxious, just like those for MSN or .Mac.
  • JavaScript in Acrobat is a big security and privacy risk, and should be disabled by default.
  • On the plus side, thanks for making a “Design Basic” edition without all the despicable Flash garbage in it. I would actually pay more for the Basic version than for the supposedly premium one infected with Flash and Dreamweaver.

Update (2008-01-01):

It seems Adobe has also crossed a serious ethical line by building in spyware to track on whenever a user starts a CS3 application.

As far as I am concerned, this is the last straw and I will actively start looking for substitutes for Adobe products as soon as I return from my vacation.

Update (2008-01-02):

It seems Adobe does not collect the serial number after all. The apps should nonetheless never call on the Internet except possibly to check for updates. For people like myself who have static IPs, the IP address itself could be used to correlate the analytics with personal information.

Is Vista a piece of unalloyed garbage?

As far as I can see, the answer is yes.

About a month ago, my two-year old Windows PC game machine started crashing every two minutes in NWN2. This proved the last straw, and I decided to upgrade. One of the games I have, but seldom play is Oblivion, which is graphically gorgeous, but chokes on anything but the most powerful hardware at ordinary resolutions, let alone my Apple Cinema Display HD’s 1920×1200, and cutting-edge video cards are no longer available for the AGP bus in any case.

I looked around for packaged solutions from systems integrators, specialized gaming PC companies like AlienWare, and Dell. Contrary to conventional wisdom, it is still much cheaper to build a PC from components than to buy one from a major vendor, $1500 vs. $2500 minimum. Part of the reason is that the vendors flag anyone wanting the absolute best video card as a “cost is no object” customer, add all sorts of expensive components that make no sense in a machine that will only ever be used for games, like fancy DVD burners or flash card readers to jack up the profit margins. As if anyone in his right mind would use a Windows computer for serious work like digital photography…

My configuration is the following: a relatively quiet Antec Sonata II case, an Abit KN9 Ultra motherboard, an AMD Athlon x2 5200, 2GB of Kingston DDR-800 RAM, a humongous nVidia GeForce 8800GTX video card, a 500GB hard drive and a basic DVD-ROM drive.

When it came to choosing the OS, after much trepidation I opted for Vista Home Premium because the 8800GTX is one of the few cards that support DirectX 10, which is a Vista-only feature. I knew Vista would embezzle half the processing power of one core in DRM code that is actually working against my interests, but then again nobody in his right mind would use DRM-ed formats, whether Microsoft or otherwise, to store their music library, so the damage would be limited. Also, Vista comes with “downgrade rights” which allow you to legally install the previous version of Windows.

Vista comes in an attractive copper-colored DVD that is actually quite elegant. Its color scheme is also far superior to the molten Play-Skool set monstrosity that is XP. When I started the Vista installer, I was pleasantly surprised by how quickly it dealt with hard drive formatting (the previous Windows I installed myself is Windows 2000, which will insist on a time-consuming full format instead of the quick format used by the XP or Vista installers). The good impression lasted for all of five minutes. After the inevitable restart to complete installation, the screen promptly dissolved into a scrambled red-and-white screen of doom (I did glimpse a blue screen of death shortly before it rebooted). The diagnostics were completely unhelpful, as could be expected. When the operating system cannot even install itself, you have got to wonder…

Dejectedly, I fished out a Windows XP install DVD. it would not accept the Vista serial number. So much for downgrade rights. Of course, since the package was now opened, no hope for a refund either. I ended up buying a copy of Windows XP, which installed without a hitch. Of course, I still had to install the video drivers, but it did not crash half-way through the install procedure. And Oblivion is now playable without agonizing stutters every two paces.

The 8800GTX is very recent hardware, which did not even have non-beta Vista drivers when I installed it, so I could understand the OS falling back to SVGA mode. There are no other really exotic components here, certainly nothing than XP SP2 could not deal with and therefore Vista should as well. The machine is also well within the recommended minimum configuration (although some experts now advise 4GB of RAM as a realistic minimum for Vista). Crashing during install, when a five year old OS like XP handles it just fine, is simply unacceptable in my book. Even Solaris 10 Update 3, an OS notorious for its limited hardware support, installed without a hitch. Despite the ten man-millennia Microsoft invested in this lemon, they apparently could not be bothered to test the installer.

Conclusion: unless you buy a computer with Vista pre-installed, avoid it like the plague until SP1 is out, just like Intel.

Post scriptum:

Actually, I would not even recommend a PC with Vista preinstalled, as it has terrible backward compatibility. It will not run Office 2000, which is what my company has, for instance. Joel Spolsky has an excellent article on how the new, bloatedly bureaucratic Microsoft lost its way by sacrificing backward compatibility on the altar of useless marketectures. Perhaps they are just trying to force-upgrade people to Office 2007. They should beware: unlike 2002, people have credible alternatives now.

Update (2007-08-30):

The paper about how Vista eats up CPU on DRM has been criticized by the generally reliable George You. My point about the inability to even install on a modern machine that XP has no problems with remains. In any case, having the operating system constantly eat up CPU on tasks I do not want it to, whether it is 7% or 100% of one core, is still morally no better than a parasitic botnet.

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…

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()