July 2004 Archives

The domed drome

For a while there was confusion in the Perth venue scene due to the existence of both the Perth Superdrome and the Perth Superdome. Though both have since been renamed, it is interesting that such similar words with such difference origins should be used to describe such similar structures.

Drome is from the Greek Dromos, meaning race course or running track. It can be found in words such as hippodrome, a horse-racing course, and palindrome, a word that is the same running backwards as forwards.

Regex Rules!

Apparently Perl 6 will use verbose regular expressions (ie. extended whitespace mode) by default. If it's that highly thought of, then maybe it's time to consider using it too. Although I've never even considered it when writing my own code, I always wish that others would use it to make their code more understandable. This is especially the case since doing a bit more work in Python, where standardised, readable code-layout is enforced. As such, Five Habits for Successful Regular Expressions is highly recommended.

Mesmerising stick men

You might find it all too easy to waste a few minutes following the stick men in this page.

Technically, it's just a small (28kB, 200x200) animated gif that tiles perfectly.

Creating Firefox extensions

| No Comments

Due to its comparative youth, there is a decided lack of information about writing extensions for Mozilla Firefox. Until it reaches its version 1 release, the specs are expected to remain in flux, and this has probably discouraged a few tutorial writers from creating a soon-to-be-outdated series on Firefox.

However, if you're keen, and given the number of Firefox extensions there are lots of keen people around, there is some information scattered about.

  • Books (free)
  • Articles
    • The most complete Firefox extensions information page I've seen is at Roachfiend
    • The Future of Mozilla Application Development
    • - a tutorial-style article about packaging Firefox extensions.
    • Tutorial: Creating a Mozilla Extension - a comprehensive, but old, tutorial for creating extensions for the Mozilla suite. Some changes necessary for it to work for Firefox are mentioned at the end. Due to its completeness it's worth doing the tutorial, but it's inconvenient that it's not aimed at Firefox.
    • Packaging Firefox extensions - crucial documentation on how extensions must be packaged, from the main developer of Firefox
    • Jed Brown has written a quite comprehensive article on converting extensions to the latest packaging format.
    • XUL Planet has a great XUL reference and some great tutorials, that finish just a bit too soon. This is the place to go to learn about all the available XUL tags.
  • Forums
    • The extensions forum at Mozillazine seems pretty well-stocked with knowledgable people.

It's also highly recommended to pick apart a simple extension to see how it works. Knowing that .xpi and .jar files are just renamed .zip files means they can be easily unzipped. Something like Search Button, by Pike, might be a comfortable place to start.

Once you're actually writing code rather than fussing with getting your environment set up then you should find it plain sailing. Seeing as the code is in Javascript you can use the debugging tool of champions, alert("here I am"), liberally scattered throughout to see what's going on.

The DOM Inspector is also greatly helpful. You can go straight to your code by entering the location of its overlay, such as 'chrome://myextension/content/myextensionOverlay.xul' then hitting 'inspect'. Or check out how the browser is made up at 'chrome://browser/content/browser.xul'.

If your extension does not appear to be there, then force Firefox to rebuild its overlay cache by deleting the overlayinfo folder in the firefox/chrome folder. Then resave the installed-chrome.txt file, and restart the browser. You should do this anyway at least once to build up the confidence that you're not killing anything important.

Actually, that last paragraph really only applies to Firefox 0.8. With Firefox 0.9 extensions are installed in profile folders, and I'm not sure what's going on with overlays there.

Recent language problems

The Oxford University Press has been looking at common language mistakes of the present time.

But it has been replaced by misuse of "diffuse" or "defuse" (as in "A coach can diffuse the situation by praising the players").

Research for the new Concise Oxford English Dictionary, published today, found that this word crime was committed in some 50% of examples on the database. It is now rated as the commonest in the language.

Second commonest is uncertainty over when to use "rein" or "reign", found in 26% of examples, as in "A taxi driver had free reign to charge whatever he likes".

Third most frequent (21%) is "tow" instead of "toe", as in "Some pointed to his refusal to tow the line under Tony Blair". Fourth (12%) is "pouring" instead of "poring", as in "He spent his evenings pouring over western art magazines".

Retort of the day

Hallmark sentimentality, maybe; and aabb rhyme scheme, for sure; but these lines are not iambic pentameter -- they're anapestic tetrameter.

My lack of knowledge of the subject makes some of the jargon on the Language Log hilarious.

About this Archive

This page is an archive of entries from July 2004 listed from newest to oldest.

June 2004 is the previous archive.

August 2004 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Archives