[rcbth]

Archive for March, 2008

Race to Pass the Acid3 Test: Has WebKit Succeeded?

Thursday, March 27th, 2008

Ars Technica is reporting that latest nightly build of WebKit (r31370) is now the first reported engine to successfully score a 100/100 on the Web Standards Project’s Acid3 Test, but the claim doesn’t seem to be controversy free.

There is mention in the article of a bug found by the WebKit team that was present in the test itself. It was supposedly fixed, but I can’t seem to find any information about what the bug was or how it was eliminated.

A commenter on Ars also notes that there seems to be a fix or fixes in the WebKit code that are tailored to a font, “Ahem,” used exclusively by the Acid3 test. I confirmed this and found that line 261 through 269 of “SimpleFontDataMac.mm” read:

// Workaround for strange CG antialiasing of the Ahem font.
		Limit to the Web font version.
...
m_allowFontSmoothing = (nameStr != "Ahem");

Building in an exception for a font may belie the team’s claim to full standards compliance. Either way it seems there is some explaining to be done here.

Also interesting is the claim floating around that Mozilla developers are more or less ignoring the Acid3 test on the grounds that it overvalues certain types of bug fixes.  One of them posted as much today. It’s an interesting point, and I too think the emphasis on this one particular test is unwarrented. In the end though, it will be hard for Mozilla to justify the final release of Firefox 3.0 not passing it.

Unix Timestamps in Python

Monday, March 24th, 2008

I use Unix timestamps for a great many things and just spent some time looking this up:

from time import time
mySeconds = time()

It’s simple enough, but remember: this function returns a float! It generally yields about two digits of precision. For straight Unix seconds use floor (or just the int cast), as rounding the number may put you one second ahead.

from time import time
myUnixSeconds = int(time())

You may also want to have a look at the official Python documentation for the Time module.