Monthly Archives: January 2012

Yummy cookies: how many can you eat? (And why is Google such a Cookie Monster?)

If you visit this blog, you get a total of 8 cookies placed on your computer from blog.kerika.com – unless, of course, you block all cookies, in which case you probably aren’t a Kerika user. Of these, just 2 are of any use to us: they help us with Google Analytics.

The other 6 are placed there because we use the WordPress software to publish this blog. We haven’t any use for them, but haven’t gotten around to turning the off because that would require us to fiddle with various PHP files.

And if you use the Kerika software, you get a total of 6 cookies from kerika.com. Of these:

  • 2 are from Google Analytics. They help us understand which of the nearly 80 pages that currently comprise kerika.com are of real interest to people. These cookies are called _utma and _utmz.
  • 1 comes from the fact that we use CometD, an open source implementation of the Bayeaux protocol, for our real-time communications. We haven’t any use for this cookie, but haven’t gotten around to turning it off. This one is called BAYEUX_BROWSER.
  • 1 is related to our use of Jetty, an open-source, Java-based Web server. We haven’t any use for this cookies either, but, as with CometD, we haven’t gotten around to turning these off either.

And, finally, we get to the two cookies that are of practical use to us:

  • The claimedID cookie helps us identify you as a registered Kerika user, and
  • The tabs cookie helps us bring you back to the projects you had open when you were last using Kerika.

Sorry about all those useless cookies.

That’s the problem with using third-party software like WordPress, CometD and Jetty: each comes with its own platter of cookies, and to turn them off requires one to dig into the code for each of these systems. Frankly, it doesn’t seem worthwhile, at least in comparison to fixing bugs and delivering new features, which is where all of our energy goes!

But, in comparison to other software vendors, our use of cookies is far from excessive, and that’s because we are not in the advertising business. Google, on the other hand, is very much in the advertising business, and taking a look at the Chrome browser cookies on one of our development machines, here’s the very impressive count we found for the original Cookie Monster:

google.com 43 cookies
accounts.google.com 5 cookies
apis.google.com 1 cookie
checkout.google.com 4 cookies
chrome.google.com 2 cookies
code.google.com 3 cookies
docs.google.com 12 cookies
groups.google.com 4 cookies
mail.google.com 29 cookies
plus.google.com 2 cookies
plusone.google.com 2 cookies
profiles.google.com 2 cookies
sandbox.google.com 2 cookies
support.google.com 8 cookies
talkgadget.google.com 1 cookie
tools.google.com 1 cookie
www.google.com 19 cookies
www.googleadservice.com 1 cookie
translate.googleapis.com 1 cookie
deployment.googleapis.com 2 cookies
fastflip.googlelabs.com 1 cookie
igoogle-skins.googleusercontent.com 1 cookie

That’s a total of 144 cookies! And when it comes to local storage, Google has a fairly big footprint:

clients6.google.com Local storage
mail.google.com Database storage, Local storage
news.google.com Local storage
plus.google.com Local storage
www.google.com Database storage, Local storage

There’s a lot of controversy about Google’s announcement that they will merge data collected from their various services to provide more targeted advertisements. If that means they have figured out how to consolidate information gathered by 144 cookies from 22 different services – well, one can’t help but be impressed at the technical challenge they have taken on!

A really obscure bug, all because Firefox on Linux doesn’t support “browser safe fonts”

We have a feature in Kerika that had been behaving more like a bug for one of our users, and the root cause of her dissatisfaction turned out to be a very obscure problem with the way Firefox runs on Linux.

First, some background: one very cool feature in Kerika is that you can see little thumbnails of pages so you can tell at a glance what each item contains. Here’s an example of a project, as it appears on a user’s “All Projects” page:

Example of a project thumbnail, as it appears on a user's My Project page
Example of a project thumbnail, as it appears on a user's My Project page

Kerika displays the project as a small thumbnail. You can see these thumbnails in several places in Kerika: for example, when you are viewing a project page where items represent sub-projects, or when you are using the Breadcrumbs to navigate back up the hierarchy of projects and pages.

To create these thumbnails, we have a “Render Server” that runs on a Linux virtual machine on Amazon’s cloud. The Render Server automatically produces a new thumbnail of your project about 3 minutes after you have finished making your changes to the page.

(Why not instantly? Because in our experience, people often make a bunch of relatively small changes within a few seconds: for example, they might move something on their page several times, fairly quickly, before they are completely satisfied with where they have placed the item. If we created a new image with every single action a user takes, we would flood people with updated images every few seconds; instead, we wait for a couple of minutes until after the user has finished making changes before updating the thumbnail of the page.)

Well, this Render Server runs Firefox 9. There are a class of fonts that are supposed to be “browser safe”: i.e. all browsers are supposed to support these fonts. This class is commonly thought to include about a dozen fonts, including Trebuchet MS, but in reality the set of browser-safe fonts may actually be much smaller. And, it turns out, Firefox 9 on Linux doesn’t support Trebuchet MS after all!

Which brings us to our user and her very obscure bug… She had been using Trebuchet MS as a font for her project pages, and her pages included a number of diamond shapes. Kerika has a feature that resizes shapes automatically to fit all the text contained within the shape, so that, for example, if you increase the font size, the shape will resize automatically to accommodate the larger footprint of the text.

Whenever our user made a changes to her page, after about 2 minutes the Render Server would automatically try to create a new thumbnail of the image. But… since Firefox on Linux doesn’t support Trebuchet MS, Firefox would fall back to the closest font it had, which was Times New Roman. The footprint of Times New Roman is quite different from that of Trebuchet MS, so the diamond shapes need to be slightly taller and less wide, and the Render Server would automatically adjust the shape when it created the thumbnail for the page.

As a result, our user found that her diamonds were changing size in some random manner, which was both puzzling and annoying. The bug was obscure indeed, because it ultimately had to do with Firefox not supporting Trebuchet MS on Linux even though that font is supported by Firefox on Windows and Macs.

Luckily, our team includes some unusually smart people! One of them spotted the quirk fairly quickly and the fix is going to be relatively easy: we are already providing our users with an extended set of fonts, and for these we provide Firefox with the necessary CSS to render the fonts. We hadn’t been providing the custom CSS for Trebuchet MS, thinking that it was already supported by Firefox, but now we will.

In case you are interested, here are the fonts we currently support:

The fonts we support for Kerika pages

 

 

A really obscure bug, all because Firefox on Linux doesn’t support “browser safe fonts”

We have a feature in Kerika that had been behaving more like a bug for one of our users, and the root cause of her dissatisfaction turned out to be a very obscure problem with the way Firefox runs on Linux.

First, some background: one very cool feature in Kerika is that you can see little thumbnails of pages so you can tell at a glance what each item contains. Here’s an example of a project, as it appears on a user’s “All Projects” page:

Example of a project thumbnail, as it appears on a user's My Project page
Example of a project thumbnail, as it appears on a user's My Project page

Kerika displays the project as a small thumbnail. You can see these thumbnails in several places in Kerika: for example, when you are viewing a project page where items represent sub-projects, or when you are using the Breadcrumbs to navigate back up the hierarchy of projects and pages.

To create these thumbnails, we have a “Render Server” that runs on a Linux virtual machine on Amazon’s cloud. The Render Server automatically produces a new thumbnail of your project about 3 minutes after you have finished making your changes to the page.

(Why not instantly? Because in our experience, people often make a bunch of relatively small changes within a few seconds: for example, they might move something on their page several times, fairly quickly, before they are completely satisfied with where they have placed the item. If we created a new image with every single action a user takes, we would flood people with updated images every few seconds; instead, we wait for a couple of minutes until after the user has finished making changes before updating the thumbnail of the page.)

Well, this Render Server runs Firefox 9. There are a class of fonts that are supposed to be “browser safe”: i.e. all browsers are supposed to support these fonts. This class is commonly thought to include about a dozen fonts, including Trebuchet MS, but in reality the set of browser-safe fonts may actually be much smaller. And, it turns out, Firefox 9 on Linux doesn’t support Trebuchet MS after all!

Which brings us to our user and her very obscure bug… She had been using Trebuchet MS as a font for her project pages, and her pages included a number of diamond shapes. Kerika has a feature that resizes shapes automatically to fit all the text contained within the shape, so that, for example, if you increase the font size, the shape will resize automatically to accommodate the larger footprint of the text.

Whenever our user made a changes to her page, after about 2 minutes the Render Server would automatically try to create a new thumbnail of the image. But… since Firefox on Linux doesn’t support Trebuchet MS, Firefox would fall back to the closest font it had, which was Times New Roman. The footprint of Times New Roman is quite different from that of Trebuchet MS, so the diamond shapes need to be slightly taller and less wide, and the Render Server would automatically adjust the shape when it created the thumbnail for the page.

As a result, our user found that her diamonds were changing size in some random manner, which was both puzzling and annoying. The bug was obscure indeed, because it ultimately had to do with Firefox not supporting Trebuchet MS on Linux even though that font is supported by Firefox on Windows and Macs.

Luckily, our team includes some unusually smart people! One of them spotted the quirk fairly quickly and the fix is going to be relatively easy: we are already providing our users with an extended set of fonts, and for these we provide Firefox with the necessary CSS to render the fonts. We hadn’t been providing the custom CSS for Trebuchet MS, thinking that it was already supported by Firefox, but now we will.

In case you are interested, here are the fonts we currently support:

The fonts we support for Kerika pages