Less Talk, More DoLess Talk, More Do Christopher Finke is a software engineer at Mahalo. He is available for birthday parties and bar mitzvahs.

Firefox 3

June 17th, 2008

Today marks the release of Firefox 3. It's free. It's fast. It's the best Web browser ever created. (Yes, even better than Netscape Navigator 9, if you can believe it.) Did I mention that it's free?

Do yourself a favor and upgrade from whatever steaming pile of garbage you're using to browse the Web. Because that's what Firefox 3 makes the competition look like: steaming piles of garbage.

Download Day - English

Mozilla Firefox Bug #237180

June 13th, 2008

In this episode of "Bug Evangelism," Chris highlights a 4-year-old bug in Firefox concerning bookmark keywords.

Mozilla Firefox lets you assign "keywords" (or "shortcuts") to bookmarks by entering a word or phrase in the bookmark's "keywords" field. The advantage to setting a keyword for a bookmark is that you can load the page more quickly by typing the keyword in the location bar than by finding the bookmark in your bookmarks menu or toolbar.

Assigning a keyword to a bookmark in Firefox 3

However, if you assign the same keyword to multiple bookmarks (for example, assigning "tech" to both Slashdot and TechMeme), Firefox will only open one of your bookmarks when you type the keyword in the location bar. This mis-behavior is documented in bug #237180, which was submitted in March of 2004. Some argue that you shouldn't be able to assign the same keyword to multiple URLs, and others (like me), argue that you should be able to, and Firefox should open all bookmarks that have been assigned a given keyword. After all, isn't that what tabs in a browser are for?

So, if, like me, you would like the ability to quickly open a set of bookmarks by typing a single word (think "stats" for a set of pages showing various statistics about your website traffic, or "news" to pop open your three favorite news sites), vote for bug #237180, and leave a comment indicating how you'd like the multiple keyword problem to be resolved.

Rated O for Open Source

June 12th, 2008

Firefox 3 is coming this Tuesday, and it's bringing awesome artwork with it.

More information about this poster is available at John Slater's blog, Into the Fuzz.

Amazon to compete with Twitter?

June 6th, 2008

Noticed this morning that Amazon.com added a feature that puts them squarely in competition with Twitter:

This is bad news for Twitter. Up until now, they've been the market leader in the "Popular websites that are unavailable" category, but with Amazon.com as competition, they'll have a hard time keeping that position.

Tracking the top Diggers

May 23rd, 2008

For the past 15 months, I've been maintaining a list of the top 100 (and top 1000) Digg users. As Digg has become less and less relevant to my interests (and the interests of the greater tech community), I've decided to stop updating these lists. However, I have chosen to provide the tools I have used in case someone else has an interest in tracking Digg statistics.

Caveat: This whole thing was thrown together without any regard for coding or design conventions. Also, I can't guarantee that you won't be banned from Digg for using any of this information - I was, a few times. Proceed with caution.

First, the data structures. The Top Diggers lists are supported by two database tables: `digg` and `digg_users`. `digg` holds the set of front-page stories and their submitters, while `digg_users` stores aggregated information about each user in the system.

CREATE TABLE `digg` (
  `user` varchar(128) NOT NULL default '',
  `submission` varchar(255) NOT NULL default '',
           `date` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`submission`),
  KEY `user` (`user`)
);

CREATE TABLE `digg_users` (
  `user` varchar(128) NOT NULL default '',
  `frontpage` int(11) NOT NULL default '0',
  `dugg` int(11) NOT NULL default '0',
  `submitted` int(11) NOT NULL default '0',
  `profileViews` int(11) NOT NULL default '0',
  `frontpagestatic` int(11) NOT NULL default '0',
  `frontpagetotal` int(11) NOT NULL default '0',
  `submittedstatic` int(11) NOT NULL default '0',
  `image` varchar(128) NOT NULL default '',
  UNIQUE KEY `username` (`user`)
);

Next, some data to get you started. Here is a SQL dump of the two tables described above, including information on about 13000 Digg users (for `digg_users`), as well as the last 4 stories on the Digg homepage at the time of the last update (for `digg`). Import this data into your database in preparation for the next step.

The next step: data retrieval. The main work of updating the top 100 list is done by a Python script:

import digg

# Grab the last X pages of popular stories
digg.update_news(100)

# Update the top X profiles
digg.update_profiles(110)

Of course, this code makes no sense without the digg.* methods, downloadable here. This script also requires the excellent BeautifulSoup Python HTML parser. You will have to modify digg.py to change the database connection parameters.

For those who don't care to read through the code, it achieves two main objectives: Find out who submitted any frontpage stories since the last update (it stops when it hits a story already in the `digg` table), and using that information, determine the new top 100 users and update their profile information.

The last step is data presentation. The information in the database tables needs to be transformed into a readable HTML file. I'll leave this step as an exercise for the reader, but to get you started, this SQL query will get you the data you want in an easy-to-read format:

SELECT
   user `Username`,
   frontpagetotal `Frontpage Stories`,
   submitted `Stories Submitted`,
   dugg `Stories Dugg`,
   profileViews `Profile Views`
FROM digg_users
WHERE
   frontpagetotal <= submitted
ORDER BY
   `Frontpage Stories` DESC,
   `Stories Submitted` ASC,
   `Stories Dugg` DESC
LIMIT 100

So to sum up, if you want to manage your own "Top 100 Diggers" list, take the following steps:

1. Import the dump of digg data linked above.
2. Set up and run your scripts
3. Create a readable version of the data.

Have fun, and beware the Digg ban-hammer.