It was 10 years ago today that I first got involved with the Mozilla project.
As I once said: “I did, like, some random, like, little basic things.”
In the beginning…
It all started sometime in 1995 when I started running Linux. Sometime over the next couple of years I decided to write a GUI email client. Ironically, the only real option at the time was Netscape Communicator. GTK+ and GNOME were both new and I decided to go with them as my toolkit of choice. Eventually I ended up with the Balsa email client. Through my journey with the Linux desktop I had gotten to know a number of people, including one Mike Shaver who at the time was at Netscape.
In late 1998, while living in northern Georgia, I signed up to volunteer at the Atlanta Linux Showcase. Over October 23 and 24, I talked to quite a few Linux, GTK+, and GNOME community members and by the end had volunteered to help port Mozilla from Motif to GTK+. Little did I know at the time where that would lead me.
You see, 10 years ago I was a senior in high school, working at a small ISP building websites and maintaining our servers. I’d been writing C code for a few years but had done very little object oriented coding and no C++.
We had a lot to do. Back then we were using GTK+ version 1.1.x and as it was under rapid development to provide all the features we needed, we were bumping our version requirement every few weeks. Pretty sure that was driving the folks at Netscape crazy.
Back then we had implementations of all the native widgets you can think of. Things like radio buttons, check boxes, text input fields. I remember one day Ramiro Estrugo told me that there had been a decision to redo all of our widgets in a cross-platform way. He was worried how I would take it, given it meant throwing away a bunch of my code, but it seemed like a good idea to me.
It was right around then that XUL entered the picture.
Sometime in January/February 1999, I received a call from David Winton, who was working on a documentary about Netscape and Mozilla. He wanted to bring out a film crew to Georgia to follow me around for a few days. Apparently my explanation on why these guys would want to come out worked as my parents agreed and a few weeks later the film crew showed up. The followed me around work, school and home for a couple days. It was a pretty strange experience.
At the end of March 1999, my mom and I ended up flying out to California for the 2nd Mozilla Party. While in California, we met up with the the Winton duPont film crew again and and they shot some more film. It was on April 1, while sitting in the Netscape cafeteria, I found out that one of the major Mozilla/Netscape figureheads Jamie Zawinski was leaving. At the time he wrote on his website: “For those of you who choose to continue, I wish you all the best of luck.” Maybe his luck came in handy as this was just the beginning.
Onward to Netscape…
By May of 1999 I had a job offer to move to California and work for Netscape. I accepted and started at the end of June. My primary task at that time was continued improvement of the GTK+ widget and graphics code.
During my first week at work, David Hyatt added intrinsic window sizing for XUL windows. That way, they would size to their contents. This totally broke Linux as I had somehow forgotten to handle top-level window resizing. Oops. A frantic but fun way to start things off.
The rest of the year was a lot of long nights at work and a lot of learning to live on my own. I ended up building out a lot of widget and graphics implementations including getting the GTK+ drag and drop code working and adding our file picker API. It wasn’t long before Chris McAfee and Brian Ostrom first introducted me to La Bamba.
In early 2000 myself and Scott Collins went up to San Francisco to watch a preview of Code Rush at the Winton duPont office. It was pretty cool to see so many folks on video I had only heard about, ones who had left Netscape before I joined. I remember this trip because on our way back, a big sheet of plywood fell out of a truck in front of us on 101 and ended up slamming in to the front of Scott’s car and ending up covering the windshield. Fortunately we were OK and able to pull over without being able to see anything.
A few months later Code Rush was released. Just before it was released, there was a showing in a big theater room in Mountain View with many of the people in the video in attendance.
In March 2000 using an early MacOS X Rhapsody (later renamed Darwin) pre-pre-release on my unsupported PowerMac 9600, I set off to port Mozilla to the platform. At this point, most all of the Mac guys at Netscape were still working on OS9 and most of them were unconvinced that OSX would become real. For some reason or another, pretty much daily my Mac would refuse to boot and so I’d have to reinstall the OS to get it booting again. Eventually I got it to the point of popping up a window that rendered pages, but it wasn’t very stable and didn’t work very well. The work sat mostly untouched for nearly 2 years until the rest of the Mac community became interested.
Despite Netscape having a security library to handle cryptography, they had been unable to release the source code along with the original source code due to US cryptography restrictions. I don’t remember all the details, after getting it all building on Linux and a lot of work from the legal department and the security guys, in March 2000 we were able to land it on the trunk.
2000 was a busy year. In addition to those things, I built a new Unix file picker using XUL (which I still believe was better than the current GTK one), built our clipboard code and made it support all the crazy ICCCM text formats, rewrote our event queues, and got old-style plugins working using crazy Xt magic.
The Netscape mail servers were all inside the firewall, so if you wanted to read your mail you needed to VPN in. All but one, which you could access over SSL using a client certificate. I never did much with the mail and news code, but I made a deal with one of the IT guys to give me access to the server if I implemented IMAP and SMTP over SSL — so I did.
Despite outcries from engineering that the product wasn’t ready, Netscape decided to ship Netscape 6 on November 14, 2000. This was the first major release since Netscape 4.5, and by all accounts was a horrible release. It was neither stable nor fast.
In late 2000, I started my first attempt at rewriting our graphics layer. It was simply called gfx2. A lot of people around thought it was a good idea, but no one really wanted to help build it. I built out a decent X implementation that was fully scriptable, but eventually let it drop. The time just wasn’t right yet.
I continued working on the GTK+ code, making many significant optimizations, until January 2001, when I switched over to designing and building a new image library. There were a number of issues with the old code including that it did cache matches based on the image size, so if you used the same image multiple times on a page, you would refetch it from the network every time. This was in the days of using lots and lots of spacer images, so this could be very expensive. The scale and many other pieces lived deep in the image library code rather than in the platform specific code which made it difficult to optimize.
I spent much of the first few months building out and designing something I was happy with. Using XPCOM for the one thing it was really designed for, I added pluggable image decoders that could be easily added, made the caching to be much smarter than the previous library and by the end of March, things were getting turned on on the trunk. Looking back, it was a pretty rough landing. Because of the way things were implemented, the code that handled background images was still using the old image library. Things stabilized pretty well over the next couple months and by August things were fully cleaned up and the old image library was removed.
A lot was going on around this time. The network library that had built the previous year was being heavily worked on, a new cache system was being built. A word of wisdom to anyone who might build something on top of a network library: wait until it is fully stable before building on top of it.
Towards the end of the year, as part of making the image library do threaded image decoding, I built a thread-safe cross-platform timer implementation. It seemed to work pretty well when I wrote it, so we landed it and replaced all of our platform specific timer implementations, getting rid of a great number of bugs due to platform differences. Unfortunately, as is often the case with threaded code, things weren’t so simple and over the next few years there were numerous thread-related issues in this code. Thanks to Brendan Eich for figuring out many of them!
Most of the Mozilla community spent the first half of 2002 fixing bugs on the road to Mozilla 1.0. I spent most of it fixing image library bugs and timer bugs.
Around March or April, David Hyatt and Ben Goodger and others started discussing building a smaller, cleaner browser. We often ended up at Denny’s around 1AM having long conversations about how to make the browser new. On April 1, the first checkin for what would become Phoenix (and later Firefox) occurred.
On June 5, 2002, after 4 years of development, we finally had something we were ready to call Mozilla 1.0 and we released it to the world. It sure was a lot nicer than the Netscape 6 that had gone out the door a year and a half earlier.
Post Mozilla 1.0, I got interested in embedded platforms and spent a while looking at what it would take to port Mozilla to the Playstation 2. I built a small 2d graphics library, ported NSPR and other pieces of the codebase. Many of the pieces ran well individually, but the compiler and toolchain that was available at the time had a hard time compiling and linking all our large code base without generating bad code. Between this and the PS2 network adapters not taking off that we decided to drop this project. It was a fun learning experience and taught me quite a bit about writing compact code.
On September 22, the first version of Phoenix was released with 4 more versions coming out before the end of the year.
On June 3, 2003 I removed MNG support from the browser. It caused a big uproar from the ten guys who were using the format and everyone who thought they might someday. It was a small test of the Mozilla module owner system as well as a lesson to many about being careful about what features you add as inevitably someone will be angry if you remove it.
The end of Netscape. A new beginning for Mozilla…
In July 2003, 4 years after I had started working there, AOL laid off the remaining browser team. I didn’t find myself particularly sad. The lessons I had learned and the people I had met had lead to growth that I can only now really start to understand. We had all built something we were proud of, grown the community a lot, and truly believed that Mozilla would be a success. As part of ending browser development, the Mozilla Foundation was spun out on its own.
It was time for me to move on. Having spent nearly 5 years working on Mozilla, I found it difficult to find a place with the culture and openness I was looking used to. I remember talking to a great number of companies at the time, some with very interesting projects, but none were quite what I was looking for. I went to work at Open Source Applications Foundation in September 2003 working on their Chandler project working on many parts of the backend including client syncing. I still remained semi-active in the Mozilla community, although not as active as I would have liked.
November 9, 2004, Firefox 1.0 (and Halo 2) was released. Mitchell has a great writeup of the day, so I won’t try to cover it here, but needless to say it was a pretty exciting day for everyone. It was a pretty major accomplishment for the very small Mozilla Foundation to have hit. I’m glad I was able to be a part of it.
As Vlad and I were both interested in graphics, in our spare time we started building a cairo backend for Mozilla. We got things up and running pretty quickly on Linux but both realized we couldn’t expose all the functionality we really wanted to. Doing everything we wanted was going to require more than our spare time.
After around 6 months at Oracle, I realized I just wasn’t excited by calendaring and decided to leave.
A return to the Mozilla…
After weighing my options I found that I was still passionate about browsers and changing the web, and so I joined the Mozilla Foundation full time at the end of May 2005. Amusingly, the project I wanted to work on was redesigning the Mozilla graphics system, still, around 7 years after I first worked on it. Vlad, who also joined MoFo, and I set off on a two and a half year project, one of the biggest ones I can remember rebuilding our graphics engine.
One of the major flaws our old graphics code had was that it only implemented the least common denominator of platform functionality, and so even backed by something like cairo, the Gecko graphics API didn’t expose all the functionality we needed to do rich graphics on the web. Not all platforms support the same set of functionality. For example, Mac OS X has APIs to draw curves with anti-aliasing while Windows does not.
Coming up with a new graphics API was pretty straightforward. As they say, the third time’s the charm. We had both played with cairo and knew it could do many of the things we needed. It was important to select the right software graphics implementation, but there wasn’t much out there besides cairo and agg.
After playing with both, deciding that we didn’t want to build our own from scratch and finding that agg wasn’t at the right level, we decided to go with cairo. We knew that meant we’d have to contribute a lot to it, but it seemed better than the alternatives.
A lot of the work we had to do in cairo was centered around performance and taking advantage of platforms. Many of the cairo developers were on Linux, but few were on Windows and Mac. Vlad did some amazing work on getting these all hooked up.
On the Gecko side, we wanted to take advantage of our new graphics capabilities as much as possible.
As part of the graphics changes, we decided to take on re-writing our text handling as well without thinking much about what that meant. I’m here to tell you, text rendering is hard. There are a lot of languages, fonts, and unicode codepoints. Each platform has a different way of finding the right fonts for the text you want to render, except Windows, where you’re basically on your own. Fortunately, Windows gave us the most freedom to implement correct font selection and after 4 or 5 different tries, we finally got it right. We ended up porting it to Mac and using it there and are in the process of using it on Linux. At the same time, Robert O’Callahan rewrote much of the text layout code in Gecko to take advantage of the new font APIs we could provide. Looking back, we probably spent more time on text rendering than we did on the rest of the graphics changes.
The graphics work continued at full speed until the end of 2007, when I took a few months to look at memory usage. I’ve written in pretty great detail about the work that went on in fixing the memory usage in Firefox that continued on until March 2008.
A few weeks before we were going to release 3.0, I took off on a pre-planned vacation to Barbados for three weeks. Because I was on the beach when 3.0 went out the door on June 17, 2008, the accomplishment of shipping never really hit me. I wish I could have celebrated with everyone else, but I’m not sure I would have traded the relaxation of the beach.
As Firefox 3 was wrapping up, I started looking for my next challenge and agreed to help build our mobile browser, Fennec. After returning from Barbados, I was refreshed and ready to roll. Our team has made great strides in building Fennec, and just last week released our first alpha. It is amazing to be part of another project from the early days and facinating to watch people change the way they use the web.
Today, 10 years later…
I’m at FSOSS 2008, a conference that is in many ways similar to the one that started this whole thing for me. I’m amazed by the work that this school has done to teach its students the open source culture and a different way of thinking. I hope that for at least one person attending, it results in a great journey for them.
The future is bright for Mozilla, and I look forward to continuing to be a part of this great community. The web is really starting to take off with new capabilities like offline, video, audio, SVG, and location awareness. The community, a group of amazing people, has built an outstanding platform, an outstanding desktop browser, and is building what will be an outstanding mobile browser.