Saturday, December 29, 2007

Armenian localization

As you may have noticed, in the beginning of the semester I said I was going to continue with the Armenian localization project but Dave suggested to turn into a three team project to try to create the English-Canadian version of Firefox. This actually ended up turning to be another project which was to create a script to create an l10n regionalised source tree from an l10n source tree.

Anyways, the problem was that I never continued the Armenian localization project and in all of this time I never heard of anybody trying to continue it.

You can check these links:
In all of this months working with the l10n community, I have seen a lot of good changes from the l10n drivers and from it I see myself making things easier for localizers rather than being a localizer myself, since, I am not good at reading and writing Armenian :(

It would great if this project continues with or without me, but I definitively I have interest in see it done.

Monday, December 24, 2007

What Open Souce means for me ...

Andrew Smith has written a good post in the opensource@seneca planet, which has made me rethink on some floating ideas in my mind ...

It is a privilege and a great opportunity that Seneca and Mozilla have met each other and is allowing some "rock star" students (like Andrew Smith and Ben Hearshum) to shine and others to be created. We get prepared before we enter the workforce and we are forced to work in projects which are in the leading edge.
Before we get graduated, we get in touch with incredible software developers from which we can learn their techniques and ways of developing. Most of this world's software developers do not have this opportunity and being prepared before graduating is a big asset. I have few friend's from when I went to University of Malaga (where I was studying Computer Engineering) who are jealous of this course that I have taken.

During this semester I have been studying everyone I have seen and have read the blogs of rhelmer, bhearshum, shaver, pike(Axel) and others..., and tried to learn the way each one of them work and what is their part on this big project.

I have also tried to learn how these people around the globe try to manage/drive/organize different sub-communities of the Mozilla communities. People like Axel and Mic Berman have to organize a HUGE variety of different communities from different countries (since they are part of the l10n drivers) and they even have time for people like me asking silly/innocent questions and knowing that in their part of the community there is so many people that just want to get only their localization out and that's it!

It has also pushed me to move from being an "only Windows developer" to "give me any other OS and I can still develop" developer.
It has also pushed to read, read and read even more (blogs, newsgroups, mailing lists, documentation, source code, etc...) and never give up against impediments!

--------------------
The first part of this post was a "thank you" letter but I would like to get back to the initial post of Andrew Smith.

The relationship of Mozilla and Seneca creates an environment of young developers to have sympathy to Mozilla because they opened their arms to helps us become more experienced developers and braver, and this is a good way of Mozilla to be able to find some gems and get some shelved project to get resumed ... For Seneca, it is a good way to be in the spot and students to earn experience before graduating and be exposed...

The problem to this environment is that it doesn't work without students who get enrolled in college. As Andrew mentioned the number of developers in the world for Open Source are not enough and the amount of Computer Science students enrollment has been continuously dropping year by year in North America and this could affect Mozilla@Seneca if it is not already affecting it.
This could lead to reducing requirements and accepting the developers that you find (this does not just affect Open Source Software Development only) rather than the developers that are prepared.

I believe that taking the Opens Source course does NOT automatically make you "prepared" but if you are lucky it can "awaken" you as a developer as I have seen in others that took the same course with me

Thanks for reading so far since I know that the flowing of my writing on English could be a little difficult ;)

These last days: Reformating, getting ready and Assembla

These days were set aside to reformat my laptop which has Vista on it and was corrupted, but what was to be just few hours become a couple of days, since I also decided to open room for Ubuntu in my laptop but in my playing around with my partitions, I have lost all my videos and music :(

I have also been getting ready for next semester by preparing all the IDEs and others that I am going to need: Eclipse IDE with Php and Svn, Visual Studio 2005 for Asp .Net and C#, set up Appserv as my web server package, Dreamweaver and others ...

I have also discovered an online tool (Assembla) which is for managing developers teams (you can also organize normal teams) and contains a wiki, trac, subversion, time tracking, scrum reports, chats and many others. I believe it is a good tool and I have already set up 3 different accounts (academics, professional and non-for profit organizations).
If you have to organize a team bigger than one member I would suggest you to give it a try (btw it is free as in "free" beer!). It is also a way of finding jobs and showing that you are serious about managing teams.

Friday, December 07, 2007

0.3.3 l10nFork final release

As Rueen and Vince have announced, they completed most of the TODOs that we had in mind for the 0.3 release and thanks to Ben's and Ted's help, I have completed the rest of the TODOs for the 0.3 but ONE (read from a file changes to be applied to an l10n tree), which right now is hard-coded :(

Anyways, I want to say that the project is ready to be evaluated since the BUG has the latest release and the WIKI page has the latest information.

The project will still continue to change since the script can grow much more but for now there will be no more updates until exam's week is done.

I would like to conclude with two last thoughts:
  1. Now that I have spent another full day with python, I can see that the learning curve is a little long but I have started to understand it and it is the best scripting languages that I have found so far (I also have to say that I have only dealt with Perl and PHP). It is really powerful, fully object-oriented and a really complete library!
  2. I believe that the Open Source courses that Seneca offers produces a new kind of open source developers; Ben is a graduated of Seneca and took this course last year, his support has been amazing and every single line he wrote about our script was something that I will fully understand and induce me to research on the right line. Others even though they tried to help (and they did help most of the time), they forget my newness in open source and my lack of knowledge of the language. PLEASE: don't misunderstand me, every single person in the IRC channel has always helped me and a lot (a lot, a lot, a lot...)- I refer to comments on Bugzilla that passed over my head and I can understand that people might not have time to be "educational" or "guide me" on their comments

Monday, December 03, 2007

BTS presentation and open source evangelism

I will probably forget to post this if I keep on delaying it, but it is better now than having to wait for a screen cast accompanying it.

- Who among the Seneca BSD (and CPA) students have not said "I hate Rose!!"?

We have to use the 2001 version of Rose (before it was bought by IBM) and with no expectations of getting the latest version, we struggle so much for several semesters while using it.

We don't know how to use it since it has a lot of usability problems and we are not being taught how to use it properly. After using the software for 3 semesters, I have met fellow students that are in my semester who still pass the rose model to each other sequentially since they do not know how to make the import/export ability to work.

In my team, I was the "merger". I would have to merge everybody's work and after a few semesters I kind of learned how to do it, therefore, I decided to give back to the community, by teaching the 2nd year students (including my friend Zad) what I learned by myself over several semesters of "trial and error".

The benefit of that was that I got rid of a feeling that I was keeping the knowledge for myself if I didn't share it and it felt good to get students saying to me "Thanks, now I know why we are using Rational Rose"

Once, I fed them with a good Rose meal, I decided to give them some open source dessert...
I told them about how far I got by taking the Open Source course and how much I dare to try things that I was always reluctant to try because I was afraid of trying new things. I also told them that it was a really good learning experience if you want to see how far can you push the bar. I warned them that it wasn't for everyone since it is really demanding and requires you to stretch yourself in ways that you have never done before.

This presentation has allowed me to receive appreciation from my classmates and has allowed me to practice my desire to teach in the future, which I think can be a really noble profession if done the proper way.

l10nFork0.3.1 release and concerns

I have posted the attachment in Bugzilla (Bug403215 comment 7) and I have added this comment:
This attachment is supposed to do multiple regular expressions changes to the
DTD and the properties files of an l10n source tree

I think it will be amazing if it could create a parallel l10n tree with the
changes applied to the new regional. We want to get rid of creating .bak files

Inside the file, you can find "todo.txt", "changes.txt", "instructions.txt" and
"release.txt" with plenty of information.
And this is the help I am looking for or what I want to get done by the end of this week:
Please if someone could just give me an idea of how would they:
1) create a parallel l10n tree - (I am thinking of copying from SOURCE to
DESTINATION and then apply changes)
2) read the changes from changes.txt which contains multiple changes and
recreate the regular expressions - (I am thinking of an array with COMPILED
regular expressions and then iterate through them)
I have also asked for help to Ben Hearsum (the master in python ;) and said that he will have a look at it

Monday, November 26, 2007

Session 18 - Adding chrome to FirstXpcom extension

The lab I am doing is "Adding Chrome to FirstXpcom Lab" and it goes like this:
  • cd ~/.mozilla/firefox
  • cat profiles.ini //to find the name of your profile
  • cd 0sce3rh9.development/extensions
  • echo /home/armen/sandbox/firstxpcomchrome > firstxpcomchrome@senecac.on.ca
Once done this, you can run your minefield and you will see under Tools in red "Your localized item here" and you will see your extension in the add-on manager.
Myself, the first time didn't work and I decided to fix it. I went to the install.rdf and I saw that the line was wrong:
  • firstxpcom@senecac.on.ca First XPCOM chrome 0.1 Armen {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 2.0.0.* 3.*
Obviously, it seems that I didn't fill properly the wizard since it should say this: firstxpcomchrome@senecac.on.ca
  • Replaced the code in firstxpcomchrome/content/overlay.js with what appears on the lab
I try to make it work, to just test it but I know there are pieces missing:
Chrome file doesn't exist: /home/armen/sandbox/firstxpcomchrome/content/firstxpcomdialog.xul


  • Therefore, let us create the file : firstxpcomchrome/content/firstxpcomdialog.xul with the XUL instructions about the dialog and with JavaScript instructions

At this point, it should work but I couldn't find out what the final results were to be until I noticed a little pop up window on the right hand corner (look at the huge red arrow)

So this lab is done and all that is left is to work on the 0.3 release, the zip file is here

Sunday, November 25, 2007

0.3 roadmap - 2 weeks until the end

I want to highlight that we have some fixes that we want to do our script for the 0.3 release that we have in two weeks. I have updated the info on the wiki page related to our project.
  1. Fix the key changing problem (the regular expressions has to be more strict)
  2. Add more words to change in an l10n tree
  3. Stop using .bak files (and make the changes permanent)
  4. Generate a second l10n tree out of original with the changes
I think we can do it, but if the wind blows in our favor...

Saturday, November 17, 2007

Session 17 - Creating extension (open new tab after current tab)

This lab I am doing helps you learn how to do your first extension for Firefox.
This extension is based in a patch that makes new tabs to open after the current tab, instead of opening as the last tab.
"
this time we will overlay our changes onto the browser at runtime, and alleviate the need for any direct changes to the code. This is possible using extensions." (Dave Humphrey)

  • create this folder structure:
    • intall.rdf
    • chrome.manifest
    • chrome/
      • chrome
        • addtabeside.js
        • overlay.xul
  • Zip the content and rename the file to addtabbeside.xpi
  • Drag and drop the .xpi file into the browser or the add ons manager and install it


Please if you want to create more extensions you can read some reflections that Dave wrote about it (it mentions online wizards ) and/or use Open Komodo which has a "Mozilla extension" project template you can use.

Session 16 - XPCOM lab - retry

I am on Linux an using Gedit to create the files for the XPCOM lab:

NOTE: Substitute $(objdir) for the path to your build directory

  • mozila/extensions/firstxpcom/public/IFirstXpcom.idl
  • Generate uuid through firebot for the .idl file -> 9de38b2d-6d9e-4350-bc8a-b5330de0accf
  • mozilla/extensions/firstxpcom/Makefile.in
  • mozilla/extensions/firstxpcom/public/Makefile.in
  • mozilla/extensions/firstxpcom/src/Makefile.in
  • mozilla/extensions/firstxpcom/install.rdf
  • Add ac_add_options --enable-extensions=default,firstxpcom to .mozconfig
  • $ cd $(objdir)
    $ ../build/autoconf/make-makefile extensions/firstxpcom //to do an incremental build and create the objects in the objdir
  • $ cd $(objdir)/extensions/firstxpcom
    $ make
  • This will create the public and src directories on the obj-dir, as well as generate the Makefiles necessary in each
  • $ cd $(objdir)/extensions/firstxpcom/public
    $ make

  • As a result of this first (partially) successful run of make, exported and generated header files (i.e.,from our IDL) will be placed in $(objdir)/dist/include/firstxpcom
  • Within $(objdir)/dist/include/firstxpcom/IFirstXpcom.h you'll see the following block of code:
    #if 0
    /* Use the code below as a template for the implementation class for this interface. */
    ...
    /* End of implementation class template. */
    #endif
  • Copy and paste this implementation stub into the following file: mozilla/extensions/firstxpcom/src/FirstXpcom.cpp
  • We also have to add the Module Code (read more ) at the bottom of the CPP file and #include "nsIGenericFactory.h" and in that code we will use these macros:
    • NS_GENERIC_FACTORY_CONSTRUCTOR(FirstXpcom)
    • NS_IMPL_NSGETMODULE(FirstXpcomModule, components)
  • $ cd $(objdir)/extensions/firstxpcom
    $ make
  • I had to change this statment for the next one:
    mName.Assign(L"FirstXpcom Component");
    mName.AssignLiteral("FirstXpcom Component");
    because I was getting this errors:
    ../../../../extensions/firstxpcom/src/FirstXpcom.cpp: In constructor ‘FirstXpcom::FirstXpcom()’:
    ../../../../extensions/firstxpcom/src/FirstXpcom.cpp:28: error: no matching function for call to ‘nsString_external::Assign(const wchar_t [21])’
    ../../../dist/include/xpcom/nsStringAPI.h:124: note: candidates are: void nsAString::Assign(const nsAString&)
    ../../../dist/include/xpcom/nsStringAPI.h:128: note: void nsAString::Assign(const PRUnichar*, PRUint32)
    ../../../dist/include/xpcom/nsStringAPI.h:132: note: void nsAString::Assign(PRUnichar)
    make[2]: *** [FirstXpcom.o] Error 1
  • Assuming this works without errors, here's what has happened:

    * Generated makefiles for your project were created in extensions/firstxpcom/ (remember, we're under /mozilla/$(MOZ_OBJDIR)/.
    * Exported header files and generated header files (from IDL) in dist/include/firstxpcom/
    * Static libraries for your modules in dist/lib/ (in case other modules want to link statically instead of using XPCOM).
    * XPI file in dist/xpi-stage/firstxpcom.xpi.
    * Everything else in dist/bin/extensions/firstxpcom@senecac.on.ca
  • I try to run the Firefox and see if it gets loaded and visible in the Addon Manager but I get this message:
    "Malformed File: Minefield could not install this item because "insall.rdf" (provided by the item) is not well-formed or does not exist. Please contact the author about this problem"
  • Ben Hearsum told me to try this: XML.com: RUWF? The XML syntax checker
    and the message I got was this:
    xml declaration not at start of external entity at line 1, column 1, byte 1:
    1.0" encoding="UTF-8"?>
    ^
  • I have been able to make, it seems to load BUT I can't see "FirstXpcom" as one of the extensions or add-ons
  • Anyway, let's continue and let's install the Extension Developer's Extension but it does not work on FF3, I have read in Rueen's blog post this:
    Problem: Can’t get the Extension Developer’s Extension to install on Firefox 3 due to extension security reasons.

    Answer: Install it in Firefox 2. Open Firefox 3. Type: about:config in the URL bar above. Right click on any Row and choose “new” then “boolean”. Now for name type: “extensions.checkUpdateSecurity” then click Ok. For value type: “false” and click Ok. Finally go to extension’s page and try to install it again. (Thanks Cesar)
  • You can skip to add to FF2, just add extensions.checkUpdateSecurity as false

  • After trying the rest of the lab I saw that I had to get the firstxpcom to be in the addons manager
  • After a while I realized that inside $(objdir)/dist/bin/extensions I had two folders I recognized "firstxpcom@senecac.on.ca" and "azambran@learn.senecac.on.ca", hehe, I know I have done something wrong
  • I went to the install.rdf and changed my email address to "firstxpcom@senecac.on.ca" since on the cpp I registered the component with "@senecac.on.ca/firstxpcom;1"
  • I delete both folders in the $(objdir)/dist/bin/extensions and $(objdir)/extensions/firstxpcom
  • $ cd $(objdir)
    $ ../build/autoconf/make-makefile extensions/firstxpcom
  • $ cd $(objdir)/extensions/firstxpcom
    $ make
  • run minefield and there we go! the firstpcom shows as one of the addons


  • Let's test the Java Script shell, Tools > Extension Developer > Javascript Shell
    • const cid = "@senecac.on.ca/firstxpcom;1"
      var obj = Components.classes[cid].createInstance()
      obj = obj.QueryInterface(Components.interfaces.IFirstXpcom) //We are QI it to IFirstXpcom...
      var sum
      sum = obj.add(4,5)
      obj.name = name
      print(obj.name)
      alert(obj.name)
Awesome, my first XPCOM component!!!

Friday, November 16, 2007

Python script - Automatic l10n string replacer - 0.2.3 release update

Our script now has been released in our wiki page, with some instructions and screenshots by Rueen.

In the other hand, we are trying to get more help on the bug on how to add make more regular expressions substitutions to a tree rather than just one change.

My personal feeling of this project is that I still don't see how this script would be used in the end but maybe someone will end up stepping in and bring some insightful ideas.

Another issue is that it should not be called TOOL, it is a scrip that would be run where an l10n source tree is and once run it would generate another l10n source tree with the changes made.

I hope this script could go really far, since it could be really useful once people would understand it.

Thursday, November 15, 2007

Session 15 - Building on Linux another nightmare

BREAKING NEWS (this has happen after this post):
----------------------------------------------------
This is what I tried to run minefield:

  • firefox -P development -no-remote //does not work
  • /home/armen/sandbox/mozilla/obj-i686-pc-linux-gnu/dist/bin/firefox -P development -no-remote //it did work
  • ./firefox -P development -no-remote //which works
Thanks Andrew

BEGINNING OF POST:
-------------------------

I have installed Virtual Box and I am running Ubuntu 7.something (Gutsy), which I got from the Freedom Toaster at Seneca. I also added the Guest Additions to have better video resolution and others.

This means that now I can build on my laptop but I gotta say that in Linux I am having more problems to build than on Windows. In Windows everything seems to be more straight forward.


I tried to check-out and I got this error message:

  • armen@armen-linux:/tmp/sandbox$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
    The program 'cvs' can be found in the following packages:
    * cvsnt
    * cvs
    Try: sudo apt-get install
    bash: cvs: command not found

Therefore I tried the suggestion:
  • sudo apt-get install cvs


Now, I have CVS installed, let's check-out:
I am trying to build and it seems that the are more problems:
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
I have tried this, since I tried to use "package" to get a package manager or something:
  • sudo apt-get install mailagent //I don't think this was necessary
The gcc version is:
  • gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

I am checking the build requirements on developers.m.o:
  • It seems that pkg-config --version is 0.22, rather than 0.9 //doesn't apply, it must be a typo or something

I just found that the whole problem is that I need the package build-essential that depends in few others and Ubuntu would always ask me for a CD. This is the way around thanks to Ben Hearsum :D

I had to comment the line:
# deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386
(20071016)]/ gutsy main restricted
in the file: /etc/apt/sources.
list
REMEMBER to use SUDO(root privileges) when modifying the file and when running the update:
  • sudo apt-get update
  • sudo apt-get install build-essential

At this point, I am at home, keep on trying and now on #developers Joshua and fantasai
It seems that now these packages are missing:
  • checking gtk+-2.0 >= 1.8.0 gdk-x11-2.0 glib-2.0 gobject-2.0... Not found, bla, bla
A guy in developer told me to get this:
  • sudo apt-get install libgtk2.0-dev //but it wasn't enough
  • sudo apt-get build-dep firefox
Now, I get this:
  • checking for libcurl... no
  • sudo apt-get install libcurl3-dev
Finally it seems that is working!

Mullin says to use this next time: sudo apt-cache search
libcurl

I was able to do all of this because there were some people on IRC who knew this, not because I was able to read it from developers website!

-------------------------------


I also tried to do the lab for Thursday but I had some errors on copy and pasting and when it seemes that everything actually got made, Minefield crashed saying that I had a problem with an rdf or a manifest, I can't recall.

I have downloaded the source code again and built again, but now I have a new problem, IT ALWAYS OPEN FF2 EVEN IF I CREATE A NEW PROFILE!!!!


This wouldn't be my blog if I would be able to do something at the first try :(

Thursday, November 08, 2007

Quick 0.2 release news

I would like to highlight the latest news out of the almost 2 week silence without going to a lot of details and more will come over the next few days and from Rueen and Vince, stay tuned!
  • During the FSOSS, we met with Michal Berman and gave us a taste of what the l10n part of the community looks like and she helped us to set in Google Groups a discussion about l10n tools, which Axel (the l10n owner) explained with a lot of details
  • Dynamys has appeared and posted his script in the bug -- quite complex!
  • We are engaged in an email with Seth Bindernagel
  • We have set a list of things that gotta be done and splitted among the three of us. Over these weekend, we would like to have good stuff done
I will be more detailed on what we want for the 0.2.3 release in a later post

Wednesday, November 07, 2007

SESSION 14 - Patch for Thunderbird

Today, in class I decided to use Linux rather than Windows (since Dave insisted that was faster) and I didn't feel so uncomfortable as I thought but it seems that in the lab that the computers shut off around 6pm, therefore I lost my patch and everything.

Trying this lab: Thunderbird_Bug_Fix_Lab


Anyway, I am back here on Windows and I am checking out the source code for Thunderbird (I already have Firefox's source code in this machine).

  • make -f client.mk checkout MOZ_CO_PROJECT=mail
  • cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/mail/config/mozconfig

I will probably change the .mozconfig just for this build
. $topsrcdir/mail/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/tbird-debug
mk_add_options MOZ_CO_PROJECT=mail,calendar
ac_add_options --disable-optimize
ac_add_options --enable-debug
In class, though the time I spent discussing with the rest of class mates, I realized that I was going to fancy about how to fix the bug. I am going to try this change in this file: http://mxr.mozilla.org/mozilla/source/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp Let's move to mozilla/tbird-debug/netwerk/streamconv/converters and do a "make"
Let's run it:
  • /c/ff/mozilla/tbird/dist/bin/thunderbird.exe

My changes weren't been reflected so I try attaching VS2005 to it and it directly told me that the source file I was editing wasn't the one being executed!! I think that is amazing!

I had to build 2 folders above. Here are the links with the 2 different make's I tried:

To make the patch, from the "mozilla" folder:
  • cvs diff -u8p . > patch_td.txt

To apply the patch add it to you "mozilla" source folder and apply it like this:
  • patch -p0 < patch_td.txt

My own bug in landfill: http://landfill.bugzilla.org/bugzilla-3.0-branch/show_bug.cgi?id=6008
My own patch:
http://matrix.senecac.on.ca/~azambran/mozilla/patches/patch_td.txt
(I need somebody to review it)

Once I have attached the patch to the bug, I read this: http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree and I have realized that I could have set a flag when doing the attachement but now I will have to cselect the "Details" of the attachment and then set the "review" flag to '?' and add the email of two class members separated by a comma, who are "reviewers"

Now it shows in the attachment a column that says this:

azambran: review? (masmullin)
azambran: review? (awdelyea)


That's it for today!

Tuesday, November 06, 2007

Heroes sudden realization

Do not read this if you haven't watched every episode until now.

After watching yesterday's episode I think that Adam has been waiting for centuries to reach Hiro's time and destroy Hiro's reality.
Adam was most likely behind The Company to make them destroy New York with Hiro in it but the idea failed.
  • What was the reason of destroying New York? How could he had assumed that Hiro would be in New York? He obviously knew the father was in New York
Now the top management of The Company are being murdered one by one since two weeks ago Adam got released, in which, we have the father of Hiro who felt from a building with the person who pushed him but obviously Adam hit the ground with him but he did not die.
  • Who released Adam? When was he captured? Maybe in the time between the bomb explosion and his appearance? Who had the power to capture him? Somebody must have a more cruel reason to have released him
The Top Management seems that have been confused and have been thinking of the rest as their killers, e.g. Patman thinking that the little girl was used to catch him, Patman making the mother of Peter nuts (remember her scratching herself), Bob thinking of Patman to come after him, etc

Other questions:
  • Who, how and why were Peter and Sylar rescued?
  • Peter was in the Company's hand, did he had his memory there?
  • Why Adam has contacted Peter? He is going to use him, what for?

Monday, November 05, 2007

Reviewing patches - outsiders trying to "give back"

I have been reading today's readings (week 9)
and I have read of what I already had the feeling that was going on.
To be able to make changes to an Open Source project, it takes a really long time and a lot of proper communication.
In these two posts, one of them talks about what to have in mind to get people to review your patches and the other post talks about how long it took that person to get reviewed his patch for Thunderbird, that all it did was to add "Add to BCC" button but it took much longer that expected.

Once Dave talked about somebody who wrote a book talking about a world in which people would not use money but something like "credit" (I can't recall the proper word), which was how much credit you have earned by helping others, but the problem in here for Mozilla what is the right way to measure contributing to the community? What does stop someone to contirbute easily?

We know that there are celebrities inside the community that have helped a lot and they have the possibility to commit changes to the tree.
We also have in the community collaborators that might not have committing privileges but they still know who to go to, to get their patches reviewed and they get it done because they know how to promote it.

I can speak about my own experience; I do not know who is who in the localization part of the Mozilla community and how they work and who is working on what.
The person who helped us the most was Axel (the module owner) and he probably has way too much to worry than having to deal with a minor project like ours.
If you look at "Bug 399014 – we need an l10n-merge tool", it took 17 days to receive any feedback and then it seemed that we posted on the wrong bug :(

There is another reference I want to make to one of the FSOSS lectures (usability lecture by Jay Goldman and David Crow) and they were suggesting that the best bugs to fix are the ones that have more value for your customers/users. I believe that not having the "Add to BCC" button was not worrying about what it is important for the users rather than knowing that their application runs a little bit faster (in some situations) because there have been some performance bugs fixed or that they have spent more time adding new features that most of the users won't appreciate except those that are developers, because most of the bugs fixed are the ones that insiders or developers want to be fixed rather than regular users.

Please feel free to add your comment in favor or opposing to see the bigger picture

Friday, November 02, 2007

FSOSS (Free Software and Open Source Symposium) paper

NOTE: You can also read this in the Mozilla@Seneca wiki

Introduction

During the study week of every Seneca student, I attended to the FSOSS 2007 celebrated at Seneca which allowed members from the Open Source community to gather and listen to different speeches and workshops. I attended few speeches which I want to share my findings

Jay Goldman and David Crow talk about usability

Jay and David gave one of the most easy to listen to and interactive of speeches(video) that I have attended and their main focus was to let us know about what steps to follow for a better user experience. Both of them are concerned about the usability of software and their career paths have always involved bringing people and technology together, which also implies to bring developers and people together.

Their speech was divided into 12 steps that started bringing awareness of our unpreparedness to satisfy completely our user experiences by ourselves. This is due that most of us in the lecture hall were only developers (whit few exceptions) and it is totally understandable that we lack designers’ skills. Developing software does not just mean to write code, have few bugs and a nice user interface; it requires much more than just that, it requires a well organize structure on how to present the content and how to make it work smoothly for the final user.

A beautiful user interface for the developer’s eyes does not mean that it is the most intuitive for a user, in fact, it doesn’t even mean that it is the best way to get the task done. You have to understand your final users, you have to research the way they work with your software and allow them to give you feedback.

Another thing to have in mind when developing is that for different projects, we have different which they have different priorities. Having different priorities means to weight things with a different balance and what for one user is usable for another might not be. For each different project, there will be different constraints, different expectations, different likes, which the user you catch in your design the better.

How important a good design can be? Apple is a company greatly focused on design and that has allowed them to become a trend, for the robustness of their products, marketing, an important investment in a beautiful style and look of their products and an incredible easiness to use.

To complement a good design you have to find the shortcomings of your software. How can we do this? You can tackle existing bugs, get review by your user, reviews by experts, etc... All of these options are good, but getting the feedback from the users is the most important; why? Because the cheapest bugs to fix with more value for your users are the ones that can benefit you the most since you get happy users.

We were also taught how to transmit complex ideas to others by simple drawings (stick figures). Jay showed us that all of us can demonstrate concepts to other people with this technique because they can capture complex ideas with simple ideas.

Get involved the users in your software development because as Jay was letting us know, they want to give you feedback on how miserable you made their lives with your software... jokes aside, it is really important to let them let you know what they like and dislike from your software. The feedback they might give you might not always be so useful but if you let this happen you might find passionate users of your software who can give you good feedback and the more you let them get involved in the process the more passionate they became. Feeling engaged with the process makes them feel more responsible of the outcomes of your project.

A really good example on how feedback from users has improved the usability of a program is Microsoft Office 2007. Since Office 2003, four years had passed by and sixty thousand unique cases reported by users has shown amazing results and a revolutionary user interface. The problem of the user interface in previous editions was that the more functionality Microsoft wanted to add to Office the more the toolbars would grow, therefore, elements has to be hidden to fix more in the toolbar area. After studying users usage of the program for long time, they discovered to bring a context sensitive user interface using what they call “ribbon”, which shows options accordingly to the work being done. The last note to add to this is that 5 out of 10 top requested features for Office by the users, they already existed in previous versions of it. This showed that using the toolbar concept was limiting users from using features that they looked for but could not find.

A good thing to the whole community of developers and designers would be to make sure that we all understand the common patterns when designing interfaces, because there are tons of design patterns which compose part of designing interfaces. A recommended book by them is “Designing Interfaces: Patterns for Effective Interaction Design” by Jenifer Tidwell, which collects these commons interfaces to all of us and gives examples or suggested solutions, and mentioned the Yahoo! User interface library.

There are few more concepts that were spoken like do not get tired of your users, do not burn the bridges that connect them with you because they will end up going away and use competitor’s products and do not stop trying to improve the usability of your product (this process is called "iterative practitioner").

One of the best ways to get good feedback is to use low fidelity designs of your product because users will be more likely to critic it and not a high fidelity one because with a high fidelity one they feel like inappropriate to put somebody’s work down since it might have required a lot of time to make it. Another consideration about getting direct feedback is to make sure that testers do not feel that they are being tested on how good they can give feedback from the product evaluated.

The end of this presentation ends with raising the importance of giving back to the community the design knowledge that we might gain to help others and to let developers know about it. They mentioned Open Usability, contribute back to the Yahoo user interface library, use Tango icons and promote it.

From this lecture, we can extract that their main reason was to make us aware of the big importance that having a good user experience for our users is and how we can gain a great feedback from our users and they also promoted to give back knowledge to the community which is a big important point of the open source principles.

Shane Caraveo from Active State talks about Open Komodo

Shane came from British Columbia to let us know(video) about Active State and Open Komodo. Active State has existed since back in the late nineties and they were know as “the Perl Company” and it evolved to release their Komodo IDE that helps to develop with dynamic languages like Perl, Php, Python, Tcl and many others

Komodo is build on top the main Mozilla code and also takes advantage of the editing abilities that Scintilla brings to the editor. Komodo as we can see is based on open technologies and works with open technologies as well.

Recently a big part (around 90% or more) of Komodo Edit’s source code has been announced to be released as Open Komodo, which will be the supporting platform for Komodo Snap Dragon, before this, Komodo Edit could be used free as “free in beer” but now it is also going to be free as in “free of speech”. From it, a lot of things can be build on top of it, for instance, custom made IDEs. There is a part of the Mozilla Community that would like to have a Mozilla IDE to be able to develop XUL Runner applications, debug their applications and do everything that could help the Mozilla community of developers.

Komodo Snapdragon is an idea, a dream, which is based on top of Open Komodo and will integrate with Firefox, Mozilla and extensions like Firebug. Open Komodo is about the community, the code base, the platform and their desire is to see people gathering around it to build an open web based on open technologies.

Why choose to promote Open Web and Open Standards?

  • CHOICE – It brings the possibility to choose different technologies following standards that allows every technology work in different platforms and allow different technologies to work integrated.
  • FREEDOM – You are free to do and use the tools in different ways and twist them to allow you do the work you want to work on
  • STANDARDS – As mentioned before, they allows a common way to develop and allow a better understanding between platforms
  • INTEROPERABILITY – Code written should be able to work in another platform regardless of the IDE or the platform in which was originally developed

What Active State wants is not just to build commercial software but make a positive impact, make things that people like to use, allow development for the Open Web and the dynamic languages, but since they are going Open Source, this is not limited to the dynamic languages alone. It is up to the community on where they want to take it.

What Active State is offering is most of the source code that they have been working on to allow the community to say where to go after today and allow them to increase their market by having more people knowing about them

Comparisons

From both speeches you can hear two main principles of Open Source. The first one, highlights that giving back to a community knowledge leads to a greater awareness and further increase of knowledge and foster to contribute back more and more. From Shane, we can see an Open Source based tool going Open Source themselves and try to gather a community around them since they firmly believe that they are not the only ones who can give good ideas for their product and will allow the community to say what they have to say about Open Web and how they want to develop by contributing back to Open Komodo or twisting their code to use it in the ways they might need.

Personal View of Open Source

This first time attendance to the FSOSS has been a onetime experience in which without any doubts has expanded my picture of what software development is, what commercial software is and what things are involved with Open Source.

Firstly, I was extremely confused because everyone would be using words as: open source, open community, open commercial, open standards, open web, open technologies... which they all have the word “open” as a common denominator.

A lot of doubts came to what my understanding was of “openness”, let me explain myself. They are websites that are “open”, you can access to them without restrictions. There is content on the web which is “open” to anyone to see it, BUT not everything is “open” to be used in whichever manners you want (read, write, reuse, modify, etc...) There is software that gives you the possibility to use it (demo, trial, shareware – I know it is not good to put them in the same bag) but with a lot of restrictions. I have also seen companies that allow user to create open source projects in their servers that are completely non open source based, like Microsoft with codeplex.com, and in the other hand Source Forge with everything based in open source technologies and they both try to sell their "closed" solutions to enterprises. There is software that is “closed” but it is based on “open technologies” and there is software which you are free to use, free to modify and you are even free to contribute back! I also found out about the Open Source initiative that holds the licenses that follow the Open Source principles

After all this confusion, I realized that there are a lot of advantages to use open source, it is a great way to be in touch with people developing in our era with the latest technologies and it is needed for a better ecosystem in our economies and in our beloved freedom of speech culture

MozPad and WebRunner been renamed to Prism

I was writing my DPS909 assignment and I found these two links:
  • MozPad, which stands for "Mozilla Plattform Aplication Developers" and promotes to build on top the Mozilla base code and shows others who are doing this already, e.g. Songbird, Joost, ActiveState and many others
  • "Mozilla’s Prism Project Blends Web and Desktop" is an article that talks how Web Runner has been renamed to be called the "Prism Project", with Prism you can strip web pages and run them as desktop application if I am not mistaken. To read more about it you can check Mark Finkle's weblog

Saturday, October 20, 2007

Session 13 - the new tab lab

Now, I work at my brother's Windows XP computer and everything works fine!!

I'm trying the Dave's new tab solution,(the solution is not updated but it is illustrative), I had few looks here and there since I already tried this lab last week, I knew what to do but after this humongous number of hours in front of the computer doing Mozilla development labs, I am feeling pretty tired (I started at 11am and is 11pm)


Let's get started:

  • open the file: /c/ff/mozilla/browser/base/content/tabbrowser.xml
  • I've commented the following line and I added the rest:
    //this.mTabContainer.appendChild(t);
    // Insert tab after current tab, not at end.
    var currentTabIndex = this.mTabContainer.selectedIndex;
    this.mTabContainer.insertBefore(t, this.mTabContainer.childNodes.item(currentTabIndex + 1));
    //pay attention it is a whole tab (the next after the current one) what it gets added as the second parameter
  • I've also modified this:
    // wire up a progress listener for the new browser object.
    // var position = this.mTabContainer.childNodes.length-1;
    // the tab has been added beside the currentTab rather than the end
    var position = currentTabIndex + 1;
    var tabListener = this.mTabProgressListener(t, b, blank);
  • I did a make in the objdir parallel folder: (I chose one folder above)
    $> make /c/ff/ff-debug-/browser/base
  • Then I run minefield:
    $> /c/ff/ff-debug-/dist/bin/firefox.exe -no-remote -P development
  • and it works (well, the deletion of the tabs is kind of screwed up but no energy to think why)

Create the patch - here's the patch
  • I did it from browser/base/content - Dave's going to kick my butt
    cvs diff -u8p . > tabPatch.txt
  • Save the file into the mozilla source folder and type this:
    patch browser/base/content/tabbrowser.xml <>
  • The patch will get applied and that's it!!!

Session 8 -Modifying the Browser Lab

I'm trying to do this lab: http://zenit.senecac.on.ca/wiki/index.php/Modifying_the_Browser_Lab
but I don't have the build on the computer and trying to get through DVD or my iPod says that will take 50 minutes!!!!
I will try to use my laptop, which has the source code BUT I had so many problems trying to build on VISTA (let's try again)
  • On this file: http://mxr.mozilla.org/mozilla/source/browser/base/content/tabbrowser.xml
  • t is a XUL:tab (http://developer.mozilla.org/en/docs/XUL:tab)
    1091 var t = document.createElementNS(
    1092 ",="">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
    1093 "tab");
    1111 this.mTabContainer.appendChild(t);
  • mTabContainer is a:
     159       
    160 document.getAnonymousElementByAttribute(this, "anonid", "tabcontainer");
    161
  • Instead of appending to the end, I want to place it just beside the current tab
  • There are few ideas I have:
    • In http://developer.mozilla.org/en/docs/XUL:tabs,
      I have found selectedIndex and insertItemAt
    • this.mTabContainer.insertItemAt(this.mTabContainer.selectedIndex+1, t);


I never finished this lab, continue reading session 13

Session 10 - Download manager - incremental patch

I took some notes in class of the incremental build that Chris and Dave had and I decided to do it since I couldn't make it work the lab of modifying the behaviour of the "new tab"

  • I modified /c/ff/mozilla/toolkit/components/download/nsDownloadManager.cpp
  • Added these lines:
    nsDownloadManager::InitDB(PRBool *aDoImport)
    {
    #ifdef DEBUG_ARMEN
    printf("\n\n\n\n*************\N\NStarting Init in nsDownloadManager\n\n*****\n\n\n\n");
    #endif
  • cd /c/ff3/obj-i686-pc-mingw32/toolkit/components/download
  • export DEBUG_ARMEN
  • make

  • After a lot of work, I got tired and I got rid of #ifdef DEBUG_ARMEN
    First, my brother's account was called "Zambrano brothers", therfore, I created an account "Armen"
  • On the Mingw32 I appear as: Armen@DAVID, when before it was Zambrano brothers@DAVID
  • but #ifdef did not work either, I tried DEBUG_ARMEN and DEBUG_Armen

  • Anyways, now the changes are reflected without the #ifdef statement

Session 12 - Incremental build lab + Shaver's patch


Proffesor Humphrey's lab - Incremental Build Lab
  • cd netwerk/protocol/http/src/
  • Added these lines to nsHttp.cpp
HttpHeapAtom *
NewHeapAtom(const char *value) {
/* DEBUG_ is defined at build time, and Faculty is the username in the lab */
#ifdef DEBUG_Faculty
printf("Hello World!\n");
#endif
  • cd /c/ff/ff-debug-/netwerk/protocol/http/src/
  • make
  • cd /c/ff/mozilla/ //it's better to get your patch from the MOZILLA folder
  • time cvs diff -u8p . > patch.txt // this way people don't have to wonder where you made the changes - 2 minutes wait
  • You can find my patch here

To apply the patch, put it in your c:\ff\mozilla folder and type this:
  • patch -p0 <>
  • Because I alread had the changes, it will reply to me saying:
patching file `netwerk/protocol/http/src/nsHttp.cpp'
Reversed (or previously applied) patch detected! Assume -R? [n]

I typed "y" to revert the changes
  • After reverting if I type it again:
patching file `netwerk/protocol/http/src/nsHttp.cpp'

I also applied Shaver's patch!!!!
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|? threads/.gdb_history
|Index: threads/nsThread.cpp
|===================================================================
|RCS file: /cvsroot/mozilla/xpcom/threads/nsThread.cpp,v
|retrieving revision 1.70
|diff -u -p -5 -r1.70 nsThread.cpp
|--- threads/nsThread.cpp 11 Jul 2007 03:01:56 -0000 1.70
|+++ threads/nsThread.cpp 25 Aug 2007 15:53:36 -0000
--------------------------
File to patch:
  • It seems that I'm not in the right folder (Shaver didn't follow the suggestion of Dave's lab!!; After all, the suggestion is for learners), after thinking a little bit:
    cd xpcom/threads/
    patch -p0 --dry-run < ../../latency-tracing-patch.txt
  • But I got the same error, I move once up
    cd ..
    patch -p0 --dry-run < ../latency-tracing-patch.txt
  • It worked!!! Now without faking the patch, making and running
    patch -p0 < ../latency-tracing-patch.txt
    cd ../../ff-debug-/xpcom
    make
    ../dist/bin/firefox.exe -no-remote -ProfileManager
  • Dave said about: "Run your browser and watch for messages in stderr" but I don't what to look for
  • How do I really know if it all worked??? not sure; I don't know if the changes are running in the instance right now; I think I will find out in the next incremental lab that I will be going which affects the download manager

My personal Mozilla development status

Today, Saturday 20th of October, is the day that I'm going to do all the labs that I did not have enough time before to work on, and in which I will try once more to build on Vista, since, I know it worked in Vince's laptop and I think I never installed the Windows SDK, but, before that I will finish the incremental build lab and the extension's lab.

On Tuesday, we will celebrate our second coding party and hopefully get our 0.2 release almost done, stayed tuned!

Monday, October 15, 2007

Session 11 - MozillaBuild in Vista - nsinstall giving me problems

I deleted my whole objdir because I couldn't make it work an incremental build and now I find myself not being able to build on Vista.
What's wrong? After the weekend developing for the 0.1 release, now I can't build anymore on Vista AGAIN, could it has to do with it?
The last time I only had to "run as administrator" the msvc8.bat

Could it has to do that at some point I decided to update my source tree without checking tinderbox first?

I'm trying to understand this Bug 388543[MozillaBuild] nsinstall on vista dies due to UAC

Everytime, I try to run the make -f client.mk build, I get a different error, why?:
  • nsinstall: cannot copy c:\ff\mozilla\js\src\jsapi.h to ..\..\dist\include\js\jsapi.h: The system cannot find the file specified
  • nsinstall: cannot copy c:\ff\mozilla\nsprpub\pr\include\prbit.h to c:\ff\mozilla\objdir\dist\sdk\include\prbit.h: The system cannot find the file specified
  • nsinstall: cannot copy c:\ff\mozilla\xpcom\string\public\nsObsoleteAString.h to ..\..\..\dist\include\string\nsObsoleteAString.h: The system cannot find the file specified
  • nsinstall: cannot copy c:\ff\mozilla\nsprpub\pr\include\prclist.h to c:\ff\mozilla\objdir\dist\include\nspr\prclist.h: The system cannot find the file specified

Which has this ApplyManifesto.vbs, which I do not know what to do with it!!!:
Dim objFSO, objShell, objProc, objManifestFile
Dim strPathMozBuild, strPathMT, strPathExe, strArgs, strPathManifest

strPathMozBuild = "c:\mozilla-build"
strPathMT = "c:\Program Files\Microsoft Visual Studio 8\VC\bin\mt.exe"

'*** Nothing below this line should need to be modified

set objFSO = CreateObject("Scripting.FileSystemObject")
set objShell = CreateObject("WScript.Shell")
strPathManifest = strPathMozBuild & "\tmp.manifest"

strPathMT = Chr(34) & strPathMT & Chr(34)

AddManifestToExes strPathMozBuild & "\msys\bin"
AddManifestToExes strPathMozBuild & "\moztools\bin"
AddManifestToExes strPathMozBuild & "\moztools-180compat\bin"

Sub AddManifestToExes(byval strDirectory)
Dim fileExt
Set objFolder = objFSO.GetFolder(strDirectory)
For Each objFile In objFolder.Files
fileExt = objFSO.GetExtensionName(objFile.Path)
If fileExt = "exe" Then
AddManifest objFile
End If
Next
For Each objFolder In objFolder.SubFolders
GetFiles objFolder.Path
Next
End Sub

Sub AddManifest(oFile)
WScript.echo "Adding manifest to: " & oFile.Path
strPathExe = oFile.Path
Set objManifestFile = objFSO.CreateTextFile(strPathManifest, True)
objManifestFile.WriteLine ""
objManifestFile.WriteLine ""
objManifestFile.WriteLine " objManifestFile.WriteLine " processorArchitecture=""X86"""
objManifestFile.WriteLine " name=""" & oFile.Name & """"
objManifestFile.WriteLine " type=""win32""/>"
objManifestFile.WriteLine " "
objManifestFile.WriteLine " "
objManifestFile.WriteLine " "
objManifestFile.WriteLine " objManifestFile.WriteLine " level=""asInvoker"""
objManifestFile.WriteLine " uiAccess=""false""/>"
objManifestFile.WriteLine "
"
objManifestFile.WriteLine "
"
objManifestFile.WriteLine "
"
objManifestFile.WriteLine "
"
objManifestFile.Close

strArgs = " -outputresource:" & strPathExe & ";#1 -manifest " & strPathManifest

set objProc = objShell.Exec(strPathMT & strArgs)

Do
WScript.Sleep 100
Loop Until objProc.Status <> 0

If objProc.ExitCode <> 0 Then
WScript.Echo "EXIT CODE: " & objProc.ExitCode
WScript.Echo "ERROR: " & objProc.StdErr.ReadAll
End If

objFSO.DeleteFile(strPathManifest)
End Sub

I also tried nsinstall.manifest to put this beside C:\mozilla-build\moztools\bin\nsinstall.exe, according to this post http://wiki.mozilla.org/Penelope_Developer_Page#Windows_Vista:


processorArchitecture="X86"
name="nsinstall"
type="win32"/>


Description of your application



level="asInvoker"
uiAccess="false"/>





My .mozconfig:
#mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
. $topsrcdir/browser/config/mozconfig
# the line before sets the project as browser and enable the application
mk_add_options MOZ_MAKE_FLAGS=-j4

# Options for 'configure' (same as command-line options).
ac_add_options --enable-debug
ac_add_options --disable-static --enable-shared
ac_add_options --disable-optimize

Saturday, October 13, 2007

Experience with bugzlla

I made another post about the bugs I received because I was watching Axel (localization owner) and Dave told me that I didn't really do what he was expecting

Then I decided to add another user to watch, since I had only few bugs. I chose Ted (luser in IRC) who came to give a speech and after two days I realized I chose the wrong one; do you know why? Because I got 130+ bugs notifications in two days :P - How does he manage them? I really don't know

I've also understood now the concept of voting, which allows the users to vote for the bugs they think are more important to get fixed

I've also learned that you can save certain searches like the blocking bugs

I'm thinking that I haven't found a way to see which bugs I'm subscribed to or to see which bugs have filled others (let's say the use I want to watch) or to find users to follow (as it was mentioned in class). I have to bookmark them or use a filter on Thunderbird to direct them to a folder and then look email per email

It is insane to handle so many bugs and to receive so many emails, an interface like facebook that gives you more control on what things you are subscribed to (groups in the case of facebook), the notifications (types and frequency) of bugs activity and a long etcetera

Bugzilla won't change since it is too much work to redesign it and all the developers that have been using it for years have found many ways around to get the job just done.

Regular Expressions

"In your face regular expressions!" (shaking head)
"I don't care how many hours I spent but I defeated you"
Before our code will ruin every DTD since it would change the entity name and the value, when we only want to change the values of each entity that matches the pattern
import re

print "BEGIN"
instring = 'colorsDialog.title "asdColors">\ncolorsDialog.title "Link Colors">'
# usinf Python's raw reg exp
newstring = re.sub(r'(".*)([Cc])olor', r'\1\2olour', instring)
wrongstring = re.sub(r'([Cc])olor', r'\1olour', instring)

print instring
print newstring
print wronstring
print "END"

l10n-merge tool update

This last Friday for around six hours three fellows were trying to figure out "what are we trying to write" and on Saturday we said "man, we have something!"
In the first few hours we went over emails, python samples, etc... and then after dinner we coded a python code that reads the .dtd files from the current folder makes a regular expression substitution:
re.sub(r'([Cc])olor', r'\1olour', instring)
and saves the file with a extension .bak with the changes made

The features we want to add are:
  • More regular expressions substitutions!
    • >> color(s) -> colour(s) -- re.sub(r'([Cc])olor', r'\1olour', instring)
      >> dialogue -> dialog -- re.sub(r'([Dd])ialogue', r'\1ialog', instring)
      >> Go forward -> Go forwards -- ??, etc
      >> Minimize -> Minimise
      >> Center -> Centre
      >> Organize -> Organise
      >> Customize -> Customise
  • Read the regular expression substitutions from a file and apply them
  • Go recursively into folders with .dtd and .properties files and make the changes there too, rather than just the current folder
  • Give two parameters: where to read from and where to write the changed source - this will require a parallel creation

Thursday, October 11, 2007

Session 9 - what does it take to start again on Vista?

NOTE=I've skipped session 8 until I have the lab done

Well, I wanted to do the lab that my professor told us to do (Modify the browser ) and I normally bring a hard drive with my source and build there so I can pour into the class' computer but I forgot it!!

I had three options:
  • Build on the PC from the lab (get the source code again and build), but this required too much time!!
  • Get the source code and the build from somebody else, I tried to get it by using my iPod (the transfer said that it would take 50 miuntes!!) and through a DVD (which was only finalized by the end of the class)
  • Or just work on the research that required the lab (which I did and I got the answer but couldn't test it)

Afterwards, I got angry and I said: why other people have been able to build on Vista and not me?????

It was over, I had to tackle this and stop building at my brother's computer or on the borrowed mac!!!
"Today, I should have the minefield build running on my laptop (which uses Vista)!!"

  • I deleted the whole source code
  • I ran the environment as administrator (right click on msvc8.bat and "run as administrator")
  • I got it again
  • new .mozconfig
  • build a debug-build
  • and voila!!!!
    • real 232m57.500s (232/60=3h52min)
      user 4m56.726s
      sys 13m46.088s
    • this long time might be that I had something running wrong on Vista, since the CPU wasn't being used more than 10%. I closed some programs and killed some processed and it seemed to go faster, but I did this almost like 3 hours and half after started
    • TODO - Research on how to take advantage of my dual core and build below 60 minutes
  • I run this:
    $> ../obj-i686-pc-mingw32/dist/bin/firefox.exe -no-remote -ProfileManager
    and did not run properly
  • The I run this:
    $> export XPCOM_DEBUG_BREAK=warn
    $> ../obj-i686-pc-mingw32/dist/bin/firefox.exe -no-remote -ProfileManager
    It run but it looked like this:

  • pretty empty, isn't?
  • Look at this screenshots of the errors I saw behind the screen (it shows Leaks or something):
  • Then I did this:
    $> obj-i686-pc-mingw32/dist/bin/firefox.exe -no-remote -ProfileManager > afterRun.log
    The contents below:
  • ++WEBSHELL 014192F8 == 1
    ++DOMWINDOW == 1
    ++DOMWINDOW == 2
    --WEBSHELL 014192F8 == 0
    --DOMWINDOW == 1
    --DOMWINDOW == 0
    nsStringStats
    => mAllocCount: 7042
    => mReallocCount: 636
    => mFreeCount: 7042
    => mShareCount: 6015
    => mAdoptCount: 1380
    => mAdoptFreeCount: 1380
    ++WEBSHELL 02FD6008 == 1
    ++DOMWINDOW == 1
    ************************************************************
    * Call to xpconnect wrapped JSObject produced this error: *
    [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame :: file:///c:/ff3/obj-i686-pc-mingw32/dist/bin/components/nsBrowserGlue.js :: bg__initPlaces :: line 297" data: no]
    ************************************************************
    ++DOMWINDOW == 2
    ++WEBSHELL 04519E00 == 2
    ++DOMWINDOW == 3
    ++DOMWINDOW == 4
    ++WEBSHELL 06478C18 == 3
    ++DOMWINDOW == 5
    ++DOMWINDOW == 6
    --WEBSHELL 02FD6008 == 2
    --WEBSHELL 04519E00 == 1
    --WEBSHELL 06478C18 == 0
    --DOMWINDOW == 5
    --DOMWINDOW == 4
    --DOMWINDOW == 3
    --DOMWINDOW == 2
    nsStringStats
    => mAllocCount: 16815
    => mReallocCount: 2957
    => mFreeCount: 16092 -- LEAKED 723 !!!
    => mShareCount: 14500
    => mAdoptCount: 2038
    => mAdoptFreeCount: 2024 -- LEAKED 14 !!!
  • I still had the weird leaks and the weird run of minefield, which would still work

  • Let's CREATE A NEW PROFILE
  • It works!!!!!
    But I have to raise some things I realized:
    • When I run the corrupted profile, I get these leaks:
      => mFreeCount: 15663 -- LEAKED 666 !!!
      => mShareCount: 14267
      => mAdoptCount: 2003
      => mAdoptFreeCount: 1989 -- LEAKED 14 !!
    • The first time I run a just create a profile and use it:
      It asks me twice for a profile to select and the warnings dialog boxes appeared as if I didn't call export XPCOM_DEBUG_BREAK=warn

I hope you enjoyed this post and my next adventure would be to add that patch that I have to create for the lab; See you soon!