“How To Be A Good Mentor”?

There are multiple documents on how to write good bugs, documents on how to release software, and even documents on what to call your computer, both serious and humourous.

But has anyone written a document on how to be a good mentor to a contributor who has joined a free software project? I think one is sorely needed. Once we’ve picked the people we want as quickly as possible, it would be good if everyone knew the best ways to encourage them…

SongBird Preview Released – Under GPL

The first preview version of SongBird, a XULRunner-based media player, has been released. Unfortunately, their site has been Dugg, so it may be a while before you can read all about it. The Digg comments have links to mirrors of the download itself, however.

A particularly interesting thing about this release is that, because they are combining Mozilla code with VLC code to provide the media playback functionality, they are using the XULRunner codebase under GPL terms. This is possible because of the ongoing effort to relicense the Mozilla codebase under a disjunction of three licences – the MPL, the LGPL and the GPL – thereby making the code available for use in many more projects. SongBird is the first in what will hopefully be a long line of innovations enabled by this change.

SongBird actually had to remove various bits of still-unrelicensed code to make their release, but they have managed it – which shows we are close. We are still hoping to get permission to relicence the code they had to remove – there has been movement on this very recently – but if not, it will be removed or rewritten, and then I’ll make a formal announcement that the process is finished.

Localisation Change Monitor

We currently don’t have a good way of automatically knowing if a particular localisation in mozilla.org CVS is up-to-date. I think this might bw useful information to know when trying to do a security release for 30 or more locales simultaneously.

One possible system would watch checkins to the /l10n partition and maintain a “last changed date” for every single key/value pair in every single file. If a value in the en-US file has changed more recently than the value for the corresponding key in the localised file, it would flag that localisation as “out of date”.

The tool would loop as follows:

  • cvs update
  • check to see if any monitored files had been modified
  • load any modified files and look for modified or new keys
  • update its stored last-changed date for those keys to be the file checkin date
  • warn if the last-changed-date for a “base” (en-US) key was greater than the last-changed-date for that key in another locale
  • list the keys and files affected on a per-locale basis
  • write all new date and key info back to the database

Does this seem like a good design?

The only problem would be if a localiser decided that the change in the English string did not warrant a change in the localised string. Perhaps we could make them touch the file anyway, just to flag that they had seen and dealt with the issue? Hacky, perhaps…

Newsgroup Tweaks

Having stepped back and surveyed the landscape, we are considering making a few more tweaks to the newsgroup hierarchy, by merging some groups.

As a matter of principle, we think that both developers and users of a technology (e.g. XUL) should share a group. This sort of mixing is how users become advanced users and then developers. So we won’t be having separate hierarchies for “developing” and “using” the Mozilla platform. (This doesn’t extend to end-user support; we have and will continue to have separate groups, mozilla.support.*, for that.)

Here are our suggestions:

Group Move Discussion To Rationale
mozilla.dev.tech.style mozilla.dev.tech.css Better name improves discoverability
mozilla.dev.tech.widget mozilla.dev.platform Attempt to consolidate platform-related discussion
mozilla.dev.tech.xpinstall mozilla.dev.platform Attempt to consolidate platform-related discussion
mozilla.dev.tech.xslt mozilla.dev.tech.xml XSLT group is too specific; fractures community

Comments, anyone? Of course we will be posting our suggestions in the relevant groups as well.

Interesting Ajax Attack

Jeremiah Grossman recently wrote up a very interesting attack (now fixed) on Gmail, which is worth looking at. The problem was that the Gmail client-side interface got your contact list by doing an XMLHttpRequest to a known URL which was the same for all accounts. The permission checks were, presumably, based entirely on your login cookies. The data arrived in the form of a JavaScript array which the client side then eval()ed. So the attack went like this:

  1. Send the victim’s Gmail account an email with a link you can persuade them to click on, to a page under your control
  2. On that page, have a <script src=”…”> tag accessing the well-known URL for getting the address book
  3. Gmail happily sends back the data, as the person is logged into Gmail and so the request has the correct cookies
  4. Override the anonymous Array() constructor with a function of your choice
  5. When the data arrives, the JS engine calls the anonymous Array constructor (even though it plans to throw away the result, as it’s not assigned to a variable), and therefore calls your function on the address book data, giving you access to it.

Morals:

  • Ajax has new security risks associated with it
  • Don’t put sensitive data in pure JavaScript files with guessable URLs

Hmm. Would it break much of the web if we failed to send cookies on <script> src requests which were cross-domain?

Mozilla Project Localisers Meeting

I’ve just had the pleasure of posting the following message to n.p.m.l10n:

The Mozilla Foundation is pleased to announce that there will be a localisers meeting at the Free and Open Source Developers European Meeting (FOSDEM) 2006 in Brussels, Belgium on the 25th and 26th of February.

All Mozilla Project localisers are warmly invited to attend.

The primary aim of this meeting is for localisers to meet one another and discuss matters of mutual interest and concern. On the second day of the conference (Sunday), the Mozilla developer room speaking track will have a particular focus on localisation. However, attendees will also be able to take advantage of the many other attractions FOSDEM has to offer. FOSDEM is a donation-supported event; there is no charge to register.

While all localisers are invited, the meeting has a European focus. The Foundation would like as many people to attend as possible, and so are offering to pay the primary transport costs[2] of all localisation owners and peers[3] in the following geographical regions[4]:

  • All the areas coloured green on this map excluding Belgium, Holland, France, Germany and Luxembourg
  • Turkey, Israel and Syria

You should consider this a “thank you” from the Mozilla Foundation for all your hard work. If there is anyone who does not fit the criteria but believes they have a good case (such as financial hardship, being mistakenly left off the master list, or localising a project it does not cover) for being offered travel support, they should get in touch.

People who are eligible for travel support should start the process of obtaining visas, if necessary, and looking for flights or other transport. Please do not make travel reservations yet – you will need to book through the Foundation’s travel agency. We will send out more information soon about how to make travel arrangements.

The Foundation has a limited budget and wishes to make the meeting accessible to as many people as possible. Therefore, you are asked not to apply for travel support if you have alternative sources of funds to pay for your trip. Also note that if travel costs exceed our initial estimates we reserve the right to restrict the number of people whose travel we pay for; for example, we may sponsor only the owner for a particular localization, not peers. Of course, we hope this will not be necessary.

We regret we are unable to help with accommodation costs; however, Brussels should have accommodation to suit most budgets. Please make your own hotel reservations. :-)

Please email me if you have any queries.

Gerv

[2] “Primary transport costs” usually means the cost of the plane fare. But if you find that an alternative mode of transport is significantly cheaper or more convenient, please get in touch.

[3] “Localisation owners and peers” is defined as anyone who is on the master lists as of 2005-01-26. The master lists are here and here.

[4] The choice of this area was made with the help of the Frappr localisers map. The Foundation may consider similar meetings in other areas of the world in the future.

I’ve been wanting to do this for a while and I’m very glad it’s now possible. I hope to see you all there! :-)

Implementing <bgsound>

I never thought I’d say this, but I want to write an extension to implement <bgsound>. The idea is that, once the extension is installed, it works just like in IE (as close as possible, at any rate) – including being correctly manipulated by script. What’s the best way to do it? Having it only work in Firefox 1.5 and above would be OK.

My initial idea is to use the new 1.5 interface for adding content CSS stylesheets to bind an XBL behaviour to the <bgsound> tag, which then implements the function using the nsISound interface to get simple playback capability. Is this reasonable? Am I going to run into security problems?

You are all welcome to speculate as to exactly why I would want to do this; I am neither going to confirm or deny any suggestions. :-)

Bigger Than Sony?

brandchannel.com visitors have placed Firefox eighth in their list of “brands which had the most impact in 2005” – bigger than Sony, bigger than Coke. SpreadFirefox crew, give yourselves a pat on the back. You did that.

(And now you know why we have fairly strict trademark policies :-)

News Is Done

The new newsgroups move is complete*! Wahey! Thanks very much to Giganews for hosting the new groups, and Dave Miller and his team for doing all the hard migration work. Hopefully now we can stop worrying about the newsgroups and start using them as a communication tool! I would encourage developers to join the appropriate groups, and be vocal about anything (off-topic conversation, spam…) which prevents them from being a useful communication channel within that part of the community.

Dave is now off on a well-earned break until the end of the month. Any issues with the new groups should be filed in Bugzilla in the normal way (product: mozilla.org, component: Server Operations).

* (OK, there are a couple of loose ends. netscape.public.mozilla.announce hasn’t migrated yet, as we want to do it silently with minimal disturbance, so the thousands of subscribers to the mailing list half don’t get unnecessary admin notices. And we’ve taken down the web-developer groups for the moment, pending discussion with the MDC crew about how exactly they want to do discussion in their new world.)

Update: OK, that loose end might be looser than I imagined. More feedback on the new hierarchy is still coming in, from people who couldn’t quite believe it was actually happening and so didn’t say anything earlier. There may be a few more changes still to make. Watch this space.

FireBug

Joe Hewitt, of DOM Inspector fame, has developed a new Firefox extension called FireBug, which is sort of a combination of the DOM Inspector and the JavaScript console, in a frame at the bottom of each browser window. He only released it a couple of days ago; I happened across it when browsing addons.mozilla.org yesterday. It also allows you to spy on XMLHttpRequest calls, and offers per-page logging.

He says:

FireBug is just a few days old as of this writing. Consider this a pre-pre-pre-alpha release.

so be warned, but it seems to work pretty well to me :-)

mozilla.org recommends iCab

I’ve just changed some text on our download page relating to Mac OS 9 users. The old text recommended Mozilla 1.2.1; the new text says:

Due to the lack of developer interest, build machines, compilers and
testing resources, the last mozilla.org software built for Mac OS 9
was Mozilla 1.2.1, released in December 2002.
However, versions of our software that old are not recommended for
security reasons. Therefore, for Mac OS 9 users, mozilla.org
recommends iCab – which is, as far as we
know, the only graphical browser currently maintained for Mac OS 9.

After a quick discussion, the security group concluded that this was the best thing to do for Mac OS 9 users. My suggestion to them was prompted by a newsgroup message or forum post somewhere, although I’ve forgotten where it was. So if it was you who came up with the idea, thanks :-)

ODF in Firefox

A mysterious person known only as “Talin” posted recently in the newsgroups saying he had started an extension to allow Open Document Format (ODF) files to be viewed natively in Firefox without the need for a plugin. Apparently, the ODF XML format together with its CSS-like style information is reasonably easy for Firefox to render, given some help.

I think this is a really cool demonstration of the power of free software and open standards, and would, practically speaking, be a really useful addon. In fact, if the code wasn’t too complex and large, why couldn’t we include it in Firefox by default? That would certainly accelerate the adoption of ODF.

He didn’t have time to develop it further, and neither do I. He was kind enough to send me the code, so if anyone else thinks this is a cool idea and would like to take it further, get in touch and I’ll pass it on :-)

Tiny Bug, Big Tiny Effect

I just fixed a teeny tiny bug in my relicensing script.

While recursing, it was checking directories against the excluded list by doing an endsWith(). However, one of the directories to be excluded was “ef” (Electrical Fire), an obsolete piece of debugging code, and it turns out that this was matching all directories ending in “ef” – like, for example “pref”.

This small fix has revealed 3500 more files to be relicensed that heretofore I had not suspected the existence of. In fact, I only noticed because I found a freaky file with an NPL header but MPL text, and did an LXR search for “NPL 1.1” to see how many like that there were. Anyway, hopefully my script will make fairly short work of them.

Today’s lesson then, children, is: Don’t trust new tools absolutely. Run cheap cross-checks.

[Update 5.47pm]: OK, so the fix had a bug. The actual number of files is 91, not 3500. Second lesson for today: don’t be too eager to write blog posts explaining your own foolishness, lest you demonstrate it to the world in unintended ways…

Put Yourself On Frappr

I just put out a call in netscape.public.mozilla.l10n for localisers to put themselves on the Mozilla map on Frappr (see below). But everyone all Mozilla project code or QA contributors should feel free to add themselves – the more the merrier!

Dear mozilla.org localisers,

We’d like to make a map of where you all are. This is because the Foundation is considering putting on some events or meetings for localisers, and this information would greatly help with the planning.

So could everyone who is in a localisation team take a moment to do the following? If l10n team leaders could pass this message on to their members, that would be fantastic. The more info we have, the better we can plan. We are using Frappr, a new Google Maps mashup which lets people make community maps.

1) Sign up for Frappr at http://www.frappr.com/ – all you need to supply is a name, email address and password, and you can use the site immediately.

2) During signup, in the “Occupation” section of the Basic Profile, put the following text:

l10n products: <product>; <product>
l10n language: <code> (<free text description>)

Example:

l10n products: Firefox; Camino
l10n language: en-GB (U.K. English)

The products should be taken from the following set:
“Firefox, Thunderbird, Seamonkey, Camino, Bugzilla”
and semicolon-separated. If you do multiple languages, again please use a semicolon as the separator.

You can say “product” or “products” or “language” or “languages” depending on which is correct; I think the regular expressions in any future automatic parsing of this information can probably cope with that. ;-)

3) Go to http://www.frappr.com/mozilla

4) Scroll down the page to “Add Yourself” and click “Add Me!”

That’s it! Thanks!

Gerv

[Update 2005-12-23 5.21pm GMT] I’ve made it clear that the map is intended for code/QA contributors. If e.g. SpreadFirefox people want to make one, that’s cool, but please don’t add yourselves to this one as there’s tons of you and it would make it really hard to see the developers!

Worldpay Recommends Firefox

Worldpay are an online payments solution for small businesses, and they recommend Firefox. You can’t see the recommendation by default but, if you go to their page and turn off page styles (View | Page Style | No Style), as if you were using a browser that doesn’t support CSS well, such as Netscape 4, you see:

Why does WorldPay look like this?
Your browser cannot find our style and presentation information. You are welcome to use the page as is, or upgrade your browser to its latest version. We recommend using Mozilla Firefox which can be downloaded from here. If you are using another browser, please see your browser’s website for more information.

Cool! I’m glad some financial institutions are cottoning on to the fact that more Firefox use is to be encouraged.