HOWTO: Edit Mozilla code in 5 minutes – make a simple change and see the results instantly

A few days ago, one of my professors at National University of Singapore asked me if I could provide a screencast of making a change to Mozilla (Firefox) code and seeing the change post-re-compilation, for a CS2103 course (that I didn’t have to take due to it not being part of my module requirements). I happily obliged though, and here is the screencast:

Screencast in swf (just under 4 minutes)

(Created using Jing, and I have no idea how to convert it to Theora, so apologies for that.)

Free for educational purposes only, please contact for other requirements.

NUS in Mozilla map of students around the world

Mark Surman has an interesting post over at his blog, where he maps the list of students working on Mozilla around the world. It’s amazing how Mozilla just started off in the education area not too long ago – and already encompasses ~14 schools worldwide now, from the North America to Europe, from Asia to Oceania. Kudos especially to humph for his great work linking up folks around the world.

National University of Singapore (NUS) has just finished CS3108 (Mozilla) a few weeks ago (the 4 folks being Yuen Hoe, Yaoquan, Hendrik and Tony), it will be taking a break over the next semester as I head overseas for an exchange program. I look forward to more students stepping into Mozilla development in the future.

Before I end here, I would especially like to mention that it really reaps returns and satisfaction of the highest quality, when students transform from someone totally lost to someone capable in their own right in the world of open source, within mere weeks, guided by folks around the world, with different timezones, different cultures.

Talk on Open Source development for college students, by a college student

I gave a 1 hour talk on open source development at my school, National University of Singapore, on Friday evening 6.30pm, thanks to an invitation from one of my professors, Prof Damith. There were about 15-20 students in the audience, most new to OSS, while there were a handful who already worked on OSS projects, such as Linux and Bazaar. Bits of my Mozilla open source experience went in as well.

I accepted the invitation to give a talk because I love to teach anyone who is willing to learn. It perks me up when I see fellow students learning from me, eventually becoming better than me in their own areas of OSS development. It is one of the best feelings anyone can experience. (yeah, maybe on par with, but probably not surpassing the feeling of being in love)

The slides have been uploaded. I hope the slides would prove useful to anyone looking to work on OSS, please let me know if I can help students in any way, my summer isn’t fully booked yet, and I can head anywhere around the world for discussions / talks. 🙂

(WordPress.com prevents embedding of Google Presentation slides, so I did a link instead.)

student-project keyword is live on Mozilla bugzilla – start tagging now!

Dave Humphrey has written an excellent blog post where he describes the introduction of the “student-project” keyword in Mozilla bugzilla – he also covers how to classify bugs as student-projects.

I have also gotten some queries up and running over at Mozilla Wiki where you can keep track of these projects via queries, feeds and all. These queries are Mozilla-wide, they encompass all products from Firefox to Thunderbird, SeaMonkey to Sunbird etc.

Please start tagging, then tracking “student-project” now, if you are interested!

And do join us on #education on IRC, as well as the weekly meeting phone calls. We are having great momentum here, let us continue to maintain it and push forward. 🙂

Howto: Find Regression Windows Through Manual Binary Search

(Cross-posted from The Rumbling Edge)

Thunderbird 3 Beta 2 has had its code frozen for a couple of days, and Standard8 discovered a crasher during this QA period. (Bug 479206) The natural way to QA this was to test each previous release to see whether the bug was occurring… (with a fresh profile every time, of course)

… Thunderbird 3 Beta 1 has this bug …

… Shredder Alpha 3 has this bug …

… Shredder Alpha 2 has this bug …

… Shredder Alpha 1 has this bug …

… Thunderbird 2.0.0.19 does not have this bug!

Hmm, this still leaves quite a large regression window, from the point of branching of 1.8 and 1.9, till the current time…

I went back further, trying trunk builds from Mozilla FTP using nightlies every year (backwards) …

Tried the build from 2007-12-01 (Shredder Alpha 1 was released in the early part of 2008)… No luck.

2006-12-01 does not have this bug. Now I’m getting somewhere…

2007-06-30 has this bug. Ah, a 6 month regression window, finally… but still a tad too large.

(The key point is to take intervals that divide themselves by half everytime – from 1 year, to 6 months, and now I’m going down to 3 months…)

2007-03-31 does not have this issue! More happy thoughts…

Nor does 2007-05-15!

Nor 2007-06-07! Really close now…

2007-06-17 has this bug! And I continue to chop up the regression window…

… chop chop …

And I end up with:

2007-06-11 does not crash.

2007-06-12 does crash!

So bingo! By making use of this technique, you have now found a suitably short regression window!

Some things you can further do to track this down – searching in hg annotate (for newer builds), or for my example above, Bonsai and inputting the date and time in a slightly large range (I used 2007-06-11 02:00:00 as the start time and 2007-06-12 04:00:00 as the end time, as Thunderbird nightlies start building from 03:00:00 PDT or PST). Search for probably-guilty checkins then comment in the bug. CC’ing the developer who wrote that initial patch does help too.

Developers from that point onwards will most likely be able to jump in quickly to debug the issue, and this is where QA usually finishes its work.

(Endnote: I was usually most bogged up by Mozilla FTP nightly download times – 10-15 minutes every time – but YMMV)

Reflections

What does open source mean to me?

I had been in touch with open source for a long time, ever since Mozilla 0.9.x came out, ever since Red Hat 7. These were my own personal encounters with open source. Never fully realizing their potential then, I only knew they were free. And as the years went by, the meaning of “free” as in usage, slowly morphed to being “free” in terms of their source code being open. As the Mozilla community started to mainly coalesce around Firefox and Thunderbird (and other apps too!) in 2003, I chose to jump first on the Thunderbird bandwagon. My view was that even though I hardly knew what POP3/IMAP4 were, I learnt from touching such code on a daily basis. Slowly I began to write installers, start The Rumbling Edge, write patches, etc, and the pieces fell gradually into place.

Now, the meaning of open source has morphed into something more visionary. The fact that code is open means that anyone in the world can view it, improve on it, and more importantly, learn from it. Teaching CS3108 in NUS is letting me realize this too. It is some achievement if you can figure out how to patch a bug, but it’s an even greater sense of achievement when students are able to figure their way out with some of your guidance. They have been a great bunch thus far, being able to cram most of Mozilla’s tools and ways in the space of weeks, get used to it, and find their way around. And that’s the importance of open source, which naturally promotes community involvement. Community involvement does expose the students to another world out there, another point of view from whatever they have been fed at school. Being a student myself at NUS also meant that I had to find ways of making my lessons entertaining, interesting and more importantly, interactive. Open source just made that much easier — lots of code inspection, code search demonstrations, videos, all shown live and these are the very tools that everyone uses for Mozilla development.

How is one going to accomplish such things with proprietary code?

This sense of satisfaction is what I’m finding open source to bring me thus far, at this very moment in time.
What do I want to achieve by the end of the course?

Naturally, I hope to see everyone accomplish their course objectives successfully (see my long reflection above). Gradual work and guidance always beats last minute self-work that might not necessarily prove to be the best path forward. It amazes me sometimes to see people helping each other, at different locations, different timezones, different weather scenarios, different cultures, all moving towards a common goal, a common good, to make the internet a better place for all.

Bonus: My take on Concept Series.. Adaptive Path.

I have found Adaptive Path’s concept, while visually stunning and set probably decades in the future, to be complicated and a drastic change from what Internet users are accustomed to now, especially after discussions among viewers. Everyone tends to hate change (note I mention “tend to”), and anything that changes the slightest bit, people will notice and start to bite. (enlarged Back button, anyone?) There is a lot of new concepts in Adaptive Path’s video, but how would one know that the Z-axis represents time? It might come naturally to some, but not to others. Likewise, the holding of right click and subsequent functionalities from the menu that pops up, how does one know they even exist? Being visually stunning doesn’t necessarily warrant acceptance by all, some might prefer a simple CLI mode to be visually appealing. And internet users tend to want something simple, lightweight and fast to accomplish their objectives. I don’t really see how a overly-pretty-looking interface can help that cause.

That said, I have made pretty much subjective comments, some of you may eventually disagree that the interface in Adaptive Path’s concept is overly-pretty-looking, and I accept that. Ultimately, these concepts have to be slowly and gradually shifted into an internet user’s world, and internet users are notorious for not wanting to have anything shoved down their throats. Change is hard, but if essential, change has to occur.

Is Adaptive Path’s concept essential?

NUS Student Projects – finalized

So here you go, four students from National University of Singapore are taking on Mozilla projects across various disciplines, in no particular order:

  • Yuen Hoe (moofang on IRC) is working on a Thunderbird accessibility bug 449560, as well as bug 227305 which is about drag-and-drop support of messages to the Desktop from Thunderbird.
  • Yaoquan (Yaoquan) is hacking on porting Personas to Thunderbird.
  • Tony (tonyvu) is intent on improving Ubiquity commands.
  • Hendrik (Hendrik) is tackling bug 475967, which is a Feature Request to “Right-click password dialog to forget saved password.”, probably implementing an extension if necessary.

Feel free to say hi to them if you spot them on IRC!

Student projects from NUS

I have great news coming right up. Though it’s not about time to really reveal everything (it’s almost complete though), there will probably be four student projects from students in the National University of Singapore (NUS).

They include:

  • Porting Personas to Thunderbird.
  • Thunderbird frontend work, including possibly an accessibility fix.
  • Firefox password-related stuff.
  • Ubiquity improvements.

More information will follow in the coming weeks. In the meantime, this is a true “first” time we are having official student projects from NUS in the Mozilla world.