March 31, 2006

Amazon cuts negative reviews

Posted in Society at 13:29 by graham

A very interesting article about Amazon censoring a negative review. I have had exactly the same experience. I left a negative but, I thought, well written review which explained why I didn’t enjoy the book. Amazon never posted it. When I wrote to them they claimed it was pulled because I revealed too much about the book (I didn’t).

All this to say don’t buy a book based on it’s reviews on Amazon – they may only represent one side of the story.

Amazon: Good web services, unethical editors.

Update: It seems this practice is nothing new. See articles in the New-York Times, and online here and here

March 26, 2006

Firefox Sage extension – beginning development

Posted in sage, Software at 16:25 by graham

I have been using Sage as my feed reader. It’s a great Firefox extension, and it’s very easy to develp with. It took me a little while to get started, so here are my brief notes on how to start hacking your local Sage copy. Thanks to Thomas Themel from the Sage mailing list for getting me started.

Before you start, setup your Firefox for development. Particularly you will need to install the Extension Developer extension. This will allow you to reload you extension during development without having to close and re-start Firefox each time.

Install Sage and bounce Firefox. The .xpi file you downloaded is just a zip file. Installing it unpacks it into your extensions directory.

Go into your profile directory. On Linux this is, from your home directory, .mozilla/firefox/default.XY/extensions/NUMBER/chrome. The NUMBER will be the most recent by date, as sage is the most recent extension you have installled.

Create a new sage directory.

Move sage.jar to the new sage directory.

Run jar xvf sage.jar (assuming you have the jar tool – it comes with any recent version of java). You might be able to use something like WinZip for this. This extracts the files in sage.jar into the current directory.

Rename sage.jar to sage.jar.old

Edit chrome.manifest: replace all jar: references with relative URLs, like changing

content sage    jar:chrome/sage.jar!/content/

to

content sage    chrome/sage/content/

In install.rdf comment out the <em:file> section.

In your profile directory, .mozilla/firefox/default.XY edit (or create) user.js and add:

user_pref("sage.loglevel", 0);

to turn on Sage’s logging.

You are ready to go. Edit one of the files in the new sage directory.

To reload changes, use the Extension Developer plugin, and do ‘Reload all chrome’

Much more information on Extension Development is available from the MozillaZine extension development center

Happy Hacking !

March 20, 2006

Sage – the graham patch

Posted in sage, Software at 00:03 by graham

I’ve started using Sage as my feed reader. It’s a very nice Firefox plugin, but was missing a few things I wanted. Coincidentally I’d been wanting to learn more about Firefox plugins, and I had a free weekend (update: more like a few weeks!)…

Here is a patch to apply to the most recent version of Sage from CVS, as of this post. This patch should be applied from within src/. This patch adds:

  • A count of unread items by the feed name, with a setting to turn it on / off.
  • A timeout on the request of each thread. This defaults to 5 seconds and is configurable via the settings screen.
  • The name of the creator of each post, if there is one, in the feed item list box (bottom of sidebar). This is particularly useful for group blogs.

Or install the full extension directly (save the file locally, then File/Open it). Note that this is the latest version from CVS, not the released version, so you’re on your own if it goes wrong (it’s the version I use all the time, so hopefully it’ll be fine!).

Note that Sage 1.4 doesn’t currently respect the preference not to automatically update feed titles. If you use custom feed titles this will overwrite them.

Update: The patch and full version should work in English, French, German, Spanish and Japanese. Further translations welcome.

If you install it, your sage will look like this:

Sage - unread count - screenshot

More technical details on the patch follow…

I added a couple of methods to commonfunc.js, one to get the unread item count for a feed, another to update it. The update method gets called from updatechecker.js when the feeds are updated, and from various parts of sage.js when one or more items are marked as read / unread.

I had originally wanted to put the getUnreadItemCount and updateUnreadItemCount methods in sageFeed.js, but this is only accessible via the idl, and I could not figure out how to pass the resource (lastResource) into the idl.

I save the number of updated items as a preference, because I couldn’t think of another easy way to store persistent data.

I hope you like the patch.

March 12, 2006

Shaun Inman – "10 reasons why you need to build an API"

Posted in Future of Web Apps, Software at 19:08 by graham

Shaun Inman is the creator of Mint. He gave a presentation at the Future Of Web Apps (futureofwebapps) conference, held in London on Wednesday 8th February. It was a short presentation with little elaboration of the 10 reasons, followed by a lengthy Q&A session.

An API takes a good thing and makes it better. API must not change.

API allows external extension of your application. A plugin architecture allows internal extension.

The 10 reasons are:

  • Increase brand awareness
  • Allow users to own their data
  • Build goodwill with developers
  • A perfect excuse for a community
  • Solving programming problems with an API in mind can improve code quality
  • Simplify internal reuse of data
  • Allow others to extend the functionality of your application
  • Alternate input mechanisms
  • Unanticipated applications of your data
  • Turn your program into a platform

    The initial Mint release only supported Firefox and Safari (not IE), to cut down on the support calls by only having technical users.

    See also Larsz’s mind map.

March 11, 2006

Tom Coates – Native to a Web of Data

Posted in Future of Web Apps, Society, Software at 19:45 by graham

This is a write-up of my notes from Tom Coates’ presentation at the Future Of Web Apps (futureofwebapps) conference, held in London on Wednesday 8th February.

Tom Coates used to work for the BBC, and has recently joined Yahoo. He has worked with Simon Willson. Tom had a highly polished presentation. Here are the notes:

  • We are moving from web pages connected by links to data connected by APIs.
  • The Web 2.0 design aesthetic can be summed up as: Rounded corners and gradient fills.

  • The future according to Tom: A web of data sources, services for exploring and manipulating data, and ways that users can connect them together.

  • Mash-up: A network effect of services. Web as a platform. Hybridization of web services together makes both of them better.

  • APIs drive people to your site, allow people to enhance your site. You don’t have to do all the work yourself. People might start charging for the user of their APIs.
  • “What can I build that will make the whole web better ?” The Aggregate Web. **It’s all about data** – owning, exploring, manipulating.

  • Build for normal users (the HTML interface), for developers (the API), and for machines (XML, predictable and consistent URLs and structure)

  • Start designing with data, not pages. Navigable, re-usable, explorable data.
  • Identify core objects that people will refer to. For the BBC, that’s programs, films, events, people. Then make each core object addressable by URL.
  • Good URLs: permanent, readable, and have a 1 to 1 correlation with concepts. Use directories to represent hierarchy. Predictable, guessable, hackable. Reflect structure of data. Only 1 URL for a piece of data. For example the BBC needs to have one and only one URL for a single program. That way all entries on the web will connect to that one URL, and will be connected themselves.
  • Correlate with external identifier schemes (such as ISBN)in your URLs, or coin a standard if there isn’t one. If 100 people are blogging about a film, they need to be connected somehow – if they all link to the same BBC or IMDB page, they will be connected.

  • Build list views and batch manipulation interfaces. Types of page:

    • Destination page (the entry of a film). Make XML versions of these.
    • List page (search results, lots of films). Make RSS versions of these.
    • Manipulation page (comment on a film). If needed, use AJAX / Flash here.
  • Make sure your AJAX / Flash doesn’t break your URLs. Keep it in the page. Only manipulate the concept of that page.

  • Use standard formats where possible. See microformats.org.
  • Make your data as discoverable as possible.

    That’s the end of my notes ! See also a good mind map of this talk

March 8, 2006

Javascript credit card generator fix

Posted in Credit card at 21:40 by graham

There was a mistake in the Javascript credit card generator, meaning it would not work on MS Internet Explorer or Opera. This has now been fixed, and I have tested it successfully on:

  • Firefox 1.0.6
  • Konqueror 3.4.1
  • Internet Explorer 6.0
  • Opera 8.5.2

The archive now also includes an example on how to use the Javascript version (which seems the most popular).

Get it here