The Grumpy Troll

Ramblings of a grumpy troll.

Standard components

It's good when applications build on top of standardised components.

For instance, Google Chrome stores most of its data in sqlite3 databases in the profile directory. When I started at $current_employer I had a tendency to type rather than the relevant to get to my work calendar. After a couple of mistakes, this became self-reinforcing, because the auto-complete would preferentially show the most common completion of "calendar" as I typed that, which would be the wrong completion.

% cd Library/Application\ Support/Google/Chrome/Default
% sqlite3 History
sqlite> .schema
sqlite> select count(*) from visits left join urls on visits.url = where urls.url like '';
sqlite> delete from visits where url in (select id from urls where url like '');
sqlite> delete from urls where url like ''

Exit sqlite3, start Chrome back up, and hey presto, when I start typing "calendar" only the correct instance is left.

Trying to do this when your higher-level systems are built on non-standard components would be rather harder and would involve much coding.

This principle can be applied at many levels.

-The Grumpy Troll


Chrome's exposure may be nice, but their kiddie-style UI (viz. the "/* You are not expected to understand this. */"-style messages for SSL errors) really bugs me.
Phil P
@firedrake: Perhaps a feature request? I'm happy at how much more Chrome exposes than other browsers through things like the chrome://net-internals URL; flush the host-cache without restarting the browser, to pick up an /etc/hosts change? Awesome!
Phil P
@augmentedfourth: Oh nice, I can use Shift-Delete in Chrome and that works too. It's not a bulk operation, but it works. Live and learn: thanks!
The "standard components" thing is good, but some sort of "standard UI" would be nice as well... in Firefox, you can remove a URL form the autocomplete list just by selecting it and hitting the Delete key. I'm not (and don't really plan to be) a SQL wizard, after all.
It's just a shame that, as with Firefox, Chrome assumes that it's the only thing that will be reading its databases - and so can't be provoked into re-reading them. (I'm thinking of the JSON bookmarks file here, but the principle is the same...)

(No, of course I don't use Chrome out of the box. You know me better than that. I use Iron.)
Categories: sqlite software design Chrome standardising