Fazal Majid's low-intensity blog

Sporadic pontification

Fazal

Mozilla Weave

Mozilla Weave is a project of the Mozilla Labs to build synchronization of bookmarks, tabs, passwords and so on between multiple instances of the Firefox browser. It used to be a private beta, but with the release of version 0.4 recently, it has been opened up to the general public.

Where version 0.2 was pretty rough, 0.4 actually works quite well, even if it is not yet feature complete. Bookmarks and passwords are handled just fine. Furthermore, you can set up your own server, all that is needed is PHP. Previous versions required WebDAV support, and the WebDAV module in nginx is not functional enough for Weave (or anything else, for that matter).

The first synchronization is painfully slow, but once it is done, later synchronizations are essentially instant. When combined with the Awesome bar’s tagging components, it has completely supplanted Del.icio.us for my bookmarking needs (I never liked the rewritten user interface).

Thomas Pink weave cufflinks

Amusingly, I came across these cufflinks at Thomas Pink in San Francisco last Friday — they are the mirror image of the Weave logo.

Thomas Pink weave cufflinks

Below are the relevant sections of my nginx config.

php.ini

magic_quotes_gpc = Off
session.auto_start = 0
file_uploads = On
error_reporting = E_ALL & ~E_NOTICE
allow_url_include = Off
allow_url_fopen = Off
session.use_only_cookies = 1
session.cookie_httponly = 1
expose_php = Off
display_errors = Off
register_globals = Off
disable_functions = phpinfo
error_log = /home/majid/web/logs/php_error_log

nginx.conf

root /home/majid/web/html;
location ~ .php$ {
  auth_basic		"gondwana";
  auth_basic_user_file	/home/majid/web/conf/htpasswd;
  fastcgi_pass		127.0.0.1:8888;
  fastcgi_index		index.php;
  fastcgi_param		SCRIPT_FILENAME  /home/majid/web/html$fastcgi_script_name;
  include		/home/majid/web/conf/fastcgi.conf;
}
# Mozilla Weave
rewrite ^/weave/admin$	/weave/admin.php;
location /0.3/api {
  return		404;
}
location /0.3/user {
  fastcgi_pass		127.0.0.1:8888;
  fastcgi_index		index.php;
  include		/home/majid/web/conf/fastcgi.conf;
  fastcgi_param		SCRIPT_FILENAME	/home/majid/web/html/weave/index.php;
  fastcgi_param		SCRIPT_NAME	/home/majid/web/html/weave/index.php;
  if ( $request_uri ~ "/0.3/user/([^?]*)" ) {
    set $path_info	/$1;
  }
  fastcgi_param		PATH_INFO	$path_info;
}

fastcgi.conf

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx;

fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

Olympus E-P1 hands-on impressions

I had the opportunity to handle an Olympus E-P1 camera at Keeble & Shuchat in Palo Alto. There has been quite a bit of excitement on sites like Rangefinder Forum and many were expecting this to be the first pocketable camera that could compete with SLRs in image quality.

The Sigma DP1 and DP2 were actually the first cameras with large sensors and reasonable pixel counts, bucking the marketing-driven trend towards too many pixels squeezed onto too small a sensor chip, with horrible noise as the result. I own both, and their image quality is indeed stunning, but they have one Achilles’ heel — speed, or the lack thereof.

The E-P1 is very compact, almost the same size with the 17mm as the Sigma DP2 (some photos released suggested it was closer to the Leica M8). The build quality is fine, and it is nowhere near as heavy as some early users suggested it was. They probably compared it to a plastic fantastic compact rather than a more substantial camera like a Leica or a DSLR.

I was surprised to find the 17mm AF hunted quite a bit, overshooting and then backtracking. Oddly, it did this even on the next shot when the lens was already in focus. I don’t know if this is specific to the 17mm lens, but it is certainly not encouraging.

From my test shots, I was also distinctly unimpressed by the optical quality of the lens, or the noise performance at ISO 1600. The Four-Thirds and Micro Four Thirds formats are hobbled by sensors one half the size of the APS-C used in most entry-level DSLRs, with predictably higher levels of noise and limited dynamic range. I had to go back to 2003 and my then Canon EOS 10D to find similar levels of noise. The Canon Rebel XT was definitely superior in high-ISO performance, let alone current SLRs. Olympus fanboys seem to be in denial about the limitations of Four-Thirds sensors, but you cannot fight against physics and expect to win.

The other disappointing thing about the 17mm lens is that it is not particularly sharp, specially for a prime lens of relatively modest maximum aperture. The pictures were nowhere near as crisp as the lovely Sigma lenses on the DP1 and DP2. This is all the more a let-down as Olympus was renowned for the quality of its miniaturized prime lenses in the days of the ground-breaking OM system. I wasn’t expecting Pentax SMC Limited pancake lens levels of performance (we are talking of a lens one third the price, after all), but there is no point in having 12 megapixels (at least 6 too far in my book) if the lens can’t actually exploit them.

I had preordered an E-P1 with the 17mm kit lens and viewfinder from Amazon. After handling the E-P1 and taking a few test shots, I canceled my order.

@font-face embedding

I updated my wife’s home page to use embedded fonts (in this case the Fonthead GoodDog typeface for headings) with the @font-face CSS primitive. With the introduction of Firefox 3.5, all the major browsers now support embedded typography.

As usual, Microsoft had to do its proprietary thing in Internet Exploder and devised a crackpot font format called EOT (Embedded OpenType), ostensibly at font foundries’ request, with weak DRM-like metadata that allows the font supplier to restrict which sites the font can be used on. Microsoft has an incredibly convoluted tool called WEFT (Web Embedded Font Tool) to do this, but I used the open-source and incredibly easy to use ttf2eot tool instead. The only hitch in this case was that this tool takes a TrueType TTF font as input, and GoodDog is a (PostScript-ish) OpenType OTF instead. Fortunately, TypeTool can do the conversion.

We finally have semi-decent typography on the web without having to embed images (bad for page load times or accessibility) or the even worse sIFR hacks using the noxious Adobe Flash. The only question remains whether type foundries will follow. Fonthead has enlightened licensing policies for GoodDog (free for up to 5 sites, no insistence on DRM). Typeface design is a painstaking craft and designers certainly deserve what they charge for their fonts, but I hope the typographic industry does not follow the RIAA in its self-destructive crusade against its own customers.

Update (2011-03-03):

One option for hassle-free embedded font licensing is TypeKit. It does require JavaScript in the browser to work, unlike a pure CSS solution like the one I used, but the convenience can’t be beat. We use it on Apsalar’s public website.

30 years after, the king of calculators rides again

In 1986, I purchased a Hewlett-Packard HP-15C scientific programmable calculator, for $120 or so. That was a lot of money back then, specially for a penniless high school student, but worth every penny. I lived in France at the time, and HP calculators cost roughly double the price there, so I waited for a vacation visit to my aunt in Los Angeles to get it. HP calculators are professional tools for engineers and you couldn’t find them at the local department store like TI trash, so I asked my aunt to mail order it for me prior to my visit. I still remember the excitement at finally getting it and putting it through its paces.

The HP-15C is long discontinued but I still keep mine as a prized heirloom, even though I have owned far more capable HPs over time (the HP-28C, HP-48SX, HP-200LX and more recently HP-35S and HP-33S) and given most of these away. The HP-15C’s financial cousin, the HP-12C is still in production today and has a tremendous cult following.

The reason for the HP Voyager series’ lasting power is many-fold:

  • Reverse Polish Notation (RPN), HP’s distinctive way of entering calculations. For instance, to calculate the area of a 2m radius circle, you would type 2 x2 π x instead of the more common algebraic (AOS) notation on TI or Casio calculators π x 2 x2 =. With practice, RPN is much more natural and efficient than algebraic notation. When I went from high school to college, the number of RPN users went from 2 (myself and a classmate who owned a HP-11C) to over 50%.
  • The ergonomics of the calculators are top-notch, from the landscape orientation to the inimitable HP keyboards with their firm and positive response.
  • They offered far superior functionality, like the HP-15C’s built-in integrator, equation solver, matrix and complex algebra, or the HP-12C’s financial equation solver.

The HP-15C offers the right balance of power and usability. The HP-48SX was far more powerful, but if you stopped using it for more than a couple months, you would completely forget how to use it. The more advanced functionality like symbolic integration is better performed on a Mac or PC using Mathematica or the like, in any case.

Unfortunately, Carly Fiorina gutted the HP calculator department in one of the more egregious of her blunders during her disastrous tenure as CEO of HP, outsourcing R&D and manufacturing from Corvallis, Oregon to China. HP has been trying to regain lost ground, but it is an uphill battle as TI has had ample time to entrench itself.

All this long exposition leads to the news HP has released an app (and for other models like the HP-12C)

hp15c

I benchmarked it by integrating the normal distribution (f LBL A x2 CHS ex 2 ENTER π x √x / RTN) between -3 and +3. On the original HP-15C, this takes about 34 seconds. On the iPhone emulator, it is near instantaneous. On the nonpareil emulator running on my octo-core Mac Pro, it’s more like a minute…

 

Ty Couz

One of the best values in San Francisco dining, their $8.50 scallop galette (Breton for buckwheat crêpe).

Update (2012-07-13):

Sadly, it closed a few months ago.