15 years of Mozilla – and my first day

Today, Mozilla celebrates its 15th birthday. By a cunning plan sheer coincidence, today is also my first day as an employee, after being involved with the project for a little over 8 years. I’m extremely happy with everything Mozilla achieved in the years behind us, and after a period of being a little less active, I’m pleased to be able to help fulltime in the time to come.

I’m in the Firefox Desktop team, and I’m excited! I’ll (continue to) see all of you around, I’m sure (and will be in Mountain View between April 8th and 20th, if that helps).

Venkman 0.9.88.1 (or, why your scripts might seem to be gone)

A few days ago, the kind people at AMO approved version 0.9.88 of the JavaScript Debugger Venkman. The last release was… 2 years ago! Funnily enough, some users immediately found a show-stopping issue on Firefox 4, which is fixed in Venkman 0.9.88.1, which is currently waiting for review now also available on AMO (thanks to Nils Maier for reviewing!).

So what changed, you wonder? Well, obviously we fixed some bugs. I’d like to briefly discuss just one of them, because it has some repercussions for how you use Venkman:

We no longer start the debugger service when the browser starts (by default)

There were several bugs on file about how Venkman and Firebug made Firefox slower. On top of that, there were recent changes in how components were handled, which meant we could no longer start Venkman (and ask for the debugger service to start) as early as we used to. In fact, the native support from the debugger service to start “really early” was removed by some of the Firefox/Gecko developers as part of this effort. Venkman relied on this support (Firebug doesn’t, they do something similar from their own code).

Why was it important to start the debugger service early?

Because the debugger service only “knew” about functions, variables and script that was loaded when it was started. In other words, if you loaded a script, and then loaded the debugger service after doing so, you wouldn’t be able to debug those files.

So if you no longer start the debugger service early, how does this work?

Thanks to some great work by Wladimir Palant (of AdblockPlus fame), as of Firefox 3.5 we can also get the debug information about functions when they are called. So, when you start Venkman, we will start the debugger service, and for every JS function call, it will tell Venkman about the new code.

I don’t see my scripts or functions when I open Venkman. How do I debug my code?

You have two options:

  • You can load the file (if it’s not shown in the scripts view, try File > Open File (local files) or Open Web Location (urls)) and then set a “future” breakpoint. Venkman will stop there when the code is executed. Instead of loading the file manually, keep in mind any call into a function in the file will make it appear in the scripts list. It shouldn’t be hard to load the file.
  • You can reload the page, and Venkman will see all the scripts appear just like it used to.

Can I get the old behaviour back?

We would prefer it if you tried to work with Venkman the way it is now and let us know about things you think we should do differently or improve. If you’re unable to debug code now that you could debug fine before, please let us know!

If you really need to start the debugger service early, just enter “/startup-init true” (without quotes) at the Venkman console, and we will start the debugger service early (specifically, at the ‘profile-after-change’ notification – slightly later than before, but for most usecases this should not matter).

What about Firebug?

There’s a Firebug 1.6a20 alpha release that is compatible with Firefox 4. I don’t know if they still start the debugger service early if that pane is enabled.

ChatZilla and Firefox 3.5

Just a short note, quite some time ago some trunk changes broke ChatZilla. Accessibility also required some changes. All of these fixes have happened (thanks to dbaron for helping out with the layout fix) – but there has not yet been a release. Seeing as we’re getting close to 3.5, I thought I should note that those affected by these issues (say, people on 3.5b4) can download a nightly ChatZilla build here. New builds appear there after every (set of) change(s) in CVS. This should fix any compatibility issues. If it does not, please file a bug.

Edit: ChatZilla 0.9.85 (released some weeks ago…) has all these fixes, and will work fine with 3.5. Oops! :-)

Moving from CVS to Mercurial

Yesterday, Venkman moved from CVS to Hg. For the benefit of others who may want to move other extensions, here is a rough attempt to outline the steps I took.

First, some notes of caution:

  • HG uses a character encoding specific to your machine. For my mac, that turned out to be mac-roman. You usually don’t want that, and need to tell it you want it to use utf8 instead. I could actually not convince it to do this for the author map – it stored the authors in mac-roman anyway. Check your imports carefully.
  • HG’s default ConvertExtension is your friend, as long as you tell it what to do the right way.
  • You probably want to create a test repo (I ended up using several, in trial and error!) at hg.mozilla.org/users. Instructions for doing that may be found here. Keep in mind that once you stick something in a Mercurial repo, it will be there forever. This means anyone pulling from your repo will have to keep downloading all those files. Be careful about what you push to the repo, because once you’ve pushed something there’s no going back (short of asking IT to delete the repo and trying again).

Alright. Down to the actual import. Here is the actual steps I ended up following. When I say “ended up” I mean “after trying N different things which didn’t work”, where N was large enough to keep me busy for a fair number of hours.

  1. Check out the relevant code from CVS. In my case, this meant:
    cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/extensions/venkman
  2. Enable the convert and mq extensions. Edit your ~/.hgrc file and include:
    [extensions]
    hgext.convert=
    mq =
  3. Decide whether you want all the branches in CVS. If, like me, you’re importing an extension, you probably don’t care about the Firefox/Mozilla release branches. You just want trunk history. In order to do this, we ask the convert extension to split up branches. Edit your ~/.hgrc file and include:
    [convert]
    hg.usebranchnames=0
    hg.clonebranches=1
  4. Now you can run convert, more or less like this:
    hg --encoding utf8 convert vnkCVS/mozilla/extensions/venkman venkman-initial
  5. Inspect your handiwork: you will now end up with several directories, one for each branch. You presumably want “default”, which should correspond to trunk. We will convert from hg to hg in a bit, to obtain just that.  Go back to your ~/.hgrc file and remove the [convert] section you added in step 3. This way, the new repo we’ll convert to won’t still have the “default” directory.
  6. Additionally, we still need to map authors. CVS used something like: “foo%somecompany.com”, and in Mercurial, we expect something of the form “John Doe <johndoe@mozilla.com>”. So we need to define an author map file, in which each line simply maps one set of authors to the next. For example:
    johndoe%mozilla.com = John Doe <johndoe@mozilla.com> . I uploaded the Author map for Venkman CVS to hg import that I used. It probably does not cover everyone who committed to your repo. If there are aliases that you’re not familiar with (Mozilla CVS is pretty old!) then Google and asking on IRC are easy ways of figuring out who’s who. To create a complete author map, I used some ad-hoc sed magic on:
    hg log | grep "user:" > foo.txt
    
  7. You may want to unify the entries of committers who have committed using different committer IDs. Ohloh can help there.
  8. Run hg convert again:
    hg --encoding utf8 convert --authors myAuthorMap.txt venkman-initial/default/ venkman-final/
  9. Check hg log. If there are loads of tags in which you’re not interested, you can use the hg strip command to strip the last hg revision, which added all the tags.
  10. Verify everything worked. Then add the correct “default-push” line to the .hg/hgrc file for the new repo you created, and push to your user repo. Check that everything is correct by reviewing the hgweb overview of things. If so, change the default-push line to point to the “real” repo, and push all the changesets there. You’re done!

This may not be the easiest or best way to do things, but that’s the way I managed – suggestions/improvements appreciated!

Zeven zonderlinge zaken

Oh no! I was tagged by Axel Hecht. And I don’t even understand his reason for tagging me (id est, he gave a reason and I don’t understand it). By the laws of the internet (and to make myself and my relationships to others “less one-dimensional“) I had better comply, however.

So, the rules:

  1. Link to your original tagger(s) and list these rules in your post.
  2. Share seven facts about yourself in the post.
  3. Tag seven people at the end of your post by leaving their names and the links to their blogs.
  4. Let them know they’ve been tagged.

Seven facts:

  1. I am a Dutch national, currently doing my MSc Advanced Computer Science in Britain, and taking intermediate-level French lessons on the side. The accent of (some of) my classmates drives me insane.
  2. I got into Mozilla (and eventually its development) by writing scripts in VBScript for a fansite of an MMORPG (to calculate experience gained from using certain skills), and having the website owner tell me that the result “didn’t work in Mozilla”. Very badly written JavaScript versions were published later, and I vividly remember cursing the various differences I ran into when converting my code. Everything seemed much harder in JS. I’m afraid the damning evidence of all this is now lost, as the website was taken down some time ago.
  3. I once taught first-year students in highschool (when I was a fourth-year, out of 6 years) how to make websites with Frontpage. I am hopeful none ever got published somewhere remotely important. I repented before the end of highschool.
  4. I had the dubious honour of working for McDonalds once, for 6 months on a temporary contract. I declined staying afterward.
  5. The pronunciation of my first name (and the difficulties people have with it) is a subject of hilarity among some of my international friends that I have by now resigned to. For those who don’t know how to deal with it still, I wrote about it some time ago. For something that even people who read that post might not know, it is short for “Gijsbert” which is equivalent to the name “Gilbert” in German, English, and French. Except nobody there actually calls their kids Gilbert.
  6. I have 5th cousins who live in Alberta, Canada, who randomly found me through Facebook.
  7. I was robbed in my own home (student flat) at knifepoint about 2.5 years ago. Fortunately, nobody got hurt. I still have the IRC log from that day and at the time its timestamps helped me, bizarrely enough, to identify precisely how long the robbery took to the police.

Seven people who shall also have to go through this harrowing experience:

  1. Nadya Peek, because she always has something to say but never blogs.
  2. Aaron Leventhal, who tends to have interesting stories about his history, and certainly has more of that than me. ;-)
  3. Ben Millard, who doesn’t seem to have been tagged yet.
  4. Okke Formsma, who is in the states at the moment and would presumably love to share childhood memories while far away.
  5. “Schrati”, because she keeps blogging in different languages and I really wonder in which she would write this.
  6. Daniel Glazman, because so much of his life is public knowledge by now that I wonder what we do not yet know.
  7. Shawn Wilsher, because if I remember correctly he got into the Mozilla Project after me, is now definitely in much deeper than me, and still did not respond to the previous person who tagged him. :-)

And finally, if you were wondering, the title of this post means “Seven freaky things”, not “Seven without linge cases” as Google would like you to believe.

Usability: know your users

While I was in Brussels for the European Meeting of Taizé, I was co-responsible for the rubbish collection during meals (with 25,000 people eating in big exposition halls, you need people to take care of the trash they create, obviously).

We would separate bottles from all other rubbish, so we could recycle the empty bottles separately. So, we needed some way to label rubbish containers which were for bottles, and containers which were for other rubbish. While worrying about this, I was told that the company providing the containers had already “taken care” of labelling the containers so that some would be used for bottles and some for other rubbish. Curious as to what they had done, I went to look.

Unfortunately, I don’t have pictures, but basically what they had done was taking 2 A4 papers for each container, printed “PET” on them as big as possible, and stuck them on either side of the container with one piece of doublesided tape.

There are several things wrong with this. First, and most importantly, the target audience (young people from all over Europe and in some cases the rest of the world) will largely have no idea what “PET” even means. In fact, I would guess that some part of the people reading this blog don’t. In the Netherlands and Belgium, it is a fairly common abbreviation used to indicate plastic (even if it’s not strictly speaking PET). 9,000 of the 25,000 people were Polish young people. Some of them don’t speak English very well. Even those who did would most likely have been baffled by the signs.

The other mistakes are smaller: the papers had been attached in such a way that some would be upside down on the other side if the container was opened, and in other cases they were only attached on one side, meaning people approaching from the other would have no idea they couldn’t put their rubbish there.

Finally, using one bit of double-sided tape to attach a bit of A4 paper when there are 25,000 young people coming is naive at best. The papers that we did not take off the containers ourselves had, by the end of the meeting, been taken by the young people, or fallen off.

Instead, our team improvised a different solution. We stuck signs with a big image of a bottle, and the phrase “Bottles only” in several languages on the containers, using large quantities of duct tape. We taped shut the bigger openings of the containers which had two, so only the small opening remained, through which people would have more trouble putting their normal rubbish. And finally, we taped actual empty bottles to the top and sides of the containers.

I guess the lesson I learned from all this is that it is surprisingly easy to make stupid mistakes when you don’t realize who will be using your “product”. For the Belgian rubbish collection company, “PET” was probably clear enough in the case of big expositions with reasonably well-educated Belgian people manning stands from where the rubbish would come… For large crowds of young people from diverse backgrounds, clearly it was not.

Update: Patricia Clausnitzer translated this article to Belorussian.

Notifications for new issues in Google Code

Dear Lazyweb,

For Chrome List, every now and again people report issues they are having on its Google Code website, using the “Issues List”. This is very useful, and I would like this to continue. However, for some reason, I don’t get email for these issues that people report. I need to manually check every now and then, then star new issues so I get email for them.

Can I change this? I’ve googled around, I’ve gone through all the options in “Administer” three times, but I can’t find it. I would really like to have those emails, though, because right now sometimes I don’t check that list for a few days/weeks/months, and people’s problems don’t get solved…

Thanks!

Back/Forward and JS + XHR + URL Manipulation

Steps to reproduce:

  1. Go to your Facebook inbox page, pick a random message, and start typing a reply
  2. Halfway through, realize you want to read a different message before finishing this one.
  3. ‘Accidentally’ left-click instead of middle-click the link at the top for the inbox.
  4. Hit escape to stop the load so as to be able to still have the text you type

Expected result:

Stop loading the inbox page, get to keep your written stuff

Actual result:

This is JavaScript executing. There’s no stopping it from throwing away your text anymore by returning to the inbox – and what’s worse, the back/forward history is so confused by what’s going on (as you hit escape) that it won’t be able to take you back to the reply page and restore your message to the textbox (as back/forward generally does in Firefox). Congrats, you just lost N minutes worth of typing, and who knows what kind of brilliant ideas!

Question to the Lazyweb: whose fault is this? Can it be fixed? How? (Yes, I’d prefer to just use email all the time, too, but unfortunately that’s not always an option, and I’m sure there are webmail implementations which have similar problems, especially once you turn off automatic draft saving)

Back in a land with internet

In relation to the previous post, I am now back – sort of. Wednesday 10 until Thursday 18 I will be in Sweden for another small holiday, and the 26th I move to London to start studying for my Master’s degree. I should be settled in there somewhere after the first week of courses (think October 10th).

If there is something you need me to take care of urgently, please let me know. Right now my priorities are with moving out of the Netherlands for a year and possibly more (which is not trivial). In some spare time I try to work on ChatZilla accessibility (specifically, my long overdue halfway report) and some of the bug reports about Chrome List that I’ve been getting. There is also Venkman demanding some attention. If anyone would like to help out with that, please have a look at the wiki page that Alex et al. created. You can usually find either of us on IRC if you’re interested in helping out. It’s really quite necessary because in its current state it is not doing that well (several basic features are broken with Firefox 3(.0.1) and on trunk).

Absence & Citation Needed

First things first, as of July 2nd, I will be off to Taizé again. I won’t be back until the start of September, and I’m not sure about the exact date. Because I will have to spend a lot of time taking care of my stay in London at Imperial College after that time, I suppose one could say I will be gone in July, August and September, for all intents and purposes related to Mozilla. And actually, I’m writing my thesis now, so if you have things that you need me to do you can try to still get to me, but it might be too late already. I’ll try, though. Emails and comments here are free, so give it a shot if you need me.

Second, in connection to this thesis thing:

Dear Lazyweb,

I would like a way to make LaTeX do a [citation needed] in true Wikipedia style. I often find myself thinking “if I want to write something like this, I need a reference to back it up”, but searching for a good one for minutes/hours on end breaks up my writing process, so I’d much rather make a note to self and keep writing, especially for things which I am very sure of there must be a reference for. Example: “the POSIT algorithm was conceived in the 1990s by John Doe[citation needed]“.

Yes, I know that by default, LaTeX will do a [?] if I try to reference something that doesn’t exist, but that’s (a) not obvious enough for my taste, and (b) it might be the result of a misspelled BibTeX id or such, and I’d rather not mix the usecases of “deliberately left blank” and “oops, misspelled the citation identifier and/or forgot to re-run BibTeX after adding citations”. I haven’t found an easy way to do this.

Thanks!
Gijs