February 07, 2010
I’ve been teaching myself to write Firefox extensions for the last few weeks, and became interested in XPCOM components. Unfortunately, I couldn’t find a good (and recent) summary of them, and had to spend 3 or 4 days cobbling together various tutorials, so I figured it’s time to write one.
What is XPCOM?
XPCOM is a language-agnostic communication platform used in Mozilla products (and some other random pieces of software) to allow code (specifically extensions) to be written in a wide variety of languages.
Why would I want to use XPCOM?
There are two ways to “use” XPCOM. First, you can call functions through XPCOM. For example, the Firefox bookmarks service uses an XPCOM interface. So in order to interact with this service from Javascript you would do something like:
var bmarks = Components.classes["@mozilla.org/browser/bookmarks-service;1"].getService();
bmarks.QueryInterface(Components.interfaces.nsIBookmarksService);
bmarks.addBookmarkImmediately("http://www.mozilla.org","Mozilla",0,null);
There are plenty of tutorials on doing this as it is the more common use for XPCOM, so I won’t go into any detail on it here.
The second way is to write an XPCOM service. That is what this tutorial covers. Sometimes you need extra functionality, speed, or just want to tie into some library that requires a different language. Most commonly this is C++, but there is also JavaXPCOM and PyXPCOM (and probably a few others). I’ll be talking about C++, since it’s what I needed for my project.
Warnings
- Before you trudge through this: you most likely are in the wrong place. Firefox extensions are usually all Javascript. If you can use JS to do what you want, stop now. There is no need to go through the complexity of an XPCOM component when you can just use JS. Go read a tutorial about writing extensions and get to work.
- There is something called ctypes coming to FF 3.7 that may make doing this a lot easier. I haven’t touched this at all, but it may be worth considering if you can wait for the functionality and only need to tie into a particular DLL for some functionality. Long story short, XPCOM may become the more difficult way to call C++ functions from FF extensions.
My Setup
- Windows 7
- Visual C++ Express 2008 (free from Microsoft’s website)
- Firefox 3.6 (Gecko 1.9.2)
- A UUID or GUID generator. This is a unique (read: random) ID that identifies your app to the world. Windows and Linux have tools to generate this (guidgen & uuidgen, respectively), or you can find various online generators (Mozilla links to several). I recommend this one since it gives you the C++ encoded form too, which you will need. You need two different UUIDs: one for your interface and one for your component.
- Ability to read and understand C++
Sample Code
If you don’t want to go through the tutorial and just want everything to work, then download this sample code. Just follow step #1 of the tutorial, then make sure your Gecko SDK directory is set right in the build step, and you can breeze on by most of this article.
The Tutorial
This is mostly paraphrased from Alex Sirota’s great tutorial, but it hasn’t been updated since 2005 and is a bit outdated. This new one should work out of the box for FF 3.6.
This tutorial will create a component called MyComponent with one function: Add, which will take 2 numbers and, surprisingly, return the sum.
- Download the Gecko SDK for your version of Firefox. I used 1.9.2 for FF 3.6.
- Create an idl file -
IMyComponent.idl, with the following (replacing ***IUID*** with your interface UUID):
#include "nsISupports.idl"
[scriptable, uuid(***IUID***)]
interface IMyComponent : nsISupports
{
long Add(in long a, in long b);
};
This file is a language-agnostic interface definition which you can read more about here.
- Generate the interface header and typelib files out of the interface definition file. Assuming you extracted the Gecko SDK to
C:\xulrunner-sdk\, run the following commands (from the directory you saved IMyComponent.idl to):
C:\xulrunner-sdk\sdk\bin\xpidl.exe -m header -I C:\xulrunner-sdk\idl .\IMyComponent.idl
C:\xulrunner-sdk\sdk\bin\xpidl.exe -m typelib -I C:\xulrunner-sdk\idl .\IMyComponent.idl
These will create IMyComponent.h and IMyComponent.xpt, respectively.
IMyComponent.h has two snippits of code that you can use for the next two files. Everything between /* Header file */ and /* Implementation file */ can be used for MyComponent.h:
- Start by inserting double inclusion protection code and the right include:
#ifndef _MY_COMPONENT_H_
#define _MY_COMPONENT_H_
#include "IMyComponent.h"
- Add the following lines, which define your component name, contract ID, and CUID (where ***CUID*** is the C++-style component UUID, of the form { 0×12345678, 0×9abc, 0xdef0, { 0×12, 0×34, 0×56, 0×78, 0×9a, 0xbc, 0xde, 0xf0 } }):
#define MY_COMPONENT_CONTRACTID "@example.com/XPCOMSample/MyComponent;1"
#define MY_COMPONENT_CLASSNAME "A Simple XPCOM Sample"
#define MY_COMPONENT_CID ***CUID***
- Copy in the snippet from
IMyComponent.h, replacing all the instances of _MYCLASS_ with the name of your component (MyComponent).
- Finish off the double inclusion protection code with
#endif //_MY_COMPONENT_H_
- Everything between
/* Implementation file */ and /* End of implementation class template. */ can be used for MyComponent.cpp:
- Start by inserting the right include:
#include "MyComponent.h"
- Copy in the snippet from
IMyComponent.h, replacing all the instances of _MYCLASS_ with the name of your component (MyComponent).
- Add some implementation to the
Add method. I replaced return NS_ERROR_NOT_IMPLEMENTED; with
*_retval = a + b;
return NS_OK;
- Create your module definitions files:
#include "nsIGenericFactory.h"
#include "MyComponent.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(MyComponent)
static nsModuleComponentInfo components[] =
{
{
MY_COMPONENT_CLASSNAME,
MY_COMPONENT_CID,
MY_COMPONENT_CONTRACTID,
MyComponentConstructor,
}
};
NS_IMPL_NSGETMODULE("MyComponentsModule", components)
You now have all of the files needed to build an XPCOM component:
IMyComponent.h
IMyComponent.idl
IMyComponent.xpt
MyComponent.cpp
MyComponent.h
MyComponentModule.cpp
Now comes the hard part: getting the damn thing to build.
Building the code
Ok, it’s actually not hard since I’ve done most of the legwork for you. Assuming you’re using Visual C++ 2008 here are the settings you need (again assuming C:\xulrunner-sdk is where your Gecko SDK is). In Project->Properties:
Configuration Properties
General
Configuration Type: .dll
C/C++
General
Additional Include Directories: C:\xulrunner-sdk\include
Preprocessor
Preprocessor Definitions: XP_WIN;XP_WIN32;XPCOM_GLUE_USE_NSPR
Linker
General
Additional Library Directories: C:\xulrunner-sdk\lib
Input
Additional Dependencies: nspr4.lib xpcom.lib xpcomglue_s.lib
If you put the idl file into your project, be sure to mark it “Excluded from Build” in its properties…we don’t want VS touching it.
Cross your fingers, pray to whatever deity you believe in, and hit the build button. If it didn’t work let me know why in the comments and I’ll try to build a troubleshooting section.
Installing/Testing the Code
- Copy two files to
C:\Program Files\Mozilla Firefox\components:
- The DLL the build generated
IMyComponent.xpt
- Normally, if this was installed as part of an extension, it would automatically search this directory and find these files. But now we have to force a refresh. Delete
xpti.dat. and compreg.dat from your profile directory (FF will regenerate them on next restart)
- Close Firefox and open it with this test file (
MyComponentTest.html in the sample code):
<html>
<script type="text/javascript">
function MyComponentTestGo() {
try {
// normally Firefox extensions implicitly have XPCOM privileges, but since this is a file we have to request it.
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const cid = "@example.com/XPCOMSample/MyComponent;1";
obj = Components.classes[cid].createInstance();
// bind the instance we just created to our interface
obj = obj.QueryInterface(Components.interfaces.IMyComponent);
} catch (err) {
alert(err);
return;
}
var res = obj.Add(3, 4);
alert('Performing 3+4. Returned ' + res + '.');
}
</script>
<body>
<button onclick="MyComponentTestGo();">Go</button>
</body>
</html>
- One last time: cross your fingers, pray to whatever deity you believe in, and hit the Go button. If it didn’t work let me know why in the comments and I’ll try to build a troubleshooting section.
Hopefully this clears up what looked like a lot of confusion to me. I will keep this updated to the best of my abilities and hopefully it will continue to be useful for a long time.
February 07, 2010 08:47 PM
February 03, 2010
Today, I attended a Social Media Week event at the Rivoli. Nelson Ko of Citidel Rock gave a presentation, Why You Need To Wiki As Part Of Your Social Media Initiative And How.
Unlike the IN09 conference I attended last year, this event didn't have the same mix of software developers and content creators. Most attendees were the avatars of various non-profits who wanted to see if the wiki could serve their needs.
Free message with every medium!
Ko started with a smattering of theory which is something I love (when I'm not writing an exam). He started with the famous Marshall McLuhan quote: The medium is the message.
McLuhan in my own less succinct words: The technology you use to communicate your message carries its own message, perhaps at a barely audible whisper, but it is one which shapes (or distorts) the message you meant to convey.
Neil Postman's Amusing Ourselves to Death makes the point that the overriding message of television is that everything can be judged as entertainment. No matter what you are watching, you can't help asking, "Is this fun or is this boring?"
Or, more eloquently:
"[It] is not that television is entertaining but that it has made entertainment itself the natural format for the representation of all experience. […] The problem is not that television presents us with entertaining subject matter but that all subject matter is presented as entertaining."
— Neil Postman, Amusing Ourselves to Death
But what is the message of wiki media? Mr. Postman, set me up:
"[M]ost of our daily news is inert, consisting of information that gives us something to talk about but cannot lead to any meaningful action."
— Neil Postman, Amusing Ourselves to Death
Well, the information in a wiki is actionable. If you can't do anything with it (and in the case of sites like WikiHow you can) then you can at least do something to it.
Ko talked about divergence and convergence — the difference between broadcasting something (traditional publishing) or collaborating on something (social media). I'm not going to repeat the whole presentation, but I thought he made an interesting point here about most collaboration tools being at the personal end of a personal-public continuum such as email or the telephone. Wikis are something new in that they are public.
Carrot sticks!
Ko's presentation was free flowing with lots of Q&A interspersed. The audience seemed most keen to learn how to guide and motivate users to contribute. (I'm sure that marshaling the efforts of volunteers is a paramount problem for any non-profit.) Ko had a slide about the various carrots and sticks that typically motivate people, which I jotted down:
- reputation and recognition
- social and networking benefits
- scratching an itch
- hobby, enjoyment or personal interest
- obligation from ethics or conscience
- compulsion or threat of explusion
- swag
- money
I personally think reputation and recognition are the big motivators is social media. People "play" wikipedia or digg much like they play WoW. You are always trying to level up. But that's just my take. The rest of the list is fairly self-explanatory, except for compulsion which left me scratching my head. Unlike obligation (Wikileaks), I can't think of wiki where compulsion is the prime motivator.
Ko warned would-be wiki curators not to make contributing into a chore.
"Don't characterize it as work," cautioned Ko. "It ruins the atmosphere."
There was also another item from the slide, "learning by doing", which I omitted. This pertained to the question of guiding as opposed to motivating. I omitted it because the consensus seemed to be that there is no easily repeatable way of teaching users how to contribute. There are repeatable methods for inviting people into the community, but training them to be productive is always an ad hoc effort.
At least that's what I heard. I hope someone else blogs the event. I want to know what other people thought.
February 03, 2010 11:10 PM
January 28, 2010
As I gear towards graduation at Seneca College, I am actively engaged in an a professional Apple Development course. Why am I enrolled? Merely an interest for learning different languages; discovering their quirks, oddities and normalities. As well, I am using this astute scenario to experience the procedures and protocol in developing software on a mobile device. Nonetheless, the course should be fun and a unique learning opportunity.
As part of my first lab, we were to get a feel for the different interface builder UI objects within a single view in order to create a manipulating student profile. See below.

January 28, 2010 01:17 AM
January 10, 2010
After reading Mike Connor's blog post about in fact forcing extension authors to use JetPack and theme authors Personas, I'm horrified: That's killing of what have made Mozilla and Firefox so successful - extending the application in *ANY* possible way. That includes extensions implementing features *no one was thinking of before*.
I have learned the downsides of writing XUL and JS based extensions. JetPack may help authors of smaller extensions, but bigger ones require, and will always require, more. So please: let every extension author decide if he wants to use JetPack or the current way of writing extensions. Don't replace the "old way" entirely by JetPack!
January 10, 2010 05:18 PM
December 30, 2009
Today marks the launch of the redesigned bpung.com. The site contains information about myself and the projects that I’ve contributed to, along with this blog. I’d like to thank Matt Huang for advising me on which tools to use in the construction of the site, as well as helping me tweak the desig...
December 30, 2009 06:26 AM
December 18, 2009
This afternoon, I indulged myself by returning to my HTML5 experimentation and tinkering, toying with the canvas element by testing the waters of different functions under the HTML5 specification API.
All was good until I got to getImageData(), where I encountered an exception in console. The crux is this: I’m getting an NS_ERROR_DOM_SECURITY_ERR error when trying to run context.getImageData()
A bit about getImageData():
To obtain an ImageData object containing a copy of the pixel data for a context, you can use the getImageData() method:
var myImageData = context.getImageData(left, top, width, height);
Ultimately, I wanted to use this function to place a image on canvas and perform some direct pixel manipulation; perhaps inverse an image by first getting the image data from a context.
window.addEventListener('load', function () {
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var img = new Image();
img.addEventListener('load', function () {
var x = 0,
y = 0;
ctx.drawImage(this, x, y);
var imgd = ctx.getImageData(x, y, this.width, this.height);
var imxpxl = imgd.data;
for (var i = 0, n = imxpxl.length; i < n; i += 4) {
imxpxl[i] = 255 - imxpxl[i]; // red
imxpxl[i + 1] = 255 - imxpxl[i + 1] // green;
imxpxl[i + 2] = 255 - imxpxl[i + 2] // blue;
// i+3 is alpha
}
ctx.putImageData(imgd, x, y);
},
false);
img.src = "http://www.google.ca/intl/en_ca/images/logo.gif";
},
false);
Running this code, I didn't get the results I expected. In fact, I did not think out of the ordinary was incorrect, until I checked the error console and found:
Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "file:///pixeldata.html Line: 16"]
Interesting - why the need to raise privileges? Am I forgetting something here? If I toss a,
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
I end up with something yucky like this
try {
try {
imgd = ctx.getImageData(x, y, this.width, this.height);
} catch(e) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
imgd = ctx.getImageData(x, y, this.width, this.height);
}
} catch(e) {
throw new Error("unable to access image data: " + e);
}
but, running the code will yield:
A script from "file://" is requesting enhanced abilities that are UNSAFE and could be used to compromise your machine or data:
In this case, the code will run - but it will leave you with an impression that what you're doing is wrong.
I'm not nefarious, I swear! No intent to do harm here. I am trying to understand the reasoning and or need for raised privileges just to extract data from a context. With a write to canvas, a nefarious user could write something nasty to context, but why with getImageData?
- Aaron
December 18, 2009 10:15 PM
December 14, 2009
UPDATE: ‘Fatalis’ has pointed out in the comments that the POST should be made to http://goo.gl/api/url with User-agent set to ‘toolbar’. The code now works, Yay!
Google just announced their own URL shortening service. Their service can only be used from the toolbar or FeedBurner, and I don’t particularly like adding extra toolbars to my browser. Maybe I can figure out a way to use their service from the command line?
I downloaded the toolbar XPI, unzipped it and peeked inside. Horribly indented JS awaited me. Nothing jsbeautifier couldn’t fix though. Few minutes later, I arrived at this readable JS function:
var getUrlShorteningRequestParams = function (b) {
function c() {
for (var l = 0, m = 0; m < arguments.length; m++)
l = l + arguments[m] & 4294967295;
return l
}
function d(l) {
var m = String(l > 0 ? l : l + 4294967296);
for (var o = 0, n = false, p = m.length - 1; p >= 0; --p) {
var q = Number(m.charAt(p));
if (n) {
q *= 2;
o += Math.floor(q / 10) + q % 10
} else o += q;
n = !n
}
m = m = o % 10;
o = 0;
if (m != 0) {
o = 10 - m;
if (l.length % 2 == 1) {
if (o % 2 == 1) o += 9;
o /= 2
}
}
m = String(o);
m += l;
return l = m
}
function e(l) {
for (var m = 5381, o = 0; o < l.length; o++) m = c(m << 5, m, l.charCodeAt(o));
return m
}
function f(l) {
for (var m = 0, o = 0; o < l.length; o++) m = c(l.charCodeAt(o), m << 6, m << 16, -m);
return m
}
var i = e(b);
i = i >> 2 & 1073741823;
i = i >> 4 & 67108800 | i & 63;
i = i >> 4 & 4193280 | i & 1023;
i = i >> 4 & 245760 | i & 16383;
var h = f(b);
var k = (i >> 2 & 15) << 4 | h & 15;
k |= (i >> 6 & 15) << 12 | (h >> 8 & 15) << 8;
k |= (i >> 10 & 15) << 20 | (h >> 16 & 15) << 16;
k |= (i >> 14 & 15) << 28 | (h >> 24 & 15) << 24;
j = "7" + d(k);
i = "user=toolbar@google.com&url=";
i += encodeURIComponent(b);
i += "&auth_token=";
i += j;
return i
};
So, I call getUrlShorteningRequestParams("http://www.kix.in/"); to get "user=toolbar@google.com&url=http%3A%2F%2Fwww.kix.in%2F&auth_token=78925814685". I see in their code that they do a POST request to the service to obtain a JSON return value that would contain the short URL. I punch it in using cURL:
$ curl -v -d "user=toolbar@google.com&url=http%3A%2F%2Fwww.kix.in%2F&auth_token=78925814685" http://goo.gl/
* About to connect() to goo.gl port 80 (#0)
* Trying 74.125.19.102... connected
* Connected to goo.gl (74.125.19.102) port 80 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.19.7 (i386-apple-darwin10.2.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
> Host: goo.gl
> Accept: */*
> Content-Length: 77
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 405 HTTP method POST is not supported by this URL
Oops! Well, not really, the URL shortener from the toolbar doesn’t work either, I just get the full URL whenever I try to “share” something. Has anybody actually generated a real goo.gl short URL yet?
Their auth_token parameter seems completely superfluous to me as it is generated from the URL itself. Don’t we all know security by obscurity doesn’t work
December 14, 2009 11:11 PM
December 11, 2009
If anybody cares, I haven’t access my blog, facebook, twitter, IM and any other social media for exactly one month. During this period I asked myself one single question: what does humanity really mean today on the web? What is the biggest challenge here for the next generation’s user experience design?…
One month ago my best friend’s fiancee broke up with her because an article on the 10th page on Google’s search engine under her name: A highly manipulated article accusing her irresponsible behavior in terms of relationships with her ex. And it turned into a deal breaker. My friend’s dream of marrying in a rich family is officially over. Now look at what fashionable girls do for dating : You meet someone in the bar, you Google his name, you ask your personal lawyer to count how much money he make..and then you choose if you go out a date with him. Google becomes our biggest obstacle of finding true love.
Yeah we don’t do this 5 years ago. Now we blame the internet gets to transparent to ban us making any mistakes. Today we are not who we really are, we are what google says who we are. Everything is openly connected and we’ve been trying so hard to make things open: making browsers more open, more social and more you, making everything connected, making open IDs. Suddenly we found out: The more we try to design for “you”, the less “you” can express yourself freely. Maybe it is time for the UX designers to make the user experience less open, more humane. And you know what’s ironic: it costs three years to make everything, but it might cost more than three decades to make the openness disappear.
When we talk about user experience, we always say we are engaging in making people’s life better. Nowadays we’re even trying to embed the most intricate and sophisticated human emotions into the consideration of design: like religious needs and sexual needs. However we designed a huge system that ignore the most basic one: The need to lie. Or they need the freedom to lie. If we are really aiming to design a YOU centric web, this question becomes unavoidable and probably be the hottest one in the next 10 years: How do we design a web that people can have real freedom within?
The web has changed, thus you have changed. But I know I love the world better before Columbia found the new land – when things were harder but full of unknown hope and inspiration.
Wei Zhou

December 11, 2009 11:07 PM
November 24, 2009
Over the last couple days I noticed my Firefox getting painfully slow. The weird part was that the rest of my system was responsive. When I opened Activity Monitor it showed 100% CPU usage for Firefox. I decided to do some investigating. I used the ‘Sample Process’ feature in Activity Monitor. After setting the display to ‘Percent of Parent’ I noticed that there was a lot of ‘Flash_EnforceLocalSecurity’ messages which lead me to believe that Flash was the culprit.

I went through my tabs, and sure enough I had lots of Flash open. This pattern kept repeating itself. I’d notice Firefox getting sluggish, close flash web pages and see Firefox performing properly and CPU usage levels back to normal. I found it strange that I could play Hulu and Youtube videos fine. I even went to www.bannerserver.com and found that while Firefox was never using 100% of my CPU. This was baffling me until I figured out what the problem was. This issue only happens when AT&T Uverse flash ads show up.

Not everyone cares to find the root cause of a problem like this. It is also only sporadically reproducible, going to the same website might show different ads each time. I would bet that a lot of people would look at this and say “Firefox is slow”, especially because the ads are there on many different pages. These ads are also not the primary reason someone goes to the page (I’d hope) which means that it is difficult to associate the flash ad with the purpose of their tab if they do try to figure out what the problem is. Having plug-ins in a separate process (Electrolysis) seems like a great idea. I hope that, like Safari on Mac, it shows up as a totally separate process which helps avoid people blaming Firefox for poor performance.

The most annoying part of this whole situation is that I’d love to be a Uverse subscriber. It is bad enough that they aren’t offering it in my area, but to make my browser slower is a slap in the face!
November 24, 2009 11:56 PM
November 23, 2009
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
November 23, 2009 07:56 AM
November 11, 2009
Christmas came early this year.

Today, Google announced their new open source systems programming language: Go. I’m super excited about this, we all have been wondering what Rob Pike has been upto since he joined the big G, and now we know. Not just that, but Ken Thomson, Robert Griesemer, Ian Taylor and Russ Cox were all involved in the project, with Ken doing what he does best, writing compilers in lightning speed
If that isn’t a list of heavyweight respectable computer scientists, I don’t know what is!
I think Go is poised to be the dominant systems programming language of the future. Go has nailed almost every aspect of a systems language, though some would say I’m biased. Go has been strongly influenced by Oberon, CSP languages like Limbo, and the standard libraries have tantalizing similarities to Plan 9. We’ve had Limbo and Plan 9 for a while now (more than a decade), but this is where my real love for Google begins to bubble, they took something awesome but unpopular and gave it a push to the masses. There are very few companies in the world who would attract the talent to do this, and even fewer who would open source the results. The attention Go has been getting is just mind blowing. Pike had been doing amazing work at Bell-Labs for quite a while, but none of it even got an inkling of the publicity Go is currently getting.
Google was what Pike needed to prove Utah2000 wrong.
I know one thing for sure, I’ll definitely be using my Plan 9 virtual machine a lot less; now that I can write clean concurrent programs that don’t make my head hurt, both in Linux and OS X. And GCC, I’m not shedding any tears while I bid you goodbye.
On another note, Google also announced today that they’ll be sponsoring free WiFi at a whole bunch of US airports this holiday season. For all its faults, Google definitely seems to be doing the right thing. For how long, it remains to be seen, but so far I’d say their track record has been better than excellent.
UPDATE: John Gruber points out that “judging from the copyright statements, [Go is] not an official Google project”. Could this be a result of the famous 20% time scheme?
November 11, 2009 03:23 AM
November 07, 2009
Firefox’s – ‘View Source’ component sucks. It must improve.
Upon reading the WebMonkey article, “After Five Years on the Web Firefox Preps for the Next Round“, I was reminded of a suppressed annoyance, or ‘beef’ I have with Firefox through reading Jonathan Nightengale’s statement.
“When a developer loses the ability to view a web page’s source code (something you can’t easily do in Flash) they can’t see how web applications and complex interactions function. And, he says, that stymies further experimentation”
Jonathan is absolutely correct. Developers need the ability to learn from each other and the only best way to do this is through viewing a web page’s source code. View Page Source is a door to undiscovered knowledge on the web.
Ah yes, ‘View Page Source’.
See, in order to boast and fully support this idea, I believe that developers need to have access to the best tools available. Developers need to harness these tools and utilize them to their fullest potential. These tools should exhibit engaging yet intuitive functionality and rewarding characteristics.
See, my ‘beef’ is with Firefox’s ‘View Page Source’. It sucks. It’s really bad. It’s archaic. In-fact, here are 200 bugs spanning multiple years pertaining to the simple view-source component in Firefox.
Here’s my personal listing of ideas to improve View Source with 5 improvements:
- Introduce proper syntax highlighting (crucially needed with the new HTML5 parser)
- Links should have copy link location in the context menu
- Line numbers should appear in a side column
- Add view-selection-source ability
- Interface should be tabbed!
With many of those 200 (simple query search of ‘View Source’) filed as enhancements, it’s clear that the view-source component needs a complete overhaul.

I believe that Firefox needs to revamp it’s view-source component in order to supply developers with the best tools necessary to prevent a case of being stymied from experimentation and any other further barriers of innovation on the web.
Developers need the best tools out there, and I feel that they are left out of what could be an awesomely improved component and uniquely defined characteristic of the entire Firefox experience.
Currently, I dont think there is a significant drive towards prioritizing this component in the browser. In fact, I dont think it has been touched in many years. It certainly feels archaic, sluggish and lacking. Has the code been touched in years?
So I ask the community, you reading this, do you wish to collaborate to revitalize this dying dead horse?
What do you think?
November 07, 2009 05:15 PM
November 06, 2009
During the lead up to the Firefox 3.5 release, there was a request to have older machines running unit tests. Our solution for the 3.5 release was to burn Ted cycles. This is unfortunate because Ted could have otherwise done much more useful things. For the Firefox 3.6 release, we automated this testing. The reason for running these tests is that our JavaScript interpreter spits out native machine code . The problem is that there are still machines capable of running Firefox but do not have all of the latest instruction sets(MMX, 3DNow, SSE2, SSE3, ad infinitum). Specifically, there was a concern over the inclusion of the SSE2 instructions when running on non-SSE2 capable hardware. This is especially important for those people who are still running an older machine exclusively for browsing. It is very important that we don’t unknowingly introduce a requirement for SSE2. We also need to test our claimed compatibility with older Macintosh machines based on the PowerPC core. To fix this situation, I have created the geriatric master. This master is in charge of our fleet of aging fleet of Pentium 3s and PowerPC G4s. It reports to the GeriatricMasters tinderbox. I currently am monitoring the Mozilla 1.9.2 and Mozilla Central nightly builds.

These are the first two succesful runs
We are running some old machines saved from the Landings to Castro move. The P3s are around a decade old and the G4 Mac Mini and Dual G4 PowerMacs are about 4-5 years old. We also aren’t running matched hardware which is going to make detective work on failures difficult. I have found some machines to replace our mixture of P3s that do not even have SSE. They are based on the AMD Geode LX800 processor. These machines are what the OLPC XO have as a cpu. Because they are based on an ancient CPU core (Cyrix 5×86, technically a 486), they even lack SSE. That makes them the perfect for our testing. The model that I am looking at is the MSI Fuzzy. I don’t really understand their naming, but this machine would fit our needs perfectly. It has a fast (for the category) processor and slots for 1gb of ram. Most importantly, it allows us to have as many identical machines as we need. The Mac Mini is easier to standardize on because it was fairly popular at the time and there are only one or two minor variations of the PowerPC Mini.
Before we go rushing out and buying a bunch of new machines for this testing, we need to know how long there will be demand for this kind of testing. I would estimate that it would cost about $500 per Geode machine, and that we might be able to get nightly coverage on two to three branches on linux and windows with four machines.
Also of note is that because we are running on such old hardware, we are getting JavaScript timeouts. I don’t really know how to manually set the preference that ignores these timeout warnings, but it is causing a lot of the jobs to be killed off because they aren’t responsive. I’d love to know if you know how I can disable this in an easy to automate way. I was thinking that I could launch and kill Firefox to create a profile, modify the profile’s preference file then launch it again for the real tests. I don’t know which preference file I would need to do this on though.

This is where I’d like to ask people who are working on the JavaScript JIT to let me know how long we need to do this testing and whether this current coverage (mozilla192 and mozilla-central) is enough. A comment on this post, bug 463262 or ping me on #build (jhford).
As a side note, this configuration makes it possible for us to run unit tests on second tier support machines and operating systems. If there is any community interest, I can look making it possible for anyone to connect their machine to this buildbot master if they have an obscure machine with spare cycles. This would require you to be able to dedicate the box for this testing, us to already produce builds that run on that architecture.
If anyone wants, I can get some photos of the machines on Monday.
November 06, 2009 10:46 PM
November 03, 2009
The mere presence of systems like OpenID, Facebook Connect and a host of other identity services on the web today is attestation to the fact.
Authentication should be a feature of the protocol, not something that relies on hacks like cookies. 99% of websites today rely on cookies for authentication for their websites, besides offering custom registration and login pages. This means the browser, as the user’s agent, has no clue of what is going on. A user is forced to manually track myriads of accounts, remember passwords for each of them, and remember what personal information each of them holds. Sure, part of the problem is solved by using password managers (like the one in-built into Firefox, or external programs like 1Password), but even these programs rely on heuristic algorithms to determine if something looks like a login credential or not. There’s no explicit way for web pages to tell your browser: “This is a login form, please fill in details of the user’s identity here” or “These pages are privileged, please give me the user’s identity”. Why is that?
Actually, there is such a mechanism: HTTP based Authentication has been a feature present since HTTP/1.0, but only 1% of sites actually use it. The reason for that is purely cosmetic, most browsers display a very bland modal dialog when it encounters a page that requires HTTP Auth, and sites are unable to customize that interaction. So, the technically right way to do things sucks from a user experience perspective, and websites started adopting alternate means. Someone discovered they could use cookies to store session information on the client, and the whole situation exploded ever since. As a programmer, I feel very sad when I think about the fact that instead of fixing the problem in HTTP/1.1, web-based authentication took the route it did and led to the mess we are in today.
However, I must also state that HTTP authentication doesn’t solve the entire problem – there is still the issue of users having to create an account for every site they want to be part of. This is because there existed no protocols to federate and provide decentralized authentication. That is, until OpenID and OAuth came about. Now we’re at this exciting juncture, and the browser is in a unique position to use these tools together to provide the user with an experience that is secure and easy to use. Every architect will agree that it is indeed a fun challenge to use the state of identity on the web today and make it into something awesome.
This is precisely what the Mozilla Labs team has been thinking about for a while now. Sometime ago, we added support for automagic one-click OpenID logins to Weave. We plan to spin that “feature” out into it’s own extension and build on it, something we call “Weave Identity“, part of the broader “Open Identity” initiative by the Labs. “Weave Sync“, the original extension, will just focus on the synchronization parts so we can tackle these two different problems separately.
So, how exactly are we planning on doing this? Take a look at an initial version of a document describing an in-browser “Account Manager“. We’ve also put up a WEP (which expands to Weave Enhancement Proposal, by the way) describing the raw form of a specification for automatic actions on websites, such as user registration or password changes.
Keep in mind that all of this is in its very early stages (pre-alpha); but that also means it’s a great opportunity for the community to get involved! What are your thoughts on Open Identity? Use the discussion tab on any of those Wiki pages, start a thread on the Mozilla Labs group, or simply leave a comment on this blog entry, and chip in – we’d love to hear from you!
November 03, 2009 03:08 AM
November 01, 2009
The grand Summer of Code Mentor Summit of 2009 concluded last week and I had the fantastic opportunity of being able to attend on behalf of Gentoo, Plan 9 and Mozilla. What follows is some indication of how awesome the summit was:

(Photo courtesy of warthog from Etherboot)
I met so many folks I’d only interacted with online so far (the classic nickname-to-face matching), but even better was the opportunity to meet folks powering open source projects from so many diverse backgrounds. I met many of my personal rockstars, and learned about a bunch of open source projects I’d never heard of
Also, one of the things that is only possible at an event like the summit was the ability to get a whole bunch of non-linux operating system groups in one room. We had a great discussion, and it resulted in the creation of the “rosetta-os” special interest group. Look for more activity on the common device drivers for non-linux operating systems front soon!
Other sessions worthy of special mention were Open Source Security, Recruiting and Retaining Awesome People, Advanced Trolling (yes, you read that right), and of course the always welcoming Casablanca where I spent most of my time. We discussed everything from our SoC experiences to the Afro Celt Sound System in that room, always full of creative energy and warmth.
After 4 years of participating in the Summer of Code, I am super happy to have finally met the faces behind the program. Every single person I met over the course of last weekend was friendly, intelligent and just generally awesome; that sort of thing doesn’t happen by chance. I feel warm and fuzzy inside to think that I’m actually a part of the revolution that is free and open source software, three cheers to everyone that made it possible!
November 01, 2009 06:17 PM
October 29, 2009
![]()

As part of Toronto Open Source Week, tomorrow marks the start of the 8th annual Free Software and Open Source Symposium at Seneca College

With a vast range of academically intriguing presentations and focused based hands-on workshops to choose from, I have narrowed down a listing of presentations that I will attend to.
Bring on tomorrow – I hope to see you all there :)</pr>
October 29, 2009 01:56 AM
October 11, 2009
I’m back from the EU MozCamp in Prague and we all had a great time! Check out the slides from my talks: Labs Overview and Weave in Depth.
A few people at the MozCamp were interested in Weave’s use of cryptography to protect the user’s data and privacy. Although the specs for the Weave server are available, it may take someone new a while to wrap their head around the whole scheme. I’m going to attempt explaining what crypto operations we do and why we do it in this blog post.
First, let’s get some basic definitions out of the way. Symmetric cryptography means you have one key that can perform both encryption and decryption, and they are complementary operations. For Weave, we use AES with a 256 bit key, and we use it in a mode that requires an ‘initialization vector’ for every decryption. Asymmetric cryptography means there’s a pair of keys (usually called ‘public’ and ‘private’ keys). A piece of text “encrypted” by one key can only be “decrypted” by the other key. Here, we use RSA with a 2048 bit private key.
So, when a user first signs up for Weave using the wizard on their computer, we generate a (random) pair of public and private keys. Next, we use the user’s passphrase to create a symmetric key. This is done using a pretty standard algorithm known as PBKDF2 (short for “Password Key Derivation Function”). The PBKDF2 algorithm requires a ’salt’ value which is also stored on the server. Now that we have a symmetric key, we use it to encrypt the user’s private key and upload it along with the public key to the server. Note that the passphrase is never sent to the server, so if the user’s password ever gets compromised all the attacker can get is their encrypted private key, which really isn’t of much use (especially given that the key is 2048 bits long).
Whenever a particular “engine” is to be synchronized (an engine could be Tabs, Bookmarks, History etc.) we generate a random symmetric key for that engine. This key is then encrypted using the user’s public key (now, one can only retrieve the original symmetric key with the corresponding private key) and uploaded as being associated with a particular engine. All entries (the ‘ciphertext’ property in a “Weave Basic Object”) in that engine are encrypted with the symmetric key that was generated for it.
To make things clear, let’s enumerate the steps we would take to decrypt a single tab object for user ‘foo’:
- Find the user’s cluster by making a GET request to https://services.mozilla.com/user/1/foo/node/weave. It returns https://sj-weave06.services.mozilla.com/.
- Fetch the user’s encrypted private key and public key from https://sj-weave06.services.mozilla.com/0.5/foo/storage/keys/privkey and https://sj-weave06.services.mozilla.com/0.5/foo/storage/keys/pubkey respectively. The user’s password is required to access these JSON objects.
- Ask the user for their passphrase and generate a 256 bit symmetric key from it using PBKDF2 and the ’salt’ found in the privkey object.
- Use the generated symmetric key and the initialization vector found in the ‘iv’ property of the privkey object to decrypt the user’s private key.
- Fetch the user’s encrypted tab objects from https://sj-weave06.services.mozilla.com/0.5/foo/storage/tabs/?full=1.
- Fetch the corresponding symmetric key (the URL is also listed in the “encryption” property of every WBO), in this case https://sj-weave06.services.mozilla.com/0.5/foo/storage/crypto/tabs.
- Decrypt the symmetric key with the user’s private key.
- Use the decrypted symmetric key to decrypt any WBO from the tabs collection with the initialization vector found in the ‘bulkIV’ property of the tabs symmetric key WBO.
- Profit.
A word about the formats in which the keys are actually stored in. All values are Base64. For symmetric keys, the key is stored as-is. For asymmetric keys, I wish we used a standard format like PKCS#12, but we don’t. It’s still ASN.1 though, in some format NSS exports private keys in. You need to do a bit of ASN.1 parsing to figure out the values you’re interested in.
Fortunately, I’ve already figured out most of the details for you – check out my Javascript or PHP implementations of the crypto elements required to decrypt Weave Basic Objects.
Finally, a quick note about why we do all this. Sharing is now reasonably easy, if you want to share your bookmarks with someone, you just need to encrypt the corresponding symmetric key with their public key and they’re good to go. Also, each WBO has it’s own ‘encryption’ property so this can be as granular as needed. Secondly, the passphrase is never stored anywhere (except possibly on the user’s computer) so the server never sees anything other than encrypted blobs of Base64′ed text. Along with making HTTPS mandatory, we think this is a pretty secure way of protecting the user’s data.
If you have other encryption schemes that might fit into Weave’s use cases please let us know! (We’ve already been looking at interesting developments in this area such as Tahoe). I’d also love to hear from you if you have any questions on our current cryptography scheme. We’re constantly trying to improve the security and efficiency of our system so these details are only valid until we change our scheme
Now, go write that third-party Weave client, you have no excuse not to!
October 11, 2009 03:26 PM
October 07, 2009
Through my work on imaging our Nokia test farm, I have developed 3 approaches to imaging the n810. The first is to set up an N810 then generate our own firmware image as a JFFS2 filesystem. This approach gives us an N810 that is essentially factory-stock. We found that we were still having devices fall over on a regular basis with this approach. The next approach I tried was to put the full Maemo operating system on an SD card and boot from it. This resulted in significantly improved reliability at a minor cost in test suite run time. The actual imaging process is far less human involved than the older approach. All that is required is that somebody is there to change blank sd cards and execute the command again. This process used rsync (sudo rsync -a moz-ref-v2/. /mount/point/.) to copy the files from a directory on the imaging machine onto the SD card. As a part of the imaging process, the hostname is set as are a couple other bits of information. It took me the better part of 3 days to image all 40 sd cards using this approach.
The third approach that we are going to move forward with uses the imaging process of the second approach to create a ‘master’ image. This image has all the information already set up, including text files specifying which image revision the device is running on. Once this is done, we use dd to dump an image of the entire sd card onto the PC’s hard disk (dd if=/dev/sdb of=moz-ref-v1.dump bs=100M). When this is complete, we have a 3.7GB file which contains the entire contents of the master card image. We can then write this file directly to another sd card to get an identical copy of the master (dd if=moz-ref-v1.dump bs=100M). The problem is that this doesn’t scale too well. We are aiming to be able to write to 14 cards at the same time. I have investigated using tee(dd if=moz-ref-v1.dump bs=100M | tee /dev/sdb /dev/sdc /dev/sdd > /dev/null) but found that it wouldn’t write to raw devices. Another option would be to use a for loop and start a bunch of dd processes in the background. While this would have worked, we would be using a really high amount of hard disk throughput, scaling linearly. Instead, I decided to write a limited subset implementation of dd in Python. I used the optparse library to implement the command line interface and standard Python I/O for the cloning process. After timing a few runs, I found that my python script was about 98% as fast as the canonical implementation. I only measured wall time as that is the only thing of value for this situation.
A further optimization that I would like to do is the ability to store the image files in a compressed format and decompress them on the fly. Because the dump files contain every single bit that the filesystem tracks it ends up being the same size as the SD card itself. In our case, we have a 4GB filesystem even though only about a gig of that is used. The most simple way to get around this is to compress the image files. Rather than worrying about manually decompressing the file before feeding it into the duplication program, I am going to implement decompression in the duplicator program. I found that Python has a really nice BZip2 module in the standard library. This is module provides a full file interface for a BZip2 compressed file. Before I decided to implement this, I wanted to check that the module is able to decompress files on the fly. I started by generating a file with random data (dd if=/dev/random of=random bs=1024 count=1024) which I then computed a sha1 has for (openssl sha1 < random > random.sha1). At this I opened an interactive Python interpreter and ran the commands:
>>> import bz2
>>> in = bz2.BZ2File('random.bz2')
>>> out = open('random', 'w+')
>>> while True:
... buffer = f.read(1024)
... if buffer is '':
... break
... o.write(buffer)
...
Once this had completed, I exited the python interpreter and compared my sha1 hashes:
jhford$ cat random.sha1
dc34e2d6308786e5e5857f7b0b1126097060df6c
jhford$ openssl sha1 < random
dc34e2d6308786e5e5857f7b0b1126097060df6c
This tells me that I can safely use the BZ2File class for implementing compressed sd card images. My current implementation strategy is to have files that have a ‘.bz2′ extension automatically treated as either a file that is compressed (input) or should be compressed (output).
I am continually impressed by how comprehensive the Python standard library is. It seems that every time I write something in Python, there is a built in module to do anything that isn’t specific to the problem at hand!
The code for my duplicator implementation is being developed at http://hg.johnford.info/multi-dd and the imaging scripts for the mobile work lives in the build repository at http://hg.mozilla.org/build/tools in the directory buildfarm/mobile
October 07, 2009 10:02 PM
October 03, 2009
Tomorrow at 10 am we will present the Koala - Komodo Advanced Localization Addon - project. If you are in Prague at the MozCamp, you'll will have a great opportunity to learn more about it.
Florian S. and I are already there, so if you have some feedback or questions - don't hesitate to talk with us.
October 03, 2009 11:30 AM
October 01, 2009

October 24-30, 2009
Toronto Open Source Week is a celebration of Open Source technology and community throughout the Toronto area. The following events have been confirmed; additional events are being planned.
October 01, 2009 08:43 PM

I’m off to the beautiful city of Prague, or “Praha” as it is known locally, for the European MozCamp of 2009. Memories from the MozCamp last year are still fresh, and I’m definitely looking forward to this one!
On Friday, we’re going to be hosting a Labs Hackathon on Jetpack. This is your chance to get to know more about the framework that’s so easy to use that your mom could write an extension with it. Maybe not your Grandma though, you do need to know a bit of Javascript
The hack session will last as long into the night as needed for you folks to come up with amazing ideas for Jetpacks and implement them. Drew Willcoxon from the Firefox team and I will be on hand all day to help you, so feel free to come and poke us. Oh, I almost forgot to mention that there’s Free Pizza involved.
On Saturday, I’ll be giving a talk on Weave. With 0.7 just released, we’ll be taking a look at our current state, what’s in store for the future, and maybe a few cool demos. We’re also especially interested in engaging with addon developers to see what Weave can do to make it easier for them to add sync functionality to their addons.
Be there!
October 01, 2009 05:50 AM
September 26, 2009
It’s Friday evening and I’m too lazy to check the television for the Toronto Blue Jays score. Yeah yeah, nothing a little script can’t handle.
lynx -nonumbers -nolist -dump http://m.4info.com/search?searchQuery=Toronto | egrep -i -B2 -A4 "Status"
Toronto Blue Jays (75-84) (R) 4 (H) 5 (E) 0
Baltimore Orioles (61-98) (R) 7 (H) 9 (E) 0
Status: Top5th B: 2 S: 2 O: 0
Start Time: 10/02 7:05 PM ET
Pitching: Jason Berken (0K)
Batting: Kyle Phillips (0/1)
Man on 1st
Replace the query with whatever team or term you desire; easy :)
September 26, 2009 12:43 AM
September 25, 2009
Many facts suggest that you should marry to a designer.
First, designer are smart and constantly optimizing user experiences in their lives. Today designers are no longer artist, almost all of them are tech-savvy and bright. They like solving problems- so they are fully capably of fixing pipes for you; they are curious about everything in the world – your life will be fulfilled surprises. For designers, a string of URL gives them a whole new free toy to play with which immediately makes your life beautiful – they are not nagging like others because they are always playing or making stuff: you’ll have customized everything in your house and hand-made wine, chocolate, card and cake in your wedding anniversary.
Second. Designers are rich. They are born entrepreneurs, that means they are seeking every way of making money with innovative ideas. Don’t be surprised if you know a designer has 6 companies at the same time. Today design has never attracted as much attentions as it used to be – it encapsulates so many levels of skillets; as designers, they are much more powerful than they were: because they are designing business for other people.
Third, designers have freedom. Freelance designer is surely the best job in the world – not only because the nature of design requires the usage of both right and left brain so you won’t risk your other half having high suicide rate as a creative writers or artists, or retiring intelligence of football players. Designers surely look younger because the beauty and harmony they involve with everyday, and yes, as freelancers, they sleep a lot everyday, and if you like, they have the time to pick up kids.
Fourth, designers are happy people. Designers have the best friends. Their clients are passionate and hopeful people with fantastic dreams who believe beautiful design can make a difference in their life – never a change of dealing with desperate and angry clients as lawyers do everyday.
Fifty, designers are family guys and girls. They may like clubbing but never as much as they love their job or their life. They are never wasted as investment bankers do. Designers spend money appropriately because design is the art of balancing limited resource and quality. You’ll find your life quality increased significantly after you live with her/him, with less money, of course.
Yeah, marry a designer, you’ll never be wrong.

September 25, 2009 07:20 PM
September 11, 2009
I know my last post about Try Server work was enabling Maemo and WinCE builds but we later realized that those were actually Windows Mobile. While based on Windows CE, Windows Mobile is a distinct product. Thanks to Nick’s work I was able to get Try builds up and running a lot quicker. Because this is a straight Firefox build, I was able to use the standard try server build factories. I have asked some of the mobile team developers to verify the builds manually before I mark the bug as resolved fixed. One issue that I have noticed is that the Tinderbox build logs aren’t being scraped properly. An example is that
TinderboxPrint: jford@mozilla.com
TinderboxPrint: 1252624187
Comments: No description given
is not showing up in the waterfall column. I have seen this with other builders, so I am going to assume that it isn’t specific to my code.
This now means that when you submit your code to the Try Server a WinCE build will kick off. I hope that this helps the WinCE team! If you notice anything strange going on, please don’t hesitate to contact me. I am always on irc.mozilla.org in #build as jhford.

September 11, 2009 04:37 AM
September 08, 2009
Wow, so it seems I have misplaced my blog this summer. However getting married, moving and taking an epic honeymoon can do that to blogs. It’s been a whirl wind kind of summer, full of change. It’s hard to know where to start, so I’ll start with what matters most.
Being a married man, now for over a month, I can safely say I am both lucky and very much in love. It seems all those years Tasha and I enjoyed as a couple has us well prepared for the life of husband and wife. We have fallen into a wonderfully collaborative effort of eating, cleaning and entertaining. We have both spent a great deal of time preparing our home and we are finally enjoying the fruits of our labour, and it’s fantastic!
When I last blogged my internship at Mozilla had just begun, as I write this I find it came and went too quickly. Opportunity doesn’t always come at the right moment, but you need to seize it nonetheless. I’m so happy that I took the chance to work with Mozilla this summer — even if life had me pulled in too many directions. Spending time in California meeting Stuart, Doug, Mark and others was rewarding. During these last few months I have kept my eyes and ears open and the thing I take most from the experience is how dedicated and passionate they all are. It has inspired me to find that same passion in what I choose to do from now on. I’m spending my time now to take a look at the job market to find what best suits me, my skills and my passions. My home life is already proving to be rather fulfilling and I have decided I will settle for nothing less in my professional life.
I’m choosing to leave this blog post on the shorter side, it’s impossible to catchup with everything that has happened. However, some parting notes, I plan on remaining a contributor to the Mozilla project – the experience can only be surpassed by it’s importance, these are world class developers and I still have so much to learn and contribute.
I also would like to take a moment to thank Silvana from Impulse Photography, she has a track record of producing some of the most unique and creative photography around, and our wedding was no exception. With that I leave you with moments from our big day – Thanks Silvana!
September 08, 2009 08:13 PM
September 06, 2009

UVa uses Twitter to let fans interact during football games
With seven turnovers by the Virginia Cavaliers, the first game of the 2009 college football season was not fun for UVa fans, as they lost in an upset to William & Mary: 26-14. Ironically, the only thing that brought smiles to the fan’s faces was a turnover of another kind: the social media turnover of the Jumbotron display to the Cavalier fan base.
Early on, the football announcer invited fans to use Twitter to tweet text and pics during the game. He told the near-capacity crowd that tweets containing WMvUVA hashtags (#WMvUVA) would be displayed on the new Jumbotron screen that towers over the end zone. And they were displayed—at speeds approaching real time.
My friends and I had a great time posting school-spirited tweets and some fun pics to go with them.
Last year, a similar service allowed fans to text messages to a 5-digit number and see their messages show up on the screen. While that system worked well, the new Twitter approach kicks it up a notch. Now fans can include pictures with their tweets, enriching the message’s value. And more importantly, those messages are now public and searchable on Twitter. Even fans watching at home can get in on the action by sending hashtagged tweets.
There’s no question that this a great play for college sports. But the takeaway has broader implications: it highlights the pent-up demand for more fan interaction. Now that athletic departments can engage their fans during games with social media, why not continue that Game Day experience back on the web?
Virginia has already started this with their Facebook profile and Twitter account. However, this content is nowhere near what it could be because it’s only flowing one way. That sounds more like Web 1.0 than 2.0 to me. Fortunately, that’s easy for teams to fix.
Sports teams, your next step is to actively engage fans online. Here’s how. Use your Facebook status to post questions and start conversations. Seek feedback and ideas from fans. Don’t just tweet about upcoming games and scoreboard updates. Reply to tweets and get to know your fans better. Retweet fans’ comments to your followers. And offer them rich media. Your wallpapers and podcasts are a good start. But don’t stop there: why not let fans skin their browser with a Persona of their favorite teams, add a Twibbon of the mascot to their Twitter avatar, or send in fan videos. Utilize your media assets.
If you bring the Game Day experience to fans outside the stadium, they’ll get even more excited when the next game day arrives. It only takes a small time investment to connect with your fan community, and the potential payoff is huge—fans who are more excited and more loyal. And maybe, just maybe, fans that are more engaged will cheer the team to victory more often. Just sayin’.
How can your favorite teams better engage their fans? What teams are already leading the pack with social media?
September 06, 2009 08:14 PM
September 01, 2009
My last day at Mozilla this summer was last Thursday. I didn’t take a lot of pictures this summer, because, you know, I took a lot last time around. Also, this strategy turned out pretty well because now there are more pictures of me floating around on the tubes! After a longish trans-atlantic flight, I’m back in Amsterdam now resuming work on my Master’s (because hacking on Minix is awesome).
No other internship has been ever so satisfying: over the summer, I worked on a wide range of mini-projects which allowed me to exercise skills ranging from systems to application level programming. I even did a bit of work in the mobile space (turns out programming in limited memory and processing speed is a *lot* different).
One such project that I’m especially excited about is support for video recording in the browser. Yes, there is even a canvas-based live preview of your webcam feed, in addition to Ogg/Theora encoding support! Combined with the audio recording support I wrote sometime ago, some really cool applications are now possible. Skype-like dialer in the browser? Why not?! (*hint* anyone is free to send in a patch for multiplexing the audio and video, they’re currently two separate Vorbis and Theora streams *hint*).
We also had 3 major releases for Weave during the summer: 0.4, 0.5 and 0.6. The last one was especially big, given the completely new, HTML based UI (big kudos to thunder for pulling it off!) and a bunch of other performance fixes. Also, the web UI I wrote last year underwent so many great changes by the wonderful folks at Glaxstar. Now we’re putting up a community design challenge to revamp the UI so we can ship the thing! (*hint* if you’re good at UI design you should participate in the challenge *hint*).
There’s so many more cool things I worked on that I’d like to talk about, but perhaps they deserve a separate blog post. Soon… (I keep promising myself that I should blog more often, it never works).
To add the already good times, my two students in the Summer of Code this year passed with flying colors. Yay!
September 01, 2009 03:54 AM
August 25, 2009
Friday is approaching fast, it will be my last official day as an intern with Mozilla Corporation, but certainly not my last day with the project and overall initiative.
The past four month’s have offered me an an incredible chance to learn, far more than any one job, classroom or book may offer. I have learned a lot; everything from the Mozilla platform to invalidation reference testing to XML User Interface Language (XUL) to reducing test-cases for crashes in the browser to even the vast assortment of brown-bag and meet-up discussions, I have learned a lot. With the knowledge gained, this internship opportunity has been far more rewarding than one could possibly imagine. There is nothing more rewarding than having the opportunity to discover and ascertain and to certainly ask many upon many questions.
Four month’s long, I worked alongside the QA (Execution & Test Dev), (that of which include Clint and Heather) team driving forth many efforts within the world of testing. Over the months, I got to tackle quite a few tricky issues that turned out to require new and unique solutions that I really enjoyed inventing and implementing. The different challenges and testing opportunities were each rewarding as they demonstrated the underlying importance of software testing.
See my parting presentation here for a complete overview (no <iframe/> in WordPress) of the major project I worked on in July/August and the test development areas I worked on in May and June .

That being said, I’m not gone yet. Despite a return to my final year of software development in school, I’ll continue to chip in to the efforts of the QA team and other projects to come, only I’ll be on IRC at a slightly different time of day.
Thanks Mozilla and in particular the friendly folks of QA for the first-rate experience!
Take care Mozilla,
Aaron
August 25, 2009 05:24 AM
August 21, 2009
We have gotten the remainder of our order of 20 Nokia N810s. This brings our total pool of devices up to 40! I have gotten them fully set up and they are running in staging. If everything looks good tomorrow, I will move them over to production.
I have also moved them all to the conference table in FAIL to see if this improves our connection reliability. This will really help us to keep posting reliable and timely numbers. I still have 3 units running in staging which are using a MicroSD card for their entire os and data drive. If this works out well, we will hopefully improve our end to end times on builds and make it even easier to reimage a malfunctioning device.
August 21, 2009 01:16 AM
August 20, 2009
Today John O’Duinn found some new N810s around the office. While they weren’t destined for us, we worked a trade (Thanks Nick!) for some of the devices we have arriving soon.

The new devices still in their boxes
The imaging process that I described in an earlier post requires some time to bake in a staging environment because it requires some fairly significant changes in how the device acts. In the interim I have generated an image for flashing the N810s that still uses the internal raw flash memory. To do this we set up a reference device exactly as needed. After this I generated a new filesystem image (sudo gainroot; mount -t jffs2 /dev/mtdblock4 /opt; mount /dev/mmcblk1p1 /floppy; cd /floppy; mkfs.jffs2 -r /opt -o moz-ref-image-v1.jffs2 -e 128 -l -n). Once this was done I transfered the files to my desktop pc and wrote an automation script that flashes the devices. This puts the root filesytem onto the device. For the pagesets used by talos we need to use the internal controlled flash card. For this I have written a script which takes the device files for each plugged in maemo and rsync’s the contents of the drive. Using a helper script I have made this work on 6 devices at once.

Data being transfered to the new N810s
It took a less than one hour to get all the machines from unopened shipping box to running in our staging environment. If everything looks good, I will move these six new devices over to production tomorrow. This is a significant improvement over the multiple hour per device process of setting up a device we used before. This process scales very well. It takes 90 seconds to flash each device with a root file system and is done in serial. Setting up the page set file system took 6 minutes for 6 devices and is done in parallel.

In Staging
I am eagerly awaiting the arrival of 14 more N810s some time this or next week.
August 20, 2009 02:34 AM
August 17, 2009
This summer I created an experimental prototype of an about:me page for Firefox, and I am proud to announce that it is now available for download as an add-on on addons.mozilla.org!
The goal of the about:me page is to give you a more interesting view of statistics about your browser usage, providing a fun way to see personalized patterns in your interactions with Firefox. The current version includes graphs that illustrate trends in your browsing and downloads histories.
The “Activity Stats” section graphs the websites you visit most, including the individual pages you visit most within each top-level site. This section also graphs your hourly browsing activity, which can reveal patterns in websites you visit most at various times of the day.

The “Downloads Stats” section illustrates the distribution of different types of files you download, as well as daily trends in your download activity.

I plan to continue to develop the about:me page to include more sections from our brainstorming list, such as statistics about bookmarks and tabs. Please let me know if there’s anything you would love to see next!
August 17, 2009 04:06 PM
August 16, 2009
August 14, 2009
Current Progress
- worked on API design and features discussed in Aug. 6 meeting
- improved initial working prototype
- Automatically hiding icon notifications after a delay
- Notifications are shown as menu buttons when notification button clicked
- More code and UI cleanup
Loose threads
- where in the UI should the doorhangers be shown? (need input from beltzner)
Next target
- fully working version of doorhangers
- ETA August 21, 2009
August 14, 2009 07:46 PM
August 09, 2009
Update: It seems GoDaddy fixed this issue. Glad they fixed it, though I still can’t say I recommend them. Thanks Sean for pointing that out to me.
I recently gave a talk on WordPress plugins at the Boston WordPress Meetup (slides are online on their meetup.com page). During this talk the question came up of which webhost to use. Everyone has their own recommendation of webhost, but the one host that was universally panned is GoDaddy.
I’ve long since moved on from shared webhosts on to VPSes (I’ve been using VPSLink since they started. Use this link to get 10% off for life and snag me a nice referral bonus
), but GoDaddy was my first web host, and since then I have heard nothing but terrible things about their marketing practices, upsells, and other sketchiness. But they will show you videos of women taking their clothes off on their website, which is great if you’re into that sort of stuff, but not what I need from a webhost.
But until recently I never discovered anything actually wrong with their hosting service…it worked, and while it was cheap, they at least delivered what you paid for (though granted, you’re not paying or getting a lot). Yesterday, while looking through some code for a GoDaddy site, I discovered something painfully bad with their service that makes them a terrible idea for any ecommerce site.
It seems GoDaddy doesn’t allow outgoing connections from their shared hosting packages. So, for example, you can’t connect to authorize.net or paypal.com from your server. How do they recommend you accept payments? Send it through some unsecured proxy they have.
That’s right, GoDaddy is actually telling people to send credit card information to another server in unsecured plaintext. They then forward it along and send you the response. There are 2 things wrong with this.
- Man in the middle attacks up the wazoo. Not only can someone possible get in between the proxy and your server, but who knows whether or not the proxy requires valid certificates. If not then the entire workflow is vulnerable.
- There’s a now a single point of failure for all of that hosting. If that server is compromised, all those sites get compromised too. This is a huge risk.
If I were issuing merchant accounts and knew about this, I wouldn’t accept accounts from anyone hosted with GoDaddy. There are very few reasons for GoDaddy to be doing this. The only one I can think of is preventing the spread of website worms that use holes in website scripts. This is a pretty lame reason to lock websites into their own box, and there are much better ways to stop this.
August 09, 2009 05:50 PM
August 08, 2009
Mozilla QA Companion 1.0 Released
Fresh new QA Companion. This version has a revamped design of the former QAC, with functionality for running manual tests, reporting bugs, and viewing the latest QMO news. 1.0 is a vast improvement over 0.2.3!
Download the latest version here
So what is the Mozilla QA Companion (QAC)?
The Mozilla QA Companion (QAC) is a new tool that was created after discussions between the QA team and community about how to make it easier for anyone to get involved with the Mozilla project and help us test Firefox.
The QAC is meant to be an easy way to get community members involved in the QA process. It pulls testcases from Litmus and provides a response form, all within the QAC interface. The QAC also includes notifications for important QA events such as Bug Days, and keeps users up-to-date with live feeds from the QMO site and forums.
Features
- General QMO tab — updates on news, forums, etc.
- ‘Run Tests’ tab — This is the heart of the extension. It allows users to get testcases to run and to submit results from within the extension. QAC will detect most system settings and helps new users set up a Litmus account if they don’t have one already.
- ‘File Bug’ tab – File bugs by submitting a report!
- Settings/Help (Preferences) — This is for the confused or misconfigured.
Installation
You can install the QA Companion like any other Firefox add-on by visiting https://addons.mozilla.org/en-US/firefox/addon/5428
Getting involved with testing and development
The interface is fairly intuitive and easy to follow, but please let us know if you have any questions. Find us on IRC or post to the QMO forums. We hope you find the Mozilla QA Companion a useful tool that helps you get more involved with the Mozilla QA community!
Thanks!
- Aaron Train, on behalf of the Mozilla QA Companion revamp team
August 08, 2009 05:14 AM
August 07, 2009
My second major project this summer on the Firefox team is to implement Doorhanger Notifications. The main goals are to redesign the notification interface to address various issues and to provide a unified notification area for them to be displayed. For now you can read the wiki page for more information. Below is my progress thus far:
Current Progress
- lots of code cleanup
- decided how to support undo notifications and worked on API design
- met with faaborg and dolske to talk about UI design
- initial working prototype done
Loose threads
- where in the UI should the doorhangers be shown? (need input from beltzner)
Next target
- fully working version of doorhangers
- ETA August 21, 2009
August 07, 2009 09:51 PM
August 06, 2009
In order to scale our mobile testing infrastructure we need to be able to get devices up and running in production as soon as possible and be able to repair software issues as quickly as possible. The N810 runs Maemo and due to its similarities to desktop Linux it is the only mobile platform we are able to run unit and performance tests yet. Up until now, we have had to set up the devices by hand each time. As well, when a device’s software stopped working right it needed to be erased, reflashed and reset manually. This reseting process occurs multiple times a week and ends up taking a while to get the device back into production. The work required, while uninteresting, is full of detail that may not be accurately expressed on the N810’s miniature keyboard. The ability to image the N810 gives us a multi-faceted win in that we are able to get new devices up quicker, fix broken devices quicker and ensure all devices are set up consistently.
Anatomy of the N810
The Nokia N810 has internal raw flash memory (/dev/mtd*), internal controlled flash (/dev/mmcblk0) and a MiniSD card slot (/dev/mmcblk1). The raw flash memory and controlled flash memory differ significantly in their operation and as a result use two totally different file-systems. On a normal N810 there are 5 partitions:
- Bootloader – raw file
- Kernel image – raw file
- Initialization filesystem – JFFS2 filesystem
- Root filesystem – JFFS2 filesystem
- Data partition on internal controlled 2GB flash memory – FAT filesystem
My first approach was to generate a custom filesystem image of the root filesystem. I accomplished this by mounting the root filesystem to an existing unused folder (mount -t jffs2 /dev/mtdblock4 /opt). I could have created a new folder, but this would mean that this new mountpoint folder would also be present in the image. Once mounted I used the JFFS2 filesytem creator to create a filesystem image(/home/user/initfs_flasher/mkfs.jffs2 -r /opt -o /media/mmc2/rootfs-moz-v1.jffs2 -e 128 -l -n). This command creates a filesystem image (i.e. not written out to a device file as you would with mkfs.ext3) with a root directory of /opt. The other parameters specify the erase block size, the byte-sex and not to have cleanmarkers. This will write the file to the removable flash card which can then be inserted into a PC and flashed to the device using the Nokia’s flashing program (su; ./flasher-3.0 --rootfs rootfs-moz-v1.jffs2 --flash).
Shortcomings
This approached worked really well but it could not automate setting the device up to go straight into production. Someone would need to manually change the hostname, change the buildbot.tac file and change the buildbot information page. This got me to thinking that I could copy the files onto my PC, modify them, generate the filesystem image locally then flash the device. I started by setting up rsync and openssh. I mounted the root filesystem as before and ran rsync on my PC (su; mkdir rootfs; rsync -a root@10.0.0.1/. rootfs/.) and got a snack (note the critical -a flag on rsync). When I had gotten back I had all the files and created the filesystem (su; yum install mtd-utils; mkfs.jffs2 -r rootfs -o rootfs-moz-v2.jffs2 -e 128 -l -n) then flashed this onto the device (su -; ./flasher-3.0 --rootfs). This is where the wheels began to fall off. The device booted and it appeared to be working great.
I was testing the devices when I noticed that the shutdown prompt wasn’t themed properly. When you press the power button on an N810, a menu comes up asking if you want to lock the device, suspend it or turn it off. The first issue with this approach was that this menu wasn’t themed using the proper hildon buttons and instead was using the default GTK button theme. This was not in itself an issue but signalled that there was corruption happening somewhere. We decided to run this image in our staging environment and unfortunately my concerns were realized when a lot of the tests were failing.
Improved Process
While investigating our options I came across a couple pages about booting from a flash card and advanced boot configurations on the maemo wiki. My initial attempt followed the booting from a flash card page’s instructions. This yeilded a working system but made the flashing process very complicated requiring work to be done on the PC and on the device. This would not really solve any problem and as a result I did some further thinking. It turns out that Nokia had the foresight to allow booting from an SD card in the stock firmware. Now on my second approach, I used the flashing program to set the device that has the root filesystem (su; ./flasher-3.0 --set-root-device mmc) to one of the controlled flash cards. Important to note is that there is no place to choose between the internal memory and the memory card. At boot the N810 will scan the first partition on both devices looking for a specific file. When it finds that file it selects that device as the boot device.
To get the fully configured root filesystem onto the SD card, I remounted the raw flash root partition as in my first approach and rsync’d it to my PC as in my modified first approach. My first strategy for duplicating the SD card was to copy the files to the reference SD card then use dd to dump the contents of the card(dd if=/dev/sdc of=dump.sd bs=100M) to a file then write them to another card(dd if=dump.sd of=/dev/sdc bs=100M). This strategy has the disadvantage of needing to write out a lot of blank space which takes a long time. It also doesn’t shrink or grow the partition or filesystem which means that you need to use the exact same size or larger card.
Final Implementation
I decided to write a less naïve implementation. The result was a script that creates a blank filesystem on an SD card on my PC, copies the files over, modifies the files as needed then ejects the SD card. This card can then be put into a device that has had its root device set correctly. I wrote a script to do all device setup correctly. In this script I reflash the bootloader and kernel for safety and put the device into Research and Development mode to enable root access on device. I also flash an empty root filesystem to the raw flash partition to ensure it isn’t used. Using different types of flash could affect performance test results.
Something rather annoying is that the N810’s device file naming convention is for controlled flash devices is broken. This means that while the MiniSD card should be /dev/mmcblk1 when booted from the raw flash /dev/mtdblock4 it is /dev/mmcblk0 when booted from MiniSD card itself. Because I had copied the entire root filesystem to the internal card while testing things, the only way I was able to confirm that I was booted from the memory card was to remove the card while the system was operating. Thankfully, this caused a major system crash and proved that I was running off the MiniSD card.
Hidden Benefits
As a side effect of running the device with all the files on the same MiniSD card the internal 2GB controlled flash card is now unused. This can now be used for lots of swap storage. To do this you need to create a file that is the size of the swap you need (dd if=/dev/zero of=${MOUNTPOINT}/.swap bs=1024 count=262144) then turn it into swap space (mkswap ${MOUNTPOINT}/.swap). This can either be done on device or on a PC with the device plugged into it.
Next Steps
I still haven’t tested the SD card images in staging yet. I also need to work with Aki to move files from the old mount points of /media/mmc1 and /media/mmc2 which are no longer correct or used. I also need to move the imaging machine somewhere other than my desk and check the code into Mozilla’s mercurial repository.
Useful Links
- http://wiki.maemo.org/Modifying_the_root_image
- http://wiki.maemo.org/Booting_from_a_flash_card
- http://wiki.maemo.org/Advanced_booting
- http://fanoush.wz.cz/maemo/index.html#initfs
August 06, 2009 01:30 AM
I recently finished work on a sprint to improve perceived performance in Firefox. Unlike code improvements that actually make the browser faster, perceived performance improvements make the browser feel faster. There is currently a long list of brainstormed ideas for these improvements, but Alex Faaborg identified improving mouse wheel behavior in Windows as a quick way to make the browser appear noticeably more responsive.
In native Windows applications, scroll events triggered by long flicks of the mouse wheel are not distinguished from events triggered by single wheel clicks, which can result in frustratingly slow scrolling when traveling a long distance down a page. Mac OS X, on the other hand, applies an acceleration effect to mouse wheel events, increasing the distance the page moves in response to multiple successive mouse wheel events.
In order to create this acceleration effect in Windows, I wrote some code that changes the way we process mouse wheel events. This code uses some logic and arithmetic to increase the distance the page should move if there are multiple successive mouse wheel events, using the values of three different preferences to determine exact behavior.
- mousewheel.withnokey.numlines: The number of lines the page moves with one click of the mouse wheel. This value is used to determine scrolling distance before acceleration computations are applied. Increasing this value will make scrolling feel faster for all types of scroll wheel actions, including individual scroll wheel clicks.
- mousewheel.acceleration.start: The mouse wheel click number at which acceleration begins to take effect. This value determines whether or not acceleration computations are applied to a given scroll event.
- mousewheel.acceleration.factor: The multiplicative factor used to determine the rate of acceleration. The acceleration computations create a constant acceleration effect, but this value can control the level of acceleration.
These preferences can be configured from the about:config page, and although the default values are not set in stone, they seem to create a reasonable acceleration effect. Feel free to play with these preferences on a nightly build and let me know what you think!
August 06, 2009 12:25 AM
August 04, 2009
As the Campus Reps program has gained popularity across schools worldwide, the number of Reps has grown to over 1,000. Part of the sign-up process for these community members is to tell us about themselves by completing a survey. I’ll cover some interesting insights over the course of three posts. This first post will give us a better sense of who these Reps are and their background using demographic information.
Data
The data set includes the 779 Reps that registered for the 2009 – 2010 school year as of June 2009. It should also be mentioned that almost three times that number of people started the survey but did not complete it. In the future, we’ll want to look for ways to improve the survey so more people complete it.
Regions
We have Reps in 57 countries. The majority of Reps are located in India, the United States, and Mexico. Here’s a list of the top 10 represented countries: India, United States, Mexico, Canada, Brazil, United Kingdom, Sri Lanka, Pakistan, Philippines, and Australia. We have at least 8 Reps in each of these countries and that group accounts for 85% of our Reps.
US Schools
Our Reps are spread across 37 states (plus DC!). The unrepresented states are: Arkansas, Colorado, Connecticut, Delaware, Idaho, Montana, Nevada, New Hampshire, New Mexico, South Dakota, Vermont, West Virginia, and Wyoming.
School year
Most of our Reps are upperclassmen and a good number of them (52%) will be graduating by next year. To make sure campuses continue to be represented, we should encourage these graduating Reps to recruit other students to take their place when they graduate.

How they found out about Campus Reps
Not surprisingly, most students find out about the program on Spread Firefox. However, it’s also great to see that 1/4 of new Reps are joining based on referrals from friends and classmates. To me, that speaks highly of the program and what students are getting out of it.

Reasons for becoming a Rep
Again, the number one reason that Reps join is not surprising — they simply love Firefox. Interestingly, Reps see the program as a chance to give back to the community, learn more about marketing, meet new people, and become a leader. The newly created Campus Reps Network definitely provides an environment for Reps to achieve these goals.

That’s it for now. In the next post, we’ll look at the projects and campaigns that most interest our Reps.
August 04, 2009 04:39 PM
Introduction
In this post I discuss how I used Dehydra to do analysis of the entire Tracemonkey tree.
Note
I talk briefly about some Tracemonkey things to motivate what I used Dehydra for, but a knowledge of Tracemonkey is not required to appreciate the main point of this post.
The problem
One of the optimizations in my Tracemonkey inline threading work (Bug 506182), which I will be posting about later, is “PC update elimination”. Doing this requires figuring out which functions out of a certain set can access the JavaScript virtual program counter (which is stored as a variable named “pc” in a class named “JSFrameRegs”). There are about 230 functions in this set, so doing it manually is impractical.
The solution
I used Dehydra to help solve this problem mechanically. Dehydra is a static analysis tool built on top of gcc. It allows the semantic information of a program to be queried with JavaScript scripts.
First steps
By providing a process_function() function in a Dehydra script, I can inspect the variables used and the functions called by every function. Determining whether the pc is used is as simple as seeing if any variable has the name “JSFrameRegs::pc”.
function process_function(f, statements) {
for each (let v in iterate_vars(statements)) {
if (v.name == "JSFrameRegs::pc") {
print(f.name);
break;
}
}
}
The catch
Unfortunately, this isn’t quite what we want. This will tell us which functions directly use the PC, but not which functions can indirectly use it through function calls. Figuring out that requires looking at all the functions called by a given function. This is not straightforward with Dehydra, as functions frequently call functions declared in other files. Dehydra is a gcc plugin and is driven by the normal build system. Thus, it works on a file-by-file basis. Normal builds output an object file for each source file and rely on the linker to stitch it all together. Likewise, to do a whole tree analysis we need to output per-file information and then link it together later.
Collating the data
I reworked my process_function() to determine both whether the PC is directly accessed and the set of functions called directly. This data is then printed with the dump() function (discussed below):
function process_function(f, statements) {
usespc = false;
calls = {};
for each (let v in iterate_vars(statements)) {
if (v.name == "JSFrameRegs::pc") {
usespc = true;
}
if (v.isFunction) {
calls[v.name] = true;
}
}
dump(f.name, usespc, calls);
}
The remaining question is how to structure our output. Outputting it as data declarations for some programming language seems like an easy way to do it. Since I am more comfortable with Python than JavaScript, I output the data as Python code:
function dump(name, usespc, calls) {
s = '@@@';
s += '\t"' + name + '": ({';
for (let f in calls) {
s += '"' + f + '", ';
}
s += '}, ' + (usespc ? "True" : "False") + '),';
print(s);
}
We create a dictionary mapping function names to tuples of the set containing the name of each function called and whether the PC is accessed directly. When doing a build, the output will be intermixed with output from other parts of the build infrastructure, so we tag all of the output lines with ‘@@@’ so that a post-processing shell script can recognize and extract the relevant data.
The relevant bit of the shell script (which is linked below), is:
(echo "callgraph = {";
cd "$DIR" && make -s CXX="$CXX" 2>&1 | grep ": @@@" | cut -d@ -f4-;
echo "}")
This data gathering method could easily be modified to analyze different problems. For simplicity, I extracted only the relevant information and converted it directly to Python data structures. Another approach would be to dump all of the function information (probably in JSON), allowing a later analysis script access to everything.
The analysis
I wrote an analysis script in Python to process the data. The input is a large dictionary, mapping functions to the set of functions they call and whether they touch PC directly.
I viewed the problem in terms of graph theory. The mapping from functions to the functions they call is simply a directed graph. Each function is a node and there is a edge from a function to each function that it calls. In this graph, some nodes (those that touch the PC) are initially marked. We want to color red every node that has a path to one of the initially marked nodes.
Another way to state this is that a node is colored red if and only if it is either initially marked or has an edge to a red node. Doing the coloring is a simple problem. We simply compute the reverse graph (reversing all of the edges) and then perform a depth first search of the reverse graph starting from the marked nodes. Every node we see, we color red.
When doing the DFS, we keep track of which node we first reached a newly colored node from, so that we can determine a path back to an initially marked node.
My implementation also supports providing a predicate to exclude certain nodes from the search, in order to investigate how fixing certain functions to not require the PC would change things.
Caveats
While my method is useful, it is not perfect. It can produce both false positives and false negatives.
False negatives result from polymorphism in the form of virtual functions and function pointers. When a call to such a function is made, there needs to be an edge from the caller to all of the functions that could be called. For virtual functions, this is all functions overriding the virtual function. For function pointers, I think this is every function of the proper type that is used in a way that it not a call at some point. It should be possible to address this problem, but at a significantly increased complexity compared to what I have. Fortunately for me, Tracemonkey does not use virtual classes much and does not use function pointers in places where it matters for my analysis.
False positives are a little trickier, and can’t be worked around in general. Consider the following:
void foo(bool bar) {
if (bar)
// access the PC
}
void baz() { foo(false); }
Calling baz() will not result in the PC being accessed, but my analysis will report that it can access the PC (since foo() can). Knowing whether a function can actually cause the PC to be accessed is isomorphic to the halting problem and thus undecidable.
The code
My code is available here. make_callgraph.sh expects to find g++ and Dehydra under ~/gcc-dehydra/, as suggested in the Dehydra installation instructions. make_callgraph.sh must be run with its output redirected to callgraph.py. search.py contains both the general search algorithm and code that uses it to analyze functions introduced in my inline threading patch.
August 04, 2009 01:19 AM
There’s an app for this and there’s an app for that – we get it. And with the iPhone app store sporting figures like 1,000,000,000 downloads and 50,000 different apps it’s easy to call such a platform a runaway success. However after reflecting on my own usage of mobile apps, I’ve concluded one thing – the user experience sucks*.
A friend recently asked me how many iPhone apps I use regularly. My response: 2.
Facebook and Tweetie are really the only apps I use. A couple months ago I even took the unnecessary step of deleting all the apps that were collecting dust on my iPhone, simply because I got tired of looking at them. I’m not the only one like this. A recent study found that 20 days after download only 5 percent of apps are used.
So what’s wrong here? My view: It’s partly the apps but mostly it’s the app store. It’s too heavy. Let me paint you a picture.
* My intention is not to single out the iPhone here. I mean mobile applications in general (e.g., iPhone, Android, Palm, etc.)
A day in the life
I’m wandering around a Best Buy (see hypothetical) and am having trouble locating Blu-Ray players. While I could go ask someone for help, I decide to pull out my trusty smart phone instead (here an iPhone). Here are the steps I have to go through:
- Click App Store
- Search “Best Buy”
- Review app list & select the official Best Buy app
- Wait about a minute for the download to finish over 3G
- Launch the Best Buy app and wait for it to load
- Find Blu-Ray devices
Finally I’m presented with a Blu-Ray page and what are my options?
“View Online.”
Two major issues here:
1) Wow, that was a lot of work.
2) I’m standing in a Best Buy and the Best Buy app is telling me to shop online.
I, of course, am operating under an assumption here. Namely, mobile applications should enhance my physical environment. That’s the difference between a desktop app and mobile app for me. While a desktop app is immersive and provides its own context, a mobile app is auxiliary and responds to context. Mobile apps that don’t fit this bill are simply desktop apps fitted to small screens – ubiquity with no added utility.
Unfortunately, mobile app stores are designed for these types of apps. The arduous setup process, discoverability and, more fundamentally, the notion of an “application” itself are hindering true innovation in the mobile space.
So, let me paint you another picture and present three concepts that illustrate a different approach.
#1 Transitory not transactional
App stores are geared towards transactions. You browse, buy (sometimes for free), and keep goods (applications). In the Best Buy example, I not only stood in the store for almost two minutes before realizing that the application wouldn’t help me but I now had a Best Buy app sitting on my phone. I visit a Best Buy next to never – so why is it still there?
Same thing happened when I downloaded a French dictionary to use in France and a snow report application while in Tahoe. Months later those apps (and their many updates) were still in my face. This is poor design in that it forces a transactional framework onto a transitory interaction. This is what I mean when I say that mobile apps are “heavy.” Getting from inspiration to an open app requires too much work.
There is of course one platform that handles transitory interactions particularly well: the web. I should be able to call up the Best Buy “app” much like I do a website. No downloads, updates or uninstalls, simply “Go.”
#2 Context not subject
While the open (generative) web makes for a great, lightweight app platform, organization via URLs and search engines makes for horrible discovery on mobile. More fundamentally, the challenge is that the web has been developed to interpret user input – but not environmental input. That made sense back when computers were bolted onto desks but today’s “computer” lives in the pocket and the catalyst for usage is often tied to some measurable environmental factors.
Some applications have done a good job responding to such factors. And here I must really commend the iPhone, in particular, for providing so many valuable inputs. I would count Shazam as a great mobile app; with one click the song you’re hearing but don’t know the name of is analyzed and, if successful, the song name returned. That wouldn’t have much application on a desk-bolted computer but on a mobile device that’s with you in cafes and bars, it’s golden.
But how does one get to downloading Shazam? Well, you have to know it by name or do some novel searches to find it, or in other words it’s only discoverable via user input. Wouldn’t it make more sense if it were suggested to you when the phone detects a song playing? What I’m really getting at is designing an App Store around discoverability via context.
Let’s revisit the Best Buy example to see what I mean. This time I’m packing an iPhone with a very context-sensitive app store and applications.
A better day in the life
I’m wandering around a Best Buy and am having trouble locating Blu-Ray players. While I could go ask someone for help, I decide to pull out my trusty iPhone. Here are the steps I have to go through:
- Open App Store (i.e., a customized browser)
- Search “nearby” or just click the location button
- This contextual search uses information about the surrounding area to present relevant applications. Since I’m standing in a Best Buy that application is presented first. The Starbucks next door is also presented.

- Select Best Buy from the list
- Note: With one click I not only load Best Buy (no download needed) but I’m put directly into the context of the specific store I’m standing in.
- Ask “Where’s Blu-Ray?”
- I’m presented with GPS-like directions. As I move throughout the store the screen continuously updates and I can simply replace “Blu-Ray” with “Checkout” or “Restroom.”

So there you have it. A much better user experience driven by context both in the app store and in the application itself. As a bonus, this kind of discovery can reinforce synergies found in the physical environment. There’s a good reason why a Starbucks is located next to a Best Buy – we should replicate that on mobile as well and perhaps suggest to the user to order their drink when they are waiting in the Best Buy checkout line.
#3 Eco not silo
So far I have suggested we kill the transactional nature of app stores and reorganize them based on context but my last suggestion may be the most radical – let’s kill the concept of an “application” altogether. Here’s my beef (it’s one that was first articulated to me by my Mozilla colleague, Aza Raskin, so consider this section co-production):
Applications are selfish – they keep innovations to themselves. While Web 2.0 has done a better job of “mash ups” this really occurs at the data level – what applications need to do is share functionality as well. What do I mean? Let’s say a word processor does a great job of producing rainbow colored text like this and that you love it so much that you want every word you ever type to be in rainbow. Ideally you’d set that up once and then no matter what application you are using, be it Word, Facebook, Photoshop, your type would be colorful. What I’m really suggesting is an architecture where features, as well as data, are pervasive. An application here would be redefined as a particular grouping of global features and data. Differentiation here purely resides in user experience as all applications could share in the best features and data available.
Why is this particularly important in mobile? Because while on the desktop we’ve developed task bars and shortcuts to help us manage the dozens of applications that we have running, on mobile we don’t have the same power or screen real estate. When we launch a mobile application it effectively takes over our phone. That makes not having access to data or features that much more painful.
Or put more positively wouldn’t it be great to have all your favorite features within reach? What if the Best Buy app utilized the same “nearby” feature that I had used to launch it in the first place? I could recursively search “nearby” again and now see what’s around me in the store:

And since this functionality transcends the app, the Best Buy app could deliver a lot more than just product information. It could even tell me that a friend is in the store too.
Not bad for a brick-and-mortar, eh?
August 04, 2009 12:50 AM
August 03, 2009
My first project this summer as an intern at Mozilla on the Firefox team was to improve the form history feature. It's a feature that most people use when they fill out forms but don't even realize it. For those of you who don't know what I'm talking about, it's the dropdown of previously submitted text that appears when typing into a form input field. The two main improvements that I have been working on in form history (which are also known as form awesomecomplete) for Firefox 3.6 are detailed below.
Frecency Sort
For the longest time, the entries in the dropdown were sorted alphabetically, which is fine with a small number of results. When you have many saved entries that match what you've typed, an alphabetical sort doesn't help you find the ones that you are likely to use again, since ones that you use regularly are mixed in with the others you've only used once. To make the order of results more useful and reduce the number of keypresses required to select a previous entry, I have implemented a frecency calculation to rank the results. Frecency is a concept that was introduced in Firefox 3 with the "Awesomebar", Firefox's smart address bar. The term is derived from the combination of frequency and recency whereby the more often or the more recently you’ve used the entry, the higher it ranks. Since the most relevant entries will now be at the top of the list of results, this should reduce the number of keypresses to select the entries that you use most often.
Substring Matches
Sometimes when filling out a form or typing search terms in the search bar, you may remember only a portion of the text that you previously submitted and you want to retrieve again. An example of this is when you want to repeat a previous search from the search bar such as one for "location". In the past, only previous entries that started with the text "location" would be displayed, and so you would not see a previous search for "firefox 3.5 geolocation". With my improvements, any text that you previously entered which contains the typed text anywhere in the entry will be displayed. Consider another example: if you don't remember your friend's entire email address when filling out a form but you happen to remember that you filled it out in this form before and they have a Mozilla address. Simply enter "@mozilla" in the text field and all email addresses for that field that contain "@mozilla" (ie. @mozilla.com or @mozilla.org) will be displayed. Bonuses are given to matches that are at the beginning of a word or if they are exact prefix matches (like the previous method) so that irrelevant results that happen to contain the search text shouldn't get in the way of relevant results. This should make finding past entries easier as you don't have to type the exact prefix.
For more information on the frecency algorithm used and some preferences to tweak the results, see
the wiki page. Feel free to experiment with these features and the associated preferences and file bugs in
Toolkit::Form Manager.
August 03, 2009 09:03 PM
July 29, 2009
Some random thoughts after talking to M___.
Random thought one: Early on in designing the structure of education.mozilla.org, I envisioned a big button for teachers to click that would take them directly to courseware. But that only works on a site that is focused on one discipline. Mozilla Education is for design, marketing and business people as much as it is for computer science people. Teachers and students in the same discipline are more likely to follow the same path through the site than teachers from differing disciplines.
Therefore, the site devolves into different disciplines from the top level. I think this makes sense in terms of organizing content, but something is lost. One of the use cases that needs to happen is professors contributing courseware or other content. Maybe they don't host the content on education.mozilla.org, but they should be able to connect to it. What is taking shape serves students and self-learners fine, but it doesn't cover all the use cases for professors.
I think think I need to go back a step and draw up some more use cases.
Another random thought: As far as computer science goes, teachers arriving at the site are in much the same position as their students. They may know everything there is to know about coding, but be Mozilla virgins. They are learners themselves. I suspect this is less the case in other disciplines. Those professors don't need info about their trade, or even Mozilla, but rather some ideas for doing what they already do in a more open source inspired way.
Random thought the third: Mozilla has a kajillion different websites. Just today I learned about library.mozilla.org (unless I was told and then forgot which I do a lot). I really need to put together of list of resources that already exist and reach out to the people behind those resources.
Last thought, not random: Regarding my earlier post on a platform other than MediaWiki for the site, the best feedback I've had is that TikiWiki is the best choice. It has the CMS and user management features that MediaWiki lacks, but is still a good wiki. It's used for support.mozilla.com, so you can see it themes nicely and there is some in house expertise.
July 29, 2009 10:15 PM
July 28, 2009
The Mozilla Education website is being prototyped using MediaWiki, but as the content and organization part of project begins to take shape, I begin to feel the limitations of using a wiki for everything.
For one thing, the website doesn't have its own living space. It co-exists with all the other content at wiki.mozilla.org. I can't install extensions or plugins that would make the site more dynamic. For instance, the map of students or the video content from the Design Challenge are limited to screen shots and links because I can't use iframes or embedded content.
There's also the problem of separating public and private information. There's no conspiracy to hide data, but it would be useful to have email lists with availability restricted to various privilege levels. A wiki isn't a good tool for that.
I've tested Moodle. It looks great for running courses, but it doesn't really function well as a content management system without major hacking. It can be integrated with MediaWiki, but that looks painful.
I'm partial to using Drupal. It has the capability to manage users with a vast shading of roles and permissions. It works well for organizing content hierarchically. You lose the wiki markup syntax, but I think it's a reasonable tradeoff. There are wysiwyg plugins for page editing. Plus, you can lock the permissions of certain pages to certain roles very easily. It would be useful to have the main page include dynamic content through php scripting. Obviously, you can't allow php scripting that anyone can edit.
I don't know if it's a worthwhile use of my remaining time on this project, but I'd like to make a mockup of how the site could look and function on Drupal.
July 28, 2009 08:11 PM
July 27, 2009
Totally forgot to post this, but I’ll be the speaker at tonight’s (Monday July 27) Boston WordPress Meetup at Microsoft’s New England R&D Center (1 Memorial Dr in Cambridge). If you’re interested in hearing about WordPress plugins, or WordPress in general, feel free to show up. Should be a blast!
I’ll post my slide deck after the presentation.
July 27, 2009 04:20 AM
July 23, 2009
The project I’m working on at Mozilla this summer is Ubiquity. In this post I will explain what Ubiquity is and why I am so excited about it.
The Problem
The web is full of interesting and useful services. People access information by harnessing the power of search engines like Google, Bing, and Yahoo, as well as services like Wikipedia, Ask, and Answers. They view pictures on Flickr, watch videos on Youtube, search for restaurants on Yelp, get directions on Google Maps, discover interesting articles on Digg, and look up movies on IMDB. They stay in touch with friends through Twitter, Facebook, GMail, and more.
As the number of web services that we use on a daily basis increases, so does our desire for an easy way to access all of these services at once, without having to navigate to different sites and applications. This has led to the growing popularity of mashups, in which you can interact with several web services at once. There are twitter services that allow you to update your facebook, map services that allow you to view locations on flickr, and Digg streams that integrate with the top bookmarks on Delicious. With mashups, you can use one service as a platform for harnessing the power of several separate services.
However, these mashup models don’t really scale. They’re good for bringing together a few similar services, but beyond that they become cumbersome. A website that allowed the user to see their twitter, facebook and digg feeds while also displaying restaurant recommendations, movie reviews, driving routes, weather updates, and music videos would be disastrous. What we need is a fast and intuitive way to bring different web services to us when we want them and where we want them. This is where Ubiquity comes in.
What is Ubiquity?
Ubiquity is a natural-language command line interface to the web. Ubiquity allows the user to gain access to web services and perform tasks by entering commands in a very intuitive manner. In its current form, Ubiquity is a Firefox Add-on. The Ubiquity window can be brought up using a designated keyboard shortcut.

The user can input a command into Ubiquity using natural-language, and Ubiquity will give suggestions about what the user is trying to do based on their input. The user can then pick the suggestion which matches the action they are intending to perform, and Ubiquity will execute that action for them.

A preview of the action is displayed alongside the selected command, and pressing enter will execute the given command. In this case, it would take the user to the google maps page of the desired address, similar to what is viewable in the preview.
Why a Command Line?
For many people, a command line interface sounds confusing. But perhaps that’s simply a result of the kinds of command line interfaces we’re used to. The confusing part of a command line interface is that you’re often unsure of what to type. This is not because you don’t know what you want, but rather because you’re unsure of what you need to input to make the system understand what it is that you want. People like graphical user interfaces because graphics can easily aid the user in seeing what they need to do to make the system perform the task they want. However, the ideal interface is one that is so simple that such guidance becomes unnecessary. The user simply tells the system what they want to do, and the system makes sense of it. I believe that this can be best served in a command line, due to the command line’s ability to scale to a very large range of requests. This is best summed up in the following quote by Aza Raskin:
“Standard GUIs, with their drop-down menus, check buttons, and tree-lists, cannot compare to the range of options that a text interface effortlessly provides. With just five alphanumeric characters, we can choose one out of 100,000,000 possible sequences…It’s difficult to come up with a non-text-based interface that can perform as well.”
–Aza Raskin, Head of User Experience at Mozilla Labs
Thus the goal is to make a command line interface that understands natural language inputs well enough to give accurate suggestions based on the user’s intentions. If we can accomplish this, then a command line interface could prove to be far superior to a GUI for bringing web services to the user.
And There We Have It
Ubiquity in a nutshell. I’m very excited about what the future holds for this technology, and I look forward to continuing to contribute to it. There are many questions still unanswered in the design and implementation of Ubiquity, and I will be blogging about several of them in the near future. To install the Ubiquity Firefox Add-On or learn more about the project, you can visit http://ubiquity.mozilla.com/.
July 23, 2009 10:50 PM
Today we had the pleasure of having Brendan Eich hosting a brown bag for all us interns, and he started out his talk with slides on the Golden Ratio.

I did have a vague idea of what the ratio was – but today I found out a lot more about it – like how it occurs in almost every natural creation or phenomenon. The mysteriousness of the universe is very humbling. Perhaps if we used a different number system that was based on 1.6180339887 instead of 10, everything would make perfect sense…
Anyway, one thing it definitely explains is my love for 16:9 screens as opposed to the old 4:3 ones
July 23, 2009 06:51 AM
July 21, 2009
This summer I’ve been working for Mozilla in Mountain View, CA. It’s been an amazing experience, and it’s all going so fast! I’m working on the Ubiquity project in Mozilla Labs (http://ubiquity.mozilla.com/). I’m really excited about the work I’ve been doing this summer, and I look forward to continuing to contribute as much as I can in my remaining weeks here. I will go into further detail about Ubiquity in my next post. For this post, I wanted to give you all a look at our headquarters here in Mountain View. Mozilla changed offices at the beginning of the summer, moving a couple miles away from its previous office which was next to Google. We are now at 650 Castro Street, which is still in Mountain View.
The new office is absolutely beautiful. Functionally, it’s far superior to our old office. The conference rooms and meeting spaces are much larger, with lots of monitors, speakers, and microphones. The desk areas are also more spacious. In terms of aesthetics, it’s on a totally different scale than our old place. Everything is so sharp and refreshing. It has a fair amount of modern architectural influences, lots of glass and curvy lines.
I have posted some pictures below. To see all the pictures, check out my flickr set at http://bit.ly/yFnvk.




July 21, 2009 11:19 PM
July 18, 2009
July 17, 2009
I’m really excited to announce a new feature in Jetpack 0.4 – Audio Recording. “Jetpacks” can now access the microphone with just a few simple lines of Javascript:
jetpack.future.import('audio');
jetpack.audio.recordToFile();
var path = jetpack.audio.stopRecording();
The result is an audio file encoded in Ogg/Vorbis, which you can then playback with jetpack.audio.playFile(), or if you choose to upload the file to a remote location, using the <audio> tag.
A sample Jetpack I came up with that uses this feature is Voice Memos. It lets you record a memo that is mapped to the page you were on when you recorded it (which is achieved using Simple Storage), and also displays a list of recorded memos in a SlideBar. If you revisit a page attached to a memo, you will be notified via the SlideBar.
The code to achieve this was written in a couple of days, but I spent the better part of last week trying to build the component on Windows. The Mac/Linux versions seem to (mostly) run without issues, but Windows support is a little flaky at the moment. Part of the problem is that the XPCOM component dynamically links against portaudio and libsndfile, after which DLL Hell ensues. We’re looking to resolve these issues in upcoming releases as well as reducing the size of the XPIs.
One of my future goals is to allow raw PCM streaming rather than just recording to a file so you can do cool things like manipulating audio on the fly
In the meantime, do play around with this feature – we’d love to know what you think! The JEP for Audio support can be found here, and there’s a group for Jetpack-related discussion.
July 17, 2009 07:05 AM
July 13, 2009
I am officially starting my tech blog! I have been meaning to start this blog for quite some time, but I’ve been pretty busy since arriving in California for the summer. An introduction to the blog:
The author:
- MIT undergraduate major in computer science, about to start my senior year
- Interning for Mozilla during the summer of 2009, working on Ubiquity (http://ubiquity.mozilla.com/)
- Interests include web design, artificial intelligence, and entrepreneurship
In this blog, I hope to:
- Pose open design questions I am thinking about, which currently revolve around:
- Ubiquity
- Other Mozilla Projects
- General web design
- Give my opinion on new tech products
- Discuss the future of the web, artificial intelligence, and other interesting frontiers for technological advancement
July 13, 2009 12:28 AM
July 12, 2009
It was only about 12 days ago that we released Firefox 3.5 and unveiled one of the new core features; support for the HTML5 <video> and <audio> elements including native support for Ogg Theora encoded video and Vorbis encoded audio. Less than 12 days later, community members have created basic full screen support for the video element; an enhancement feature in design phase on Bugzilla!
That’s incredible!
Full Screen Video, is the name of the add-on, and it adds a Full Screen option to the context menu for HTML5 videos.
Cheers, ‘design-noir’
Aaron
July 12, 2009 05:45 PM
July 11, 2009

It started just two weeks before Firefox 3.5 would be released. Prashanth, one of our Campus Reps in India, posted an idea on the Reps’ forum. He suggested a synchronized social media campaign to celebrate the new Firefox launch — think of it as the stadium wave meets Twitter. Other Reps quickly joined the discussion and it was soon clear that there was lots of excitement about the idea. We could get all the Reps involved and tell our schoolmates about it too. We’d have hundreds of students participating in the Shock.
But what about the rest of the Mozilla community? Would we only target this campaign to students? This wasn’t an issue last year with Firefox 3 — Download Day was open to everyone. And that’s what made it so successful. With that in mind, Jay and I knew that this campaign should include the whole community.
What would we call this virtual stadium wave? Firefox 3.5’s code name “Shiretoko” was a natural fit. And we used “Shock” to capture the wave effect the campaign would create. Each wave of social media would be called a “shock.”
Next, we planned the logistics for how the Shock would take place. Because we were celebrating the release of Firefox 3.5, we wanted the Shock time to be 3:50pm. We debated whether to do one huge, global shock or 24 regional shocks — one for each timezone as we spread the Shock around the world. A single global effort would be bigger in scale and more noticeable on social networks. However, the timing would be inconvenient for certain regions. The regional shocks were convenient in terms of timing (3:50pm in each time zone), and they would allow each region to get excited about their regional shock. Since both options had pros, we ultimately decided to allow people to participate twice.

With the strategy set, I went about designing the Campaign page on Spread Firefox. The layout of the content is straight forward — an introduction to the Shock idea, directions on how to get involved, and the reasoning behind the campaign. The most difficult part of this page is communicating when someone is supposed to participate because there are 25 (24 + 1) shocks taking place. The campaign page listed the first 5 timezones for the regional shocks and the time for the Super Shock. We also linked to a world clock page that let participants look up when the Super Shock was in their timezone. In retrospect, I think it would have been best to list all 24 regional shock times so it would be more clear.

Campaign page
Since the Campaign page was lengthy and got into the details of the Shiretoko Shock, we decided to create a Landing page as well. The purpose of this page is to promote Firefox 3.5, allow visitors to download it, and give users a chance to spread the Shock. If a user wants to learn more about the campaign, they could visit the Campaign page, but the details are not mentioned on the Landing page. Jeff, another marketing intern, helped me design the Landing page on the Friday afternoon before the release.

Landing page
To publicize the Shiretoko Shock, we messaged our marketing, launch team, and Campus Reps email lists a few days before release to let them know we’d be announcing a campaign soon. On Monday, the day before launch, we sent out the details and launched the Campaign page. Then early Tuesday morning we launched the Landing page.
How big was the Shiretoko Shock? I’ll post about the numbers and the impact of the Shock in a few days.
July 11, 2009 12:01 AM
July 02, 2009
It has been a while since we announced the Koala - Komodo Advanced Localization Assistant - Project. While we work on the project on a nearly daily basis, we are just three students that need to do other work (like preparing for the upcoming examinations...), and because of that, the progress isn't as fast as it could be, if Koala would be our only project, but: we have a target for the final release: August, 23rd - September, 15th - and we plan not to miss it.
Our project schedule is of course more detailed - it consists of four big stages: preparation, implementation, integration and stabilization. That's the process of software development we did learn at our university, and our goal is to develop Koala that way.
During the first project stage, preparation, we've investigated as much as possible how Koala should work and look like, and as a result, we have written the Software Requirements Specification and Software Architecture documents.
In the Software Requirements Specification, we've listed the must-have features and have split them into modules with similar or dependent functionalities. In the now ongoing implementation stage, we are working on that modules separately. What does this mean? We code e.g. the "compare-locales" access module, make a few tests to be able to test it if it works as expected - and leave it there. So it's a single module, not (yet) connected with other modules.
As a result of this software development model, it's not possible to have something you "could touch" now - there won't be anything really usable until the next phase of development.
During the integration stage, we will make an working extension out of the many standalone modules. We will connect the modules through the, in the preparation stage specified, API's, one by one. It may look easier than it'll be, because this stage never comes as expected.
That will be also the time where we will start releasing pre-release versions of Koala: alpha and beta releases. They are to be expected late July.
After getting rid of the biggest blockers, we will enter the stabilization phase, where we will just fix known bugs and look for yet undiscovered bugs, by: testing, testing and testing. Because of that, in the middle of August you can expect an release candidate (hopefully just one).
The final release target is August, 23rd with a margin up to September, 15th.
If you'd like to help us in any way with this project, please drop a line in the comments.
Short update: between writing this posting and publishing it, we already entered the integration stage - but because of our examination session, the integration will start at full speed not earlier than in about three weeks.
July 02, 2009 11:45 PM
In the spirit of an exciting successful week, I would like to congratulate our friends at SourceForge who have delivered their 4,000,000,000th open source download. That’s one of a few major open source milestones this week. That’s a lot of downloads.
July 02, 2009 03:30 PM
June 28, 2009
Having just watched Yann Arthus-Bertrand’s hymn for the planet, titled HOME – an ode to the planet’s beauty and its delicate harmony, it triggered some thinking on what’s going on in the world.
HOME is more than a documentary with a message, it is a magnificent movie in its own right and has an impact on anyone who sees it. It awakens in us the awareness that is needed to change the way we see the world. It embraces the major ecological issues that confront us and shows how everything on our planet is interconnected. Everything is interconnected.
How can we take this means of awakening, interconnection and global consanguinity to bring everyone together on the web? Can we accelerate an integrated worldview towards critical mass by opening a medium where people can see what happens when they are empowered by each other?
We all want to live in a better world, and many among us are working to make that world a possibility. Improvement is achieved through ideation, innovation, cultivation and application of solutions to problems. However, due to the blindingly complex nature of the problems we currently face, equally sophisticated solutions are required. These solutions are beyond the realm of any one person or small group of people. It is the globe that faces these problems and thus it is the global mind that must develop matching solutions.
There are now more links, websites, documents and files on the internet than there are synapses in a single human brain. Having reached into every attribute of human life, it is now steering the course of history.
It is estimated that over 1.5 billion individuals have access to the internet with user growth ever increasing in the developing world. Classified as the most capable and sophisticated tool ever developed by mankind, the internet represents the pinnacle of thousands of years of technological development.
Accelerating at rapid growth at blazing speeds in development, it affirms rather than conflicts with human identify. In essence, it connects us in real and personal ways to other human beings. With higher potential beginning to reveal itself, an opportunity is presented to forge a network which interconnects those who improve our world. We now have the means and the wisdom to implement a system that fosters world-changing collaboration amongst the people of this planet.
We are, without question, living in the most exciting time in human history. Human potential is expanding as technology continues to bring awareness to the great realm of our knowledge and understanding, the populace of our planet are beginning to awaken, en masse, to our true inner nature and our integrated relationship with the world around us.
As the world wakens to its indissoluble oneness, we still see an escalating disarray. Fears of governmental paranoia and terrorism run amok, global economic collapse looms, and of course the earth herself is exhibiting the symptoms of feeble health.
We are now at a crossroads. Despite all the incalculable knowledge available at our fingertips, we are unable to predict the days forthcoming. There comes a point when every new and competing idea is put to a test. If that idea is to be successful it must reach a critical mass.
How can Mozilla and the internet of tomorrow work to accelerate an integrated worldview towards critical mass by opening a medium where people can see what happens when they are empowered by each other?
- AaronMT
June 28, 2009 12:00 PM
June 26, 2009
Last night, Joseph Smarr from Plaxo was our guest speaker and he talked about how the “web is going social”, and how the “social web is going open”. We discussed all the elements that make up the social web today: identity providers, social web providers and content aggregators, and how each of them are leveraging open standards and protocols such as OpenID and OAuth to create better experiences for their users. Check out his slides here.
This talk was a nice prelude to some interesting discussion about the role that the browser can play in handling the user’s data and identity on their behalf. Very relevant to this was also the recent experimentation by Weave on identity in the browser, and Myk gave us a demo of the auto-sign-in features.
Labs Night is also a chance for everybody to talk about cool stuff they’ve been working on, so Brandon gave us an update on what’s new in Ubiquity 0.5. There’s some really neat stuff in there: Ubiquity is possibly one of the first pieces of software that perform truly internationalized natural language parsing (0.5 rolls out with support for Japanese and Danish). Do check out this blog post for a detailed discussion of the features in 0.5.
I followed with an update on some of the work I’ve been doing with Jetpack – namely providing the capability for “jetpacks” to record audio. The code to enable this is checked into the repository, but you’ll have to wait until a release later this month if you’re not feeling brave enough to build the extension from source to play around with it. I was especially interested to know the kinds of applications that might be possible with this capability, so you if you have any ideas, I’d love to hear them. Myk also gave us a demo of the new streamlined way of subscribing to feeds using Snowl, check out this release announcement for more details on what’s new with the message reader you know you want to use!
Paul Tarjan from the Searchmonkey team at Yahoo! gave us some really cool demos demonstrating Searchmonkey Objects and YQL. I’m especially excited about YQL because it can make some of the back-end ubiquity code really simple and efficient. Incidentally, the Bing team was here at Mozilla just a couple of days ago and they also demoed some features similar to Searchmonkey Objects, albeit restricted to video and snippets of data for now.
Search is starting to feel exciting again, a sentiment similar to one we feel in the browser space today. There’s a lot of innovation in the area outside of the big daddy, and it is indeed heartening to see that major players in the web are beginning to recognize the importance of openness and competition
Labs Nights are monthly events, so we look forward to seeing you sometime in July to discuss more cool stuff that everyone’s been working on!
June 26, 2009 06:50 PM
June 25, 2009
It’s been 3 weeks since I started my (second) summer internship at Mozilla Labs, and needless to say it’s been a blast! I’m continuing my work on Weave, besides helping out with the gamut of experiments that are currently running at the Labs. Weave is going to see some major strides forward in the near future, as we now have our very own Product Manager (Welcome, Ragavan!) in addition to the awesome Mike Connor joining the team
Within the first week of my arrival here, Mozilla made the move to the new office, which is possibly the sweetest workplace I’ve ever seen in my life. Check out selected pictures here.
There’s been the usual slew of intern activities, including, but not limited to: Canoeing, Movie nights, Birthday celebrations, Music discovery, and even a few dungeon runs on WoW
Look for more posts on labsy stuff in the near future. Peace!
June 25, 2009 06:18 AM
June 23, 2009
Hey everyone, I’m David, an IT/Ops Tools intern at Mozilla this summer. I will be entering my senior year (wow, those first three went by fast) at Stanford University in the fall and am looking forward to RA-ing in Gavilan (woo)!
Anyway, I am finishing up my second week here and having an amazing time so far! I have been working on the Mozilla Status Dashboard. Think something similar to Google’s Apps Status Dashboard and Amazon’s Web Services Dashboard.
I think services, especially web services, are increasingly putting an emphasis on transparency – when something’s wrong, they want their users to know what’s going on. In this day and age, nothing should be a black box anymore – making information available and easily accessible to users both makes IT’s job easier as well as acknowledges that users are intelligent and web-savvy. In that vein, Mozilla is really in a special situation with its relationship to the community and open source developers that allows us to share things that most corporations would not.
With that in mind, I present the initial mockup for the Mozilla Status Dashboard 0.0.0.0.1, which temporarily lives at http://mozdash.doesntexist.com/. Just to be clear, it’s currently hooked up to DUMMY DATA and does not represent the actual current status of these services, with the exception of the response time charts for http://addons.mozilla.org and http://www.mozilla.com. In the spirit of being open, I warmly welcome any feedback that anyone has for this project – what status information about Mozilla services would you like to see? What would be useful to as part of the Mozilla community? When we’re constantly being inundated with information from Facebook, Twitter, and RSS feeds, at what point does too much of a good thing (information) become a burden? I’d love to hear your thoughts in the comments below.
June 23, 2009 12:01 AM
Hey everyone, I’m David, an IT/Ops Tools intern at Mozilla this summer. I will be entering my senior year (wow, those first three went by fast) at Stanford University in the fall and am looking forward to RA-ing in Gavilan (woo)!
Anyway, I am finishing up my second week here and having an amazing time so far! I have been working on the Mozilla Status Dashboard. Think something similar to Google’s Apps Status Dashboard and Amazon’s Web Services Dashboard.
I think services, especially web services, are increasingly putting an emphasis on transparency – when something’s wrong, they want their users to know what’s going on. In this day and age, nothing should be a black box anymore – making information available and easily accessible to users both makes IT’s job easier as well as acknowledges that users are intelligent and web-savvy. In that vein, Mozilla is really in a special situation with its relationship to the community and open source developers that allows us to share things that most corporations would not.
With that in mind, I present the initial mockup for the Mozilla Status Dashboard 0.0.0.0.1, which temporarily lives at http://mozdash.doesntexist.com/. Just to be clear, it’s currently hooked up to DUMMY DATA and does not represent the actual current status of these services, with the exception of the response time charts for http://addons.mozilla.org and http://www.mozilla.com. In the spirit of being open, I warmly welcome any feedback that anyone has for this project – what status information about Mozilla services would you like to see? What would be useful to as part of the Mozilla community? When we’re constantly being inundated with information from Facebook, Twitter, and RSS feeds, at what point does too much of a good thing (information) become a burden? I’d love to hear your thoughts in the comments below.

June 23, 2009 12:01 AM
June 18, 2009
My second project this summer was to generate Fennec desktop builds and l10n repacks. The purpose of doing desktop builds and repacks of the mobile browser is to help people localize Fennec without having to load a build on to the device manually. The output of these builds is in the latest-mobile-l10n directory on our ftp server. 
This is a screen capture of the browser showing the Chinese version of Google along with Larry showing us something. This is really neat to see Fennec in a totally different language and character set.
Another screen capture showing the localized Fennec bookmark manager. I am a little curious as to why there appears to be Spanish text in the Chinese localization.
Currently, only Linux builds occur but the factories that were written should work for Windows and Mac OS X just fine. I found that this project went very smoothly with a couple small-ish exceptions. While writing the factory which does desktop fennec builds I came across an issue with the l10n repacks failing with no explanation. I asked Aki for some help and he informed me of a .ini file that needed to be modified for the repacks to work. Once this was done repacks started working.
While still in testing, we noticed that all the repacks that work for real Maemo builds are working on desktop builds. Another issue with my patch was that I had missed some lines when duplicating my patch for our production environment (mozilla2-staging vs mozilla2) which caused Aki some hassle during the landing.
Once in production there was another issue with some of the repacks failing on one specific slave. The failure was while checking out the en_US source (mozilla-central). It turns out that there was a DNS issue with hg.mozilla.org during the night I was doing testing. Some slaves did do the repacks successfully which makes me think that we have DNS caching on our slaves and a couple of the slaves just happened to have hg.m.o in their cache. This would explain things nicely, and as they are now fully working.
June 18, 2009 04:36 PM
June 11, 2009
Each day, it is becoming more and more evident that the Open Web and the technology of tomorrow is expanding and blossoming into beautifully crafted future Internet.
As Firefox 3.5 is rounding the track towards the finish line, I can’t help but put my personal focus on that of HTML5 video. Firefox’s implementation of the HTML5 video API accompanied with royalty-free codecs, fundamentally progress the movement towards bringing an open video to the web.
HTML5 video truly is fascinating stuff, as Mike Beltzner explains, gone are the days of static videos played on static pages. With HTML5 video, we can treat video’s like web pages – which makes sense in a dynamic web.
These past few weeks, I have been progressively focused – eye-to-eye with trying to dig deep and unveil any remaining issues and it has been fun.
It’s been a real treat observing the progression from design to implementation of this feature and can’t wait to see it ship with Firefox 3.5 and how it will grow in the near future.
Tomorrow is a MoCo company wide internal test of Firefox 3.5 Preview Release, let’s work together to iron out any hidden creases in HTML5 video, and across the entire board in order to bring forth the next iteration of the browser by the people for the people, they deserve it!
Cheers,
Aaron Train (AaronMT)
June 11, 2009 03:20 AM
June 03, 2009
Ryan, my mentor from when I was at MoCo, wrote an excellent article on spriting a few days ago. Man, I miss all the good conversations…that’s what I get for not subscribing to the webdev feed. That’s all changed now.
I have an interesting history with spriting. For both of my internships (Mozilla and Yahoo), one of my first projects was to sprite sites (AMO & Yahoo! Real Estate, respectively). AMO is still using my work (for now), and YRE long ago gave up on rounded corners, and have few icons now, so spriting is more or less useless for them now.
I guess that qualifies me to weigh in a bit. I’m not going to talk about the memory usage or anything on the client-side past delivery for two reasons. First: size in RAM has a tiny impact on page-loads compared to downloading for most users. Second: I’m horrible unqualified to talk about how web browsers load and store images in ram. Not my field.
There are some issues (many fixable) with spriting:
- In both instances of spriting I got an email a few months after I left the company asking me where my source sprite file was located. Once it was due to me not putting the file in the right place, but the fact still remains that a source sprite file is one more thing to lose, and losing it is pretty annoying.
- Not everyone knows how to compress images properly. If you do it wrong, you’ll end up with a huge PNG file that is worse than a bunch of small files.
- Spriting removes any connection between CSS styles and the images they are associated with. If I want to know what a class with a background image looks like, I have to either find a reference to it on the site, or figure out where the hell -123px -72px is. It’s more or less obfuscating your CSS.
- repeat-x or repeat-y images need to span the whole width/height of the sprite…they should have their own sprite files (if you have enough of them)
- Like Ryan said, images that are supposed to be near the left of an element (i.e. they need an arbitrary amount of space to the right of them) should be at the right side of the sprite. This makes an internationalized site that supports right-to-left text (an insanely difficult thing to achieve, and something which many MoCo sites do impressively well) much more difficult. It’s very frustrating to discover halfway through that your sprites show up wrong in RTL. Not many sites need to worry about this, but it’s annoying if you do.
With that being said, spriting can be useful when done properly. A very good example is how Yahoo Mail sprites. They group similarly-size things in a file. They have an icon file, a rounded corners file, etc. This makes things easier to manage, but still suffers from some of the above issues.
I don’t know how Yahoo’s build process works, but to make sprites worth it I would propose some kind of CSS build step. Ideally all the developer would have to do is specify which images are displayed which ways (whether there needs to be whitespace to the left, right, top, or bottom), and the system will build the sprite and generate a complied CSS file that is minimized and concatenated.
AMO’s build process got halfway there. It was originally a shell script written by yours truly, converted to python by FWenzel. The shell script is described here (the python script is essentially the same). It concatenates a bunch of files, compresses them with YUI Compressor, and creates a PHP file with the current revision numbers (to append to the URL for long expires headers). Pretty standard web build system.
I’d really love to see a system that also parses out background*: rows with comments at the end (identifying what type of spriting should be done), places them, replaces the URL, and adds a background-position. That, combined with AMO’s build process, would allow an algorithm to determine what’s best for download times vs. memory usage.
The best part: an automated system would easily allow bucket tests on load times based on different sprite files. Now wouldn’t that be useful?
June 03, 2009 06:11 AM
June 02, 2009
I've received some feedback on my last attempt at creating a straw man info architecture for the Mozilla Education site.
Some of the criticism:
- Mixes up high level and low level pages at the same depth in the hierarchy.
- Separating high level paths for teachers and students doesn't make sense. For instance, teachers are more likely to identify with students who share their area of study than with teachers in other fields.
- Serves only one constituency. Computer science students.
- Works for the Seneca College model of teaching Mozilla, but maybe not other schools. Universities, for instance, may be looking for more info about research projects.
For the revision, there needs to be three things on the front page:
- an overview that explains what Mozilla Education is
- a path for people to contact us or get involved
- links to orientation pages for various disciplines
Hence this top level view (click for larger view):

At the moment, I don't have a clear idea of how non-coders will be served, but the Design Challenge is an example of something that would be linked to.
As far as coders go, their section would expand out as follows:

In the above example, I follow one path to it's terminus, "Using XPCOM interfaces", but all the topics listed would similarly expand.
In addition to this, there is one more diagram about collaboration. This would be common to all all disciplines and would attach to the overview page for each.

June 02, 2009 07:55 PM
May 29, 2009
Today the final patch to enable TryServer to do mobile builds (Fennec for WinCE and Maemo) landed. This is needed because changes to mainline Mozilla code are breaking the mobile browser. When this happens it ends up wasting a lot of the mobile team’s time and effort. Building Fennec is different from the usual Firefox build because it is cross-compiled for both platforms and requires two mercurial repositories (mozilla-central and mobile-browser).

WinCE try builds override the standard WinCE build factory with different checkout, mozconfig and upload steps and adds some try related processing and patching. Maemo, however, uses a very different build environment. To do builds for Maemo, Nokia has developed something called scratchbox. Scratchbox is basically a chroot environment which has all the required binaries and libraries to do a full fennec build. The Maemo build factory had to be modified with special regard for where the actual build took place. Normally, there is a directory under the buildbot slave’s main directory where a build happens(e.g./builds/slave/sendchange-wince-hg).
For maemo, the build had to take place under the scratchbox root because the standard folder wouldn’t be visible to scratchbox in the chroot. Maemo uses /scratchbox/users/cltbld/home/cltbld/build instead. Each command that needs to be run to build software is prefixed with scratchbox -p -d followed by a path to the working directory and the command to run. This will start up the scratchbox environment, execute the command then exit.
Because of the way try server is designed it is not possible without some redesigning to have two repositories with their own patches. The mobile-browser repository is inside the mozilla central directory. Because of this, it should be possible to get one patch to encompass changes to both repositories. To do this I have a hypothesis which involves mangling a mobile-browser patch with
sed 's/^--- a\//--- a\/mobile\//; s/^+++ b\//+++ b\/mobile\//'
You would also need to merge your mozilla-central and mobile-browser patches together, something I am not entirely sure how to do. I have tested this command and it applied cleanly with patch -p1 in the mozilla-central checkout directory, but I also didn’t want to waste build farm time by submitting this patch. If it works for you please let me know and I can take a look at making this a part of the sendchange interface. This is possible because the patching process uses patch instead of hg import.
There are two small issues with mobile try builds right now. The first is that there is no mail notifications on the completion of a try build and the second is that mobile try builds are in a different directory than the Windows, Linux and Mac OS builds. Patches are written and waiting for review over at Bug 465039. The rest of this post will be about how I wrote the patch and what I learned. Feel free to stop reading
I started with a patch that Aki had written for WinCE try builds. There were a couple issues which had prevented this patch from being accepted and used. My first task was to understand how the try server system worked. I was already somewhat familiar with buildbot but I had never seen a configuration quite so large. It was really interesting to figure out how the configurations had been constructed. Eventually I figured my way around after a couple false starts. I am used to being able to have a completely self-hosted instance of whatever I am working on. During this project I learned a ton of valuable lessons.
I learned that it is critical to think everything through completely before writing it. One of the biggest sources of trouble I had was writing code without completely understanding what was going on. Part of this was because I wasn’t familar with the Mozilla configurations and part was because I was writing a patch without being able to test on a live system. This has taught me to be less ’selfish’ with my coding style. I need to spend more time when writing the patch so I can spend less time in the testing environment.
Actually putting the patch into production involved one semi-major hiccup. Because I had made changes to the regular Wince and Maemo build factories I had broken when they get their configuration step. I didn’t spot this in staging because it only showed up on a clobber build. After a writing a patch very quickly the problem was solved and the builds are now working in production again.
May 29, 2009 06:02 PM
I know I’m a little late on the bandwagon, but I’m sick of seeing articles claiming Google is losing so much money from YouTube. They’re based on estimates that I find a little absurd.
Let’s take just one example - http://www.internetevolution.com/author.asp?section_id=715&doc_id=175123&:
Disclaimer: I’m going to use low-ball estimates to guess where Google stands. I am by no means a professional when it comes to estimating this, or even educated in such things, but I feel like Google has so many tricks up their sleeves that I have only slightly less credibility than Credit Suisse or Bear Stearns. I repeat: I am making up numbers
Bandwidth
Maybe I’m not understanding something here, but from what I know a mutually beneficial peering agreement doesn’t require paying for anything other than labor or hardware. ISPs don’t want to provide users with fast internet without having it bounce around too many places, as does Google. Assuming Google has a datacenter close enough to every major ISP to just peer to them (not unreasonable), their only potential non-labor cost is communication between their datacenters. But wait! Hasn’t Google been buying up dark fiber left and right? That means their costs are adding additional capacity and redundancy, plus network maintenance (hardware and labor). Like I said, I’m not a hardware guy, but knowing people who owned datacenters, this is how I understood it. Please call me stupid if I’m wrong, but I’m going to cut this down to $10,000 (~$3.5M/year).
Revenue Share
This one’s just BS…they’re counting “making less money” as an expense. Sure, it’s less money, but that’s a little misrepresenting, no? Plus, I assume the estimating companies already took this into account. $0
Content Acquisition
Google isn’t dump…I doubt they’re putting themselves in the red solely on content costs. Media companies also get a huge amount of exposure from being on YouTube that they can’t get anywhere else (Excluding TV shows and Hulu, but YouTube mostly deals in music videos anyway). So let’s cut this in half and say $360,000 (~$131/year, a lot of clams, and generous in my opinion!).
Hardware
“Given market estimates of about $2 per gigabyte”. Really? Google is famous for using off-the-shelf hardware. I can buy a 1TB HDD for $100, and I’m not buying a million of them. I’m not saying this quote isn’t accurate when you account for electricity, cooling, redundancy, etc, but Google is far above the average for all of these, so I feel like using a market estimate is unfair. I’m gonna cut this in half, so $18,000 (~$6.5M/year).
New Results
Let’s calculate Google’s break-even point for YouTube:
| Bandwidth |
$10,000 |
| Content Acquisition |
$360,000 |
| Revenue Share |
$0 |
| Hardware |
$18,000 |
| Subtotal |
$388,000 |
| Administrative Costs |
38.4% |
| Math! |
x*(1-.384)-388000=0 |
| Break-even Revenue |
x=$629,870 |
Now I’m not saying that Google is definitely making money off of YouTube, but $630K/day is less than Credit Suisse estimates Google’s daily revenue at, so it’s entirely possible they’re in the black.
May 29, 2009 07:38 AM
In a previous post I wrote that :
One of the goals of EdMo should be lowering the barrier for contributing back to Mozilla. The material we are producing is something that teachers and students can take and use anyway they find useful. But how can we make it easier for them to feed back into the project?
One way is for EdMo to be a place like the Ubuntu Community Documentation that invites contribution.
Some people liked that idea. However, developers have made it clear to me that more places for documentation are not wanted by them. I agree. There must be no duplication of MDC and anything that properly belongs on MDC should go there.
So what does belong on EdMo?
Big picture narratives
Because of it's scale, MDC doesn't necessarily work well as an introductory text. For instance, if you go to Participating in the Mozilla project page the list of tools is a bit confusing for the beginner. The Tinderbox link goes straight to Tinderbox, and the link to an MDC page underneath leads to a mostly empty cupboard. Newcomers need to know why they would care about Tinderbox.
Learning modules
Think of teachable units revolving around a task that needs to be completed rather than something purely reference oriented. In some (most?) cases, this will be a curated way of getting into MDC or other documentation.
...
I've put together a long chart trying to describe how Mozilla Education will be organized. Every box maps to a page. However, some pages near the bottom of the hierarchy could be joined or split. What's more important is their connections.
I'm sure that I've forgotten XYZ topic, and I'm glad to hear suggestions. But I'm more interested to hear if the the overall structure makes sense, if you would know intuitively where a new topic should be plugged in.
The landing page leads into six major tasks:
- Teaching using Mozilla
- Connecting the various schools involved
- Connecting the students from different schools
- Learning how to hack Mozilla code
- Learning how to get help from the Mozilla community (and give back)
- Getting involved with EdMo as Mozillan (is that a word?)
Following each of these tasks leads to an overview of what you need to accomplish those tasks. And digging deeper takes you the learning units. I haven't show links to external references in all units to avoid clutter.
All comments and criticism welcome.
May 29, 2009 02:45 AM
May 24, 2009
“There is a secret bond between slowness and memory, between speed and forgetting. Consider this utterly commonplace situation: A man is walking down the street. At a certain moment, he tries to recall something, but the recollection escapes him. Automatically, he slows down. Meanwhile, a person who wants to forget a disagreeable incident he has just lived through starts unconsciously to speed up his pace, as if he were trying to distance himself from a thing still too close to him in time.
In existential mathematics, that experience takes the form of two basic equations: the degree of slowness is directly proportional to the intensity of memory; the degree of speed is directly proportional to the intensity of forgetting.”
- Milan Kundera, Slowness
I was leafing through my copy of Big Issues: The Examined Life in a Digital Age the other night and was struck by this quote. Owen Edwards excerpts this in his essay “Remembrance of Things Fast” in which he critiques the speed with which we live in the modern era. Some call it “social acceleration” and when pushed to its limit it is characterized by the acceleration of change such that experiences blur and memories vanish.
Edwards wrote the essay in 2001. If then he was anxious, today he must be utterly overwhelmed. In many ways, the internet has gone from mere accessory to displacing the world that built it. Bits are replacing atoms at an alarming rate. In 2008 alone, the world created 487 billion gigabytes of information (up 73% from 2007).
This is both beautiful and terrifying. The internet is the great democratizer, unlocking information and making it accessible to anyone that can plug in. It proliferates on the principle that there is virtually no cost in participation. It is that paradoxical book shelf that can accommodate seemingly infinite books at little to no marginal cost. But while the economics can justify an infinite stream of information, something must be said of the psychological implications. Today, amidst the flurry of activity that is one’s inbox, mobile phone, tweets, and web apps, many are overstepping the line of hyper-productivity. In a world of one-to-many communications, simply keeping up with the stream at times requires super-human capabilities. Which is really to say that we’re going too fast.
The internet opened up a landscape of unfathomable possibilities. And here we are at the foot of the New World, itching to grab all we can. The new Manifest Destiny is reaching the end of the internet. And with every new bit consumed and new level of productivity, we experience more but retain less. The new thesis is 140 characters long. It’s delivered in real-time and flashes across the screen and our minds in a matter of seconds. The phone is buzzing, the browser several tabs deep. unread emails number into the hundreds. We are awash in all of it. The answer is in your sigh, in your closed eyes and refrain. The key isn’t more information. It’s more focus.
Slow down.
May 24, 2009 12:18 AM
May 22, 2009
An interesting round of meetings surrounding Mozilla Education this week. At the start of the week, professors from a diverse collection schools joined the weekly conference call. On Thursday, some professors came into the Mozilla Toronto office for further discussions.
There were some high level discussions and some nuts and bolts discussions about using Mozilla in the classroom. Here's my completely non-comprehensive observations of issues raised in no particular order and being of unassigned value.
Research versus applied schools
Institutions that produce primary research (universities) will approach open source in the classroom room differently from institutions that do not (community colleges, polytechnicals).
Working with open source may be easier for colleges. The emphasis on practical skills and finding student placements in industry connects to open source organically. Colleges may not realize this yet, but it makes sense.
Universities have more of a theoretical focus. More importantly, professors have a research focus. How can working with Mozilla further that research and create value for Mozilla? Developers and researchers need to find an alignment of self-interest.
Being like the community
The methodologies used to teach should map to the methodologies used in open source (ie. using Mozilla's tools and not creating your own parallel universe). Not doing things the way the community you are engaging with does can lead to working in isolation. This is a novel way of working for teachers.
Inviting contribution
One of the goals of EdMo should be lowering the barrier for contributing back to Mozilla. The material we are producing is something that teachers and students can take and use anyway they find useful. But how can we make it easier for them to feed back into the project?
One way is for EdMo to be a place like the Ubuntu Community Documentation that invites contribution. DevMo is a great reference source, but it's not a place for random how-to pages. Changing DevMo is not unlike changing the Mozilla source code. There's a sense of changes being reviewed to see if they belong.
EdMo could be a place where people create the kind of documentation that doesn't belong on DevMo. (It's important to create something that will be used by the wider community and not duplicate something that already exists.)
There are some important differences between Ubuntu and Mozilla. The Ubuntu docs are process oriented. (eg., how to install a LAMP server). Only a portion of Mozilla documentation is about duplicating a process with expected results (eg. building source).
May 22, 2009 09:30 PM
May 19, 2009
People have been asking me for a status update on my Google Summer of Code project. Here's the scoop.
If you want to follow along the best place to bookmark is the project wiki page:
http://zenit.senecac.on.ca/wiki/index.php/User:Jamesboston/nsIProcess
The other place to look is the mercurial server that I use to publish code:
http://hg.jamesboston.ca/mozilla/gsoc
If you want a plain text patch containing all the changes from trunk visit:
http://jamesboston.ca/misc/patch.cgi
I will push code there every Sunday at the very least. For now I am working on top of revision 28222 of mozilla-central.
The first push is a jsm file with a simple wrapper for nsIProcess. I've never written a js module before so I wanted to figure that out first. I've piggy backed on the Makefile for a few existing jsm files, but doubt that js/src/xpconnect/loader is best place for the file. However, it will be a trivial task to relocate it later when it wraps nsIProcess2.
The next push creates the skeleton necessary for implementing nsIProcess2. I've started with the proposed API.
Now all I have to do is fill in the code that does stuff.
May 19, 2009 04:26 AM
May 17, 2009
If you don't know about the magic of screen + irssi this probably won't interest. (We don't want your kind around here anyway.)
I've written an irssi script to work with Twitter. It allows you to send and receive tweets from irssi.
Instructions:
Install the perl module Net::Twitter. On Fedora you would do it like so:
$ yum install perl-CPAN
$ cpan
cpan> install Net::Twitter
Download this script twitter.pl:
twitter.pl [zip]
Edit the script with your own twitter credentials.
Put it in your ~/.irssi/scripts folder.
In irssi load the script:
To send a twitter:
/twitter Hey, I'm a tweeting fool.
Tweets from people you are following appear in your current window in a typical irc style, but prepended with the text "tweet:" like this:
<mhoye> tweet: Someday, my daughter will say "My dad says that pink is the thin, pale colour of the blood of my weakest enemies."
The tweets you send and receive are not visible to the channel. Only you (and your twitter followers) see them.
If you want to submit a patch the development version is here:
http://hg.jamesboston.ca/irssi/twitter/
May 17, 2009 01:56 AM
May 14, 2009

JavaScript Error Console on Fennec
This week as the mobile guys finalize the alpha for Windows Mobile I have busied myself with adding the JavaScript console to Fennec. Both Mark, Doug and Brad had expressed interest in the feature and it sounded like a nice chunk of work to keep me productive while the other guys concentrated on pushing out the alpha. I have a WIP patch up. I still need to spruce up the warning and error rows to more completely represent the data, however the whole console (filter and evaluation) currently functions just like the desktop version.
It has been very interesting to move away from C++ and into XUL and JavaScript. I have enjoyed being outside my comfort zone and lucky enough to have Mark right over my shoulder to help me along the way. I plan to spend some time reading my JavaScript book and XUL tutorials on the road to LA this weekend.
The second week here at Mozilla is somehow even better then the first. I enjoyed going out with the mobile team last night to take in some dinner and movie (Star Trek), it was nerdtacular. I’m lucky to be here and I don’t plan on forgetting that anytime soon.
May 14, 2009 11:11 PM
I revised the Mozilla Education front page today. Some information that was previously located one or two links into the site is now the first thing you read. The intro section focuses on the big picture of bringing open source methods into the classroom.
I've also added a new section beneath the site introduction called "Mozilla in the Classroom". It still needs to be fleshed out with more detail, but the I think that explaining how teachers are going to use/benefit from partnering with Mozilla needs to be explained in a separate unit from the big picture. I think I may steal some information from the case studies page.
I've put together a page for my notes on an info architecture for the site:
https://wiki.mozilla.org/User:Jamesboston/InfoArchitecture
One of the products of that is the addition of a site map. When you organize the site map according to the existing naming conventions, the site is easier to understand. But if you look at the how the site is navigated by links instead, it is harder to understand.
What this tells me is that it is easier to group pages by content than it is to find paths through that content. But the latter problem needs to be solved.
May 14, 2009 10:43 PM
May 12, 2009
I'm working towards revising the front page of Mozilla Education this week.
In the hope of getting feedback, suggestions, or criticism, I'm attempting to put my works-in-progress in the public eye.
There is a discussion page now with some draft material for you consideration:
https://wiki.mozilla.org/Talk:Education
I've also started a wiki page for myself to use for project planning:
https://wiki.mozilla.org/User:Jamesboston
I'm hoping it makes my job easier if it is publicly known what I am trying to accomplish.
May 12, 2009 09:34 PM
May 11, 2009
So with my first weekend in California, what did I do? Well I left California, for Nevada. Anthony, Matt and I packed ourselves into the Jetta. The drive was exciting; speed limits be dammed. Going through the twisty bits in the mountains was a real thrill; all driving should be like that. Arriving in Vegas, having never been before, I was shocked as to how large everything was, the casinos are massive; and wow were there lots of people. We were walking around at 3am and there were hordes people travelling from casino to casino and drinking — on the streets! The next morning the people were still there, but the sun was out, and boy was it hot, 103°F (40°C). We saw Penn & Teller and I had some time to win some money at the poker tables, which really only served as a recovery from the losses at the roulette table. I would definitely go back, but next time I would stay at Paris, the lunch there was phenomenal and the view of the Bellagio fountain was spectacular. Here are some pictures from our travels.
May 11, 2009 05:58 PM