Squashing my first bug at Mozilla!

I’m involved in Mozilla for a few days now. So, I’m just gonna talk about my experience today…

I presume you know that I’ve paused my contribution to Stack Exchange for a while, partially because (well, frankly) I got bored, and because I needed time to learn some new stuff. Later on, I was much more involved in coding, as Python & Javascript have caught my attention very well. Assignments, problems, lab works, project works, I use both of them all the time. Soon, I got bored! (again!) I wanted something new (which happens all the time!)…

How did it start?

I remembered Manish’s advertising about Mozilla sometime ago (well, if you’re also planning to get involved, then I suggest his post, which nails down the whole thing precisely, because this is just my experience with the community). When I had a chat with him, he said these exact words, “Mozilla is the most welcoming community I’ve ever seen!”. So, I joined Mozilla, by which I mean I signed up for Bugzilla & Mozillians which are pretty much enough for the start. I later realized that the former is for actually doing stuff, while the latter is for showing it off!

My choice was to patch bugs. But, Mozilla is far extraordinary than I had previously thought. I had the misconception that it’s only known for its browser (for different OS). Wrong! Anyone equipped with anything are welcome there. Apart from its browser, it has its own browser engine, it has its own language, and now it’s developing a new operating system for smartphones.

Anyways, as I went further, I realized that I was new to literally everything they had demanded (other than programming). Manish told me to set it up in Ubuntu (as he himself doesn’t like Windows). But, I went ahead and tried setting it up in Windows, not because I like it, instead because I’ve configured my Windows to suit my mind. Even though Mozilla had explained about the prerequisites, setting up the environment (in Windows) was like crap! Moreover, I also heard that it takes more time in Windows.

Because, Windows has its own boring command-line, not the awesome bash! Building Firefox requires a lot of things other than Python like Mercurial, Mach, etc. I later found that Ubuntu has UEFI support. Or else, there would be a lot of switching back & forth between UEFI & Legacy mode during the boot. Soon, a weekend came by, and I got into Ubuntu. One day of intense googling is far enough for getting started in literally anything! Linux had some awesome things I liked…

  • You don’t have to go around looking for the software most of the time because it knows what you want! If it doesn’t have it, no problem! Say, if you want Firefox,
     sudo apt-get install firefox # You're done! 
  • Even a simple command could sometimes be more powerful than you could’ve imagined! Even then, the most powerful bash shell doesn’t stop you from anything! Surf through anything you want, modify anything you like, there’s nothing such as a constraint! For instance,
     # If you've forgotten your password, you can reset it back... 
  • And, it’s free & open-source! That means, you can modify “your” OS according to your own free will. That’s why most of the hackers & developers stick to linux distributions.

As I got further & further, I found more & more, when I began to hate Windows…

Building stuff while eavesdropping…

When I was inside Ubuntu, setting up the environment was like a piece of cake. But, I encountered a horrible thing along the way. I’ve been using Github for storing all my code for more than a year now. It’s a version control software (Wanna know about Git?). But, Mozilla demanded Mercurial queues. Git is quite easy to use, and easy to understand. But, Mercurial is not! To be honest, I’ve been reading about Mercurial for a week now, but still I don’t understand it!

It’s strange, but powerful. It’s fast, but merciless! Something can go wrong, and you could lose a lot of your work! But well, that’s the only way it works! And, we need it. On the brighter side, newbies don’t have to worry about it, because only the backend developers are afraid of it.

Then, I found that they have an IRC network, and there’s a channel named #introduction, specifically for the newbies. I picked a client, got into the channel, and started listening. Manish was right – almost everyone (especially the mentors) help the newbies! (and there’s a firebot to entertain everyone)…

In the meantime, I downloaded the bundle. Yeah, it’s open-source and every newbie developer is supposed to have the entire Mozilla Central repository. And, the bundle has the latest version of the code. Because, bug-squashing involves browsing through the repository most of the time. Once I got that, setting up the environment was very easy (because it’s Ubuntu). A single command did the job!

 ./mach bootstrap     # Piece of cake! 

Now, the bundle should be unpacked & updated (which takes a few minutes), and then we can build Firefox (i.e., compile the entire code). The central repository is quite actively updated, as there are a lot  of contributions everyday. So, one should update the local repository quite often. But, it’s far better to check whether the code related to your bug has changed, and update it if required. If not, there’s no need for an update.

Anyways, building Firefox is a rather slow process. Since we compile everything from the scratch, it takes about an hour, depending on the processor & RAM. First build is necessary testing. But, you don’t have to build it again & again every time you make a change. For instance, the bugs I’ve been working on, don’t need further building.

So, while that’s going on, I chose a bug. There’s always a [good-first-bug] for the newbies, especially mentored by some of the developers. I browsed a lot of bugs, because I first thought of working on Firefox. Well, I failed, because those bugs were scarce. But, there were a lot of bugs on other stuff (stuff, which I’ve got no idea about how it works). I went ahead, picked up an old bug on “testing”. Now, it was time for me to get into the IRC and get some help.

One of the mentors responded to me in chat. They got me to @Yoric (who was the mentor of my bug). The mentors were awesome! They’re always there to help anyone (especially the newbies). You can get the most out of them if you ask questions. Almost everyone in the IRC help anyone. Don’t believe me? Have a look at our channel’s log

These mentors, being great developers, are busy with dangerous code. So, they don’t try these simple ones. Instead, they guide us newbies through the field of open-source, and help them contribute to Mozilla. Think of it like this. Mozilla is a community made of barely a few hundred developers who guide thousands of users, to create a product that’s used by millions of users worldwide. And, getting involved in such a community – the feeling that you’re being a part of such a great phenomena – the experience & happiness you get is inexplicably wonderful! That matters!

My first bug with my mentor…

My first bug went for a week. Though my mentor was busy most of the time, he actively responded to my pings & comments. Only the time difference desynchronized us. But, when he doesn’t, another mentor (mostly @jdm) responds to me. I spent a few hours for Mozilla everyday (because, I was getting involved more & more, day by day). It was challenging, and I learned a lot of new stuff. My first bug got me into learning regular expressions.

To be honest, Google & Stackoverflow are sometimes not enough. Only then, I noticed MDN docs. Every single article has some kind of a tutorial, which was very helpful. I (being a curious slob), also bugged my mentor in our channel to know about the working behind whatever I do. He always answers me politely. Once we submit a patch, the bug gets assigned to us. It was like it’s my own property, that I have to take care of…

In this way, I submitted a few patches. It got cancelled every time (naturally, that’s what happens), and my mentor explains me what needs to be revised as and whenever I submit a new patch. Well, there’s a nice “refreshing” option in Mercurial to update the patch whenever a revision is made and so, that wasn’t a big problem.

Apart from that, along with my frequent internet disconnection, there was a major pitfall. My Mercurial repository crashes, when it doesn’t accept any more of my changes. Like I said, I still find it difficult to understand! For now, I’ve found a workaround to get around that thing. Anyways, this went on, until my sixth patch which got accepted. Finally!

Even then, it doesn’t go straightaway into the server. There’s something called a try-server. It has a lot of virtual machines, which accepts jobs from anyone with level-1 clearance. My mentor put my patch in the queue. The server tested the code (with my patch) on different OS (which ran for about 7 hours). It passed and so, the bug has landed. Now, it gets to another team, who mark the bug as “resolved” and my bug-squashing life begins…

As a gift for patching my first bug, my mentor has vouched for me, and has suggested a bug for me. Well, I admit wholeheartedly that Mozilla is the most-welcoming community indeed! Now, I’m quite happy to show off that I’m a Mozillian

And, trust me – it all happened in a week!

Advertisements

Tagged: , ,

One thought on “Squashing my first bug at Mozilla!

  1. Les Orchard (@lmorchard) March 17, 2015 at 2:26 AM Reply

    Whoo hoo! Welcome aboard!

Wanna Reply?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: