Friday, December 16, 2011

0.4 Additions

I have completed the unit test for t308 which is a fulfillment of my commitment to finish what I have started. The complete package is up for review which include a plugin for a disability pause feature, demo and the unit test. I will continue to work with it until it is landed.

Unit test commit

Thursday, December 15, 2011

0.4 In Review

Once again my task included fixing lint error but this time for the core unit tests. With every task, there is an opportunity to learn or to better understand something. This one was no different. I learned to accept the fact that no task is unimportant since they all combine to make a complete product.

In addition, I am also creating some tests for the pause plugin which I created in the last release. It should be completed by tonight for I am currently working on it. Hopefully I can get the entire package landed. I will continue to work on it until it is landed. I must finish what I have started.

Please see commit

Monday, December 12, 2011

0.4 In Process

I am currently working on my fourth and final release for this semester. It is just unbelievable to see how time went so fast this semester. One reasons for this is because the work, though intense, continues to be very interesting and a great learning experience.

My recent release I created a plugin and demo. In this release, I am working on linting errors in addition to some tests for the plugin which I have created last release. My objective is to actually get a fully working piece added to the code for shipment and not just to work on a piece of it.

So far I am doing fairly well balancing all my tasks which is a task in itself. Definitely by Wednesday night or Thursday my release will be submitted. For now, let me continue with exam preparation for my other five courses.

Thursday, December 8, 2011

Creating Tests

The process of creating the tests and getting them to work properly and purposefully were no less a challenge than actually implementing the Mouselock feature. It touches on pretty much the same areas that the code impacted in the first place. I realized that these are all big areas which include the building(build system),implementing and testing.

I am pleased to experience first hand how working with big code in all these area are very challenging and equally rewarding when something works even if not the proper way at the beginning. Well, I have some tests to commit.

Friday, December 2, 2011

Test Sample

This test is to ensure that Mouse-lock can only be applied if the window is in focus. Believe it or not it is my first Mochitest. It was put together using other tests. Thinking of it as my first I thought it might be good to document it. Below is a snapshot of the event.

SimpleTest.waitForExplicitFinish();
var windowObjectReference = null; // global variable
var pointer = navigator.pointer;

var canvas = document.getElementById("canvas");

canvas.mozRequestFullScreen();
document.addEventListener("mozfullscreenchange", function (e) {
if (document.mozFullScreen) {
if (document.mozFullScreenElement === canvas) {
// Mouse should not be lock because the window is not in focus
if(windowObjectReference == null || windowObjectReference.closed || )
/* if the pointer to the window object in memory does not exist
or if such pointer exists but the window was closed */
{
windowObjectReference = window.open("http://www.spreadfirefox.com/",
"PromoteFirefoxWindowName", "resizable=yes,scrollbars=yes,status=yes");
/* then create it. The new window will be created and
will be brought on top of any other window. */
}
window.blur();//Sets the main window out of focus.
pointer.lock(canvas);
isnot(pointer.islocked(), true, "Mouse should only be locked if the window is in focus");
window.focus();
pointer.lock(canvas);
is(pointer.islocked(), true, "Mouse pointer should be locked");
}
SimpleTest.finish();
}
else {
canvas.mozRequestFullScreen();
}
}, false);

Rome Speed Required

I have completed two of my three tests for Mouse-Lock but my machine could not keep up with the demand for lightening speed builds. To make up for lost time, I was multitasking but progress was a little too slow in this area. I must admit that I was being a little stubborn trying to get it the way I want it work on my machine. But it turned out that I was asking too much of it.

I was finally convinced to switch to Rome. Wow. What a difference speed makes. Getting an account on Rome took less than a minute. Thanks to humph who responded immediately to my request.

Information to setup was also provided on IRC which directs to the following link: Rome Instructions. My tests should all be ready by this evening.

Monday, November 28, 2011

Don't Go IT Alone

I heard it over and over again but got a full understanding when I attempted to contribute to the mouse lock feature. I am starting to get used to feeling like I don't know anything. Every time I discover something, It opens up a new set of things that I don't know. So it goes on and on. I am encouraged in the fact that I am not alone, but In the midst of not knowing a lot, many things are still being done.

My approach will now be to join a group or to team up with someone with whom I can work and get more done. I can never be satisfy with just building Firefox or getting lost for days trying to find the proper way of implementing some feature. I must be able to have a piece of my code included.

Monday, November 21, 2011

0.3 Submitted(Disability-Pause Plugin)

Creating and Implementing a plug-in that works is very encouraging. It is an accumulation of all the knowledge gained in previous releases in a single plug-in that actually works. I doubted myself a little at the beginning but I didn't allow it to become my enemy. In fact, I wanted to do it because I was a little iffy. Thanks to "dseif" and the open source community. I can say taking on the challenges a little at a time works. It is amazing to know that even fixing lint errors makes you a little more familiar with the code and the file locations. The progress continues.

Please View Commit

Sunday, November 20, 2011

Sticking to the task(Pause plugin and Mouselock)

I have made good progress on my plug-in. This feature has been a great learning experience for me because I started out trying to find where to add the necessary code for the feature. I found out and the code was added. It actually worked. I was asked to through it out and add the feature to an existing plug-in. That too was done. Again, I had to though it out to make it a plug-in on its own. I know that too will be done. I really like this stuff. When I am not writing code,it feels like something huge is missing.

I am still feeling my way through Mozilla-central. This is in addition to another ticket(t840) which has been assigned to me to fix more linting error but this time in the core as opposed to all plug-in which was my previous ticket(t607) which is being reviewed.

Overall is am making good progress considering having to do 5 other programming courses. It is frustrating at times because of not progressing in one area as I would like. I am at this very moment doing C#,C++ and JavaScript. I love it. The work continues. My 0.3 will be up later today or tomorrow.

Friday, November 11, 2011

Built at Last!

I had no doubt that it was going to be done. After three days of struggles trying to build Firefox on Windows, I finally did it.

I felt as though I have stumbled upon every possible error during the building process and wondered why me. Nevertheless, it was a great opportunity for me to learn from every single challenge. I now know a little more.

The biggest challenge was trying to figure out why a ".exe" file could not run. The reason was because the system had problems generating the file for some unknown reason. The solution was finding the source code, building it separately and putting it where it belongs. This was unique to my computer setup. It actually worked.

Well, I am all fired up and ready to go. Now is time to get that mouse lock feature implemented.

Wednesday, November 9, 2011

Mozilla-Build

Trying to build Mozilla was as big a challenge as the size of the actual code. I spent several hours trying to build the code on the school's machine. This was just to conserve on my bandwidth usage at home since it is limited.There were a whole host of challenges.

After figuring out how to get certain programs downloaded and installed which included installing some on my USB, I was finally able to run the Mozilla-build shell. Wow, this was a major hurdle which came with hours of research. On the positive side, I gained several hour additional knowledge and practice. I basically had to figure out a way to tell the start program, where to find Visual Studio since it had a problem doing so. I did it by adding the "NOT" and including the direct path the script:

if NOT "%VC10DIR%" == "" (.......

)
) else (
call "C:\Program Files\Microsoft Visual Studio 10.0\Bin\vcvars32.bat"
)

I was able to cross the python hurdle and a few others including the line ending, I reached a point where the windows compiler was causing an error. At this point I had to refuel. I asked on IRC with just one response which did not help.

...........
cd obj-i686-pc-mingw32
/c/Temp/mozilla-central/configure
loading cache ./config.cache
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking build system type... i686-pc-mingw32
checking for mawk... no
checking for gawk... gawk
checking for perl5... no
checking for perl... /bin/perl
checking for gcc... cl
checking whether the C compiler (cl ) works... no
configure: error: installation or configuration problem: C compiler cannot creat
e executables.
*** Fix above errors and then restart with "make -f client.mk buil
d"
make[2]: *** [configure] Error 1
make[2]: Leaving directory `/c/Temp/mozilla-central'
make[1]: *** [obj-i686-pc-mingw32/Makefile] Error 2
make[1]: Leaving directory `/c/Temp/mozilla-central'
make: *** [build] Error 2


What I am actually going to do now is to put the files onto my local machine and continue from there. I know I will eventually build it.

Sunday, November 6, 2011

Success with Merge Conflicts

I have successfully completed another task of dealing with merge conflicts. This was my first experience dealing with this. The major challenge was having to go into several file after lint error correction. Sometime I don't feel like much is being accomplished but when I check what I know now compared to when I started, I have learned a lot. Its a lot of pieces involved but they are slowly coming together.

I have made some new commits for t607 and t308 for review after fixing the merge conflicts and fixing additional lint errors. Hopefully I can get something to land this time around but if not, the push continues.

Thursday, October 27, 2011

2.0 Second Bug(Improving on pause feature t308)

I was able to add the pause feature to a plug-in, removing it from the core as requested. Footnote was used to implement the feature. I must admit that the more prepared I am to throw out my code is less frustrating I am if asked to do so. That was the case with my first attempt at solving the problem. The more I understand what is happening, the better the solution. I am not prepared to throw it out this this time but if I have to, then I will start over with a better understanding. Please view commit

Monday, October 24, 2011

2.0 (Correcting Lint Errors) Completed

I have corrected all lint errors found in all unit tests(t607). This has been a wonderful experience because it allows you to work with different components of the code. It makes you better at debugging code and also finding better ways of making things work more efficiently.

After getting make to run on my window machine,I was all set to debug. please view previous post for "Make" setup.

Tuesday, October 18, 2011

Checking Unit Tests against JSLint

The last time I reported that my new task is t607 and the first challenge was to be able to use the make command to create a lint file. Well, I got it to work on my Windows machine.

This tool is used for finding lint errors within the js code. The command to get the lint information is "make lint-unit-test." This did not work at first because he make.exe was not available. I was advised to install MINGW32 on my machine which had "make.exe" available with it. I was also informed that if you build Firefox that the feature should be available in the browser. However, all i did was to install MINGW32 and that actually worked. I also installed "node.js" but I am not sure if this played a part in it working. If you have more information on this please leave a comment. That would be well appreciated.

Well I am now ready for fixing those lint errors found in several js files.

I have some recommendations on my previous bug(t308) so that it can be landed. It was pushed from 1.0 to 1.1. So I still have some work to do.

Friday, October 14, 2011

New Assignment t607

My first task is up for review. This is a wonderful feeling of getting somewhere. The first task involved putting the pause feature on a popcorn object. View Code

I have been assigned a new task which includes working on the unit test lint errors. Before actually checking the unit tests, I first have to figure out getting the Make feature to work on my machine.

Thursday, October 6, 2011

Release 0.1 Cont'd (T308)

With determination and perseverance a fix was implemented that actually produced some positive results. Thanks to Hasan for his help towards finding a solution. This is what community effort is all about. The challenge was finding where to actually put it. I must admit that I am still very far from really understanding the core but I am becoming more familiar with it.

Solution:

if ( byStart.pause ) {
window.setTimeout(function(){
obj.play();
}, byStart.pause );
obj.pause();
}

"byStart" is the object that holds all the properties such as Start, End, Pause(new feature)...

Several other changes has to be made to make it fully integrated into the core allowing the user to enter 5 for seconds instead of 5000 as it is at this point.

Using feature:

{
start: 20, // seconds
end: 45, // seconds
pause: 5000, //New pause feature option.
text: 'Visit webmademovies.org for more details',
target: 'footnotediv'
}

Saturday, October 1, 2011

Release 0.1 Cont'd

Several hours(12) of work today went into understanding the core of Popcorn in relation to adding a pause feature to a Track Event. In order to get an idea of how advance JavaScript works, reference was made to Douglas Crockford Online Teaching which helped in the process.

The first phase includes finding areas where change might be necessary. Scott's suggestion to use the feature would be as follows:

Popcorn("#video").trackevent({
start: 10,
end: 10,
target: 'container-div',
pause: 5
});

The following updated were made:

Added trackevent video duration for pause:

Popcorn.addTrackEvent( that, {
start: videoDurationPlus,
end: videoDurationPlus,
pause: videoDurationPlus
});

Included line to converted 'pause' to seconds:

track.pause = Popcorn.util.toSeconds( track.pause,obj.options.framerate);

Efforts are mainly focused on setting up properties.

Thursday, September 29, 2011

Release 0.1

I am currently working on ticket 308 of Popcorn project. This ticket involves creating a pause attribute for a video. There is already a start and end feature. The pause feature will allow for something which has started to pause for a specified time period then resume when the time for pause is completed. Text messages for example will remain longer on screen if the users require more time to read it.

Before actually writing the code for the new feature, analysis of the code had to be done to determine where the start and stop features are handled. In doing so, a plug-in (footnote) was executed to identify the event handling.

Since the code is large and complex, several breakpoints using Firebug was placed within popcorn.js file to follow the sequence of events. In addition to breakpoints, alert messages were also placed at different point to find where the start and stop events are handled. Since this additional feature requires a deep analysis of the core code, my task will involve finding where the actual change is to be made which is proven to be very time consuming. Understanding advance Java Script is also part of the task.

My continued efforts will be centered on running several tests to understanding the core code and eventually be able to add the code for pause in an efficient way.

Friday, September 23, 2011

Getting Started with Git

It was a nerve wrecking experience for me trying to generate and setup a key in order to download my Github repository to my local machine. What an experience.

Here are the challenges and solutions:

Challenge:
The path that was provided where the key should be saved was causing problems due to a space in one of the folder names. I tried putting the name in quotes but that did not work. The system continued to generate an error message.

Solution:
I changed directory to the folder where I wanted the ".hub" file to be created and instead of provided a path, I just provided the name of the file(id_rsa).

Challenge:
Could not see the ".hub" file where the key was stored even though I turned on the view hidden file option.

Solution:
I used the "ls" command within the directory(.ssh) were the ".hub" file was stored. This was done to verify that the file was present.
I copied (cp) the ".hub" file to a text file. eg cp id_rsa.hub key.txt

Once that was done, I was easily able to open the ".txt" file and copy the key and paste it correctly in my Github new key option. I tried it in text pad but it was causing problem due to space and new line character.

Challenge:
While downloading the repository, some file could not save due to permission access.

Solution:
I had to save the repository under my user profile. I was under the root folder where saving ".js" files were not allowed.

I was finally able to download my Github repository to my local machine.

Tuesday, September 20, 2011

Subversion Vs Git

I have worked on a group project before on SVN with very little knowledge of the tool. Today I had some eye openers with some very wonderful illustrations in my OSD600 class. Having gained a better understanding of the older system and its challenges especially with mergers,I am now prepared to face the challenge of learning a new project management system anticipating a much more effective and powerful experience.This is the move from a Centralized Revision Control System to a Distributed Revision Control System(DVCS).

Today that journey has begun with Git. I have setup my Github Account and installed the Git on my machine. I have started using some of the basic command but not yet gone into deep waters. hopefully soon I will be able to clone the source code of a project and make a valuable contribution towards its performance.

Saturday, September 17, 2011

Using WCF Data Service

I have created a WCF Data Service which works when "View in Browser" option is selected. It displays the information from the entities using the OData protocol.

I am new to the technology of web services.I intend to focus in this area as I work on one of the Open Source projects.

The challenge I am having is to use the information provided by the Data Service in a web form(.aspx). This may include displaying the information in a text area.

I did some research for several hours during which time I got some very good information but nothing explaining how to establish the link between the web form and the data service. I am not sure if there is a predefined function in the data service class to pass the URI information or if I have to create one.

Wednesday, September 14, 2011

IRC Experience

I was successfully able to join the Seneca Channel on the Moznet IRC network. I sat there in an attempt to join the discussion but all I noticed was people coming and leaving the channel. I realized that it is extremely difficult to get involved in a discussion with persons who you don't know and a topic of discussion which you are not familiar with.

My main objective for joining the IRC channel was to identify a project and try to become involved in it. I will continue to until that objective is materialized.

Monday, September 12, 2011

Software Licensing Readings (OSD 600)

My OSD 600 course has taken off to a great start. We were encouraged to read about Software licensing terms as part of recognizing its importance and to identify things we basically overlooked before.

Windows 7 licensing terms.
The following points stood out to me:

1. We do not own the software.
2. Only one language version per computer
3. Term agreement cannot change consumer rights under local law.
4. Except for any refund from manufacturer or installer, you cannot recover any other damage or lost of profit.
5. May not be able to activate software outside of specified region.
6. Typing a '?' before text in the instant Search Box of address bar will send information to the search provider.
7. Information is sent back to the manufacturer from time to time.

In comparison to the open source licensing term, I do appreciate the level of flexibility it provides in regards to the software to which it applies. The level of flexibility is certainly one of the factors for the ever growing success of open source projects.