Friday, September 26, 2008

Reading code is not as easy as it seems.

Reading client.mk and configure has been quite the tough task for me so far. Why am I even trying to read them? For my project of course.

At first, I thought that putting the 'time' command for each of the command called during the build would be an easy task. I was thinking, I'm sure they put all those call in some sort of loop and I can just put the 'time' in there in front of the calls. Oh boy was I wrong.

I started with trying to do some simple output in client.mk file to see if I was working with the right file for the build. Not much luck there, editing the client.mk was trickier than I thought it'd be. Just trying to read and find out where I should put the output took longer than expected. And when I finally found a place I think was a good spot, I tried putting some printf commands, echo commands, whatever commands it seems like it would take to output something on the screen, but whatever I tried, I always get the "separator missing" error. That was really annoying me. And when I finally got that error fixed, I can't see my output anywhere when I compiled.

So then, I thought maybe I'm not editing the right file, so I took at a look at the build output and see if it's reading some other files to make the calls for building.

Now I moved from reading client.mk to configure. What a big change it was. Reading from a file that's 410 lines to a file that's 22910 lines. Just seeing the line number was intimidating enough.

So before I continue trying to read configure, I'm going to ask around to make sure I'm looking at the right file.

Thursday, September 18, 2008

Need Contributors for OSD/DPS Project

I'm working "Profiling the build system" project and I need everyone's help.
When you run your Mozilla build, can you kindly go to my wiki project page and just put down your build time.

Wiki: Profile the build system

Tuesday, September 16, 2008

Mozilla DevDay

The sessions for the developer day had been quite interesting. There were so much info and so much to try and absorb. The Mochitest, Tinderbox, and all the other different tools used for debugging; Tests written in different languages and tests used for different formats (js, css, html). Interesting as it is, it still seem just a bit too much for someone who's just diving in to the Mozilla project for the first time.

There were lots of terminology, lots of technology, and lots of people who were being mentioned throughout the sessions, so unless you've done some prep work, or you've been involved, it's kind of hard to really know what's going on.

On a good note, it was really nice to get the opportunity to actually talk with some of the developers in person. I personally find that much better than chatting on irc all the time.

Specifically someone I talked with was Ted Mielczarek. Although we only talked for a bit and it was mainly about the Profile Build project, I could already tell he's a pretty cool guy and I can easily approach him if I ever run into any problems.

Setting Up Machine to Build FireFox

Trying to get the build environment has been very frustrating, especially on VISTA. I don't know if it's VISTA, or if it's the school's internet, but just trying to get the SDK to install has been really frustrating. Whenever it tries to locate the installation file off of their site, it failed to locate it and then the setup.exe just freeze and crashes. After many attempts to figure out what's wrong and re-trying the installation, I finally gave up and asked Dave to see if he could shed some light on this matter. After a quick talk with him and Ted, we then realize that it MIGHT be due to being on the school network that's preventing the download to work properly. Hopefully this is the cause of it. Now I just have to wait to get home and try it again.

Installation Success~! Note to self, if download fails at school, try again somewhere else. Now I can finally try building FireFox and look more into my project.

Tuesday, September 9, 2008

Ubiquity = AWESOME

I must say, I am very impressed with this extension on FireFox. It's like the perfect tool for lazy people like me. Surfing the net is literally at the tips of my fingers now. I know it might sound ridiculous to some of you, but....I've made commands to go directly to the OSD Weekly schedule page, the Planet blog page, my blog page, opening ChatZilla connected to moznet, and linking to printable version of any wiki page you're currently on. Ok....the last one sounds useful, but the rest sounds pretty lazy to you, right? But not to me. I'm lazy enough to not want to go through my bookmarks and clicking the link to those pages, instead, I'm just going to type a few letters and get to those pages.

Install Ubiquity: extension
Ubiquity Tutorial: Read

Here is the code for the commands I mentioned above:

CmdUtils.CreateCommand({
name: "irc",
author: {name: "Patrick Lam"},
icon: "https://addons.mozilla.org/en-US/firefox/images/addon_icon/16",
preview: "Starts ChatZilla 0.9.83 and connects to irc://moznet/",
execute: function() {
Utils.openUrlInBrowser( "irc://moznet/" );
}
})

CmdUtils.CreateCommand({
name: "blog",
author: {name: "Patrick Lam"},
takes: {"user": noun_arb_text},
icon: "http://pplam3.blogspot.com/favicon.ico",
preview: "Goes to Blogspot by default or to the specified user's blog",
execute: function( directObj ) {
var preText = "www";
if (directObj.text != "") {
preText = directObj.text;
}
Utils.openUrlInBrowser( "http://" + preText + ".blogspot.com" );
}
})

CmdUtils.CreateCommand({
name: "osd",
author: {name: "Patrick Lam"},
takes: {"blog": noun_arb_text},
preview: "Goes to OSD600 Weekly Schedule. By typing 'blog' after, it goes to the Planet's Blog",
execute: function( directObj ) {
if( directObj.text == "") {
Utils.openUrlInBrowser( "http://zenit.senecac.on.ca/wiki/index.php/DPS909_and_OSD600_Fall_2008_Weekly_Schedule" );
}
else {
Utils.openUrlInBrowser( "http://zenit.senecac.on.ca/~chris.tyler/planet/" );
}
}
})

CmdUtils.CreateCommand({
name: "print",
author: {name: "Patrick Lam"},
preview: "Takes the current wiki page and make it printable",
execute: function() {
var currentPath = CmdUtils.getDocumentInsecure().location.href;

var wikiHome = currentPath.substring(0, currentPath.lastIndexOf("/"));

/* Gets the title of the document in wiki */
var wikiTitle = currentPath.substring(currentPath.lastIndexOf("/") + 1);

/* Makes the printable version url */
var printURL = wikiHome + "?title=" + wikiTitle + "&printable=yes";

Utils.openUrlInBrowser( printURL );
}
})

Potential Projects

# 4.9 Modify Firefox to handle files downloaded to Temp more appropriately
# 4.16 Profile the build system (why are my Windows builds so slow?)
# 4.20 Add an Infobar style warning for window resize/move

It really is hard trying to pick only ONE project out of the list. So many of them seem so interesting. I wonder if it's possible to work on multiple projects...wonder how much work that's going to be too...

Project List

Festival Intro = Lecture?

Was it just me or did the video seem to be focused more on the festival more than about getting started with Open Source? The analogy used was pretty good, but too much time was spent on explaining what the festival is.

I was at a bit of a lost through... pretty much most parts of the video. The whole time, I've been thinking, "is this the right video? It should be, I see Dave...Maybe it's something I missed, I'm sure it'll get back to open source." Until eventually, I see the connection between the festival and the open source. Even then, the talk seemed more focused on the festival more than anything else.

The festival was a good analogy to use, I mean, you have lots of people in the community, you're being overwhelmed with the surrounding, and not knowing what's going on. But was it necessary to spend half the lecture time talking about the festival? I hope the lecture was more focused on open source, like the Revolution OS video or even our 1st lecture.

Nonetheless, I did endure it and watched the entire lecture including the QA section. And I must say I appreciate the time and effort Dave puts into the OSD classes, renewing the material every term. I wish all classes renew their materials every term too.

Getting started in Open Source projects, or "Learning to be at the festival" (on-line lecture) by David Humphrey (given at Mozilla24 in Stanford): mp4

Thursday, September 4, 2008

The Cathedral and the Bazaar

Cathedral style, Bazaar style, they both have their good and bad points. But back when Linux first started, the Bazaar style was a new concept in that period, something unheard of or unthinkable. Everyone thought it would end in a disaster. To everyone surprised, not only did Linux survived through this disastrous idea of the Bazaar model, Linux has become quite successful because of it.

I am actually a little surprised myself how successful the Bazaar model works. I mean, I can understand how much easier it is to find bugs and fix these bugs, but the thought of how all these thousands or millions of co-developers making fixes or changes on their own, can come together with such few problems, just seems like a miracle.

This is basically comparing a safe and sturdy way of programming against a fast and risky way of programming. It was a bit of a gamble for Linux to use the Bazaar style, but it paid off.

Revolution OS - History and growth, Free vs Open.

As much as I hated documentary videos, Revolution OS running at 1 hour and 25 minutes, wasn't as bad as I thought I would take it.

Before I watched this video, I hardly know anything about GNU/Linux. The history spoken by the founders and early contributers has given me a well understanding of how it all began. From an OS made for personal use, to being used by a small group of people, and finally to being used by over 12 million people. Just from knowing the history, it had made me realize again, how if you make something good, it can go big. I mean, look at Linux, in just a couple of years, the success of it has exploded.

The Free vs "Free" concept was a little mind boggling at first. I mean, if it's free, it's free, what more is there to it. I guess it was just a wrong choice of word to discribe it. When you hear "free", everyone would automatically think free as in 0$, that's just how we are, especially when you call it "Free Software". If they renamed it as "Open Source" sooner, I would think their success could have boomed a lot sooner.

As an end, I must applaud their "Free Software Song". I really didn't think they would have that coming. Along with the history, the definitions, the concepts, and some inside stories, this documentary was quite amusing and fun to watch.

If you watch and listen carefully enough, you might catch some of the jokes they try to make.

Tuesday, September 2, 2008

First Class

The first day of class was pretty interesting. We've gotten a general idea of what we're expected to do for the term and we're introduced to Mozilla and OpenOffice.

So far, this class has been at a faster pace than my other courses this term, and I must say, I'm rather glad it is.

The only thing that concerns me right now are the blogs. I'm not much of a writter myself, so, having to write two entries each week will require a little more brain power and creativity than usual.