Monday, February 18, 2008

PW extension release

Back in mid December, when me and Brandon were closing in on our final submission of Plugin Watcher (0.31), we had to go against Mark Finkle's advice and hack our JS code directly into 'browser.js'. Mark had told us how inelegant this solution was, and this is the reason that my 0.6 release is the Plugin Watcher Extension. This extension listens to the runtime notifications of your plugins and notifies you if they exceed a certain limit a certain number of times per certain amount of time. At the moment the extension does not add any new functionality, but I'm working on including various configuration options in the future. To try the extension out click here to get to the project wiki.

Thursday, January 17, 2008

Releasing PW 0.4

Not too much thats exciting in this release but I did just file a bug with the PW 0.31 patch. I'm hoping this will start the ball rolling towards v1.0 and provide me with lots of new ideas and suggestions. Click here if you would like to see the bug and please don't hesitate to leave a comment or two of your own if you have any remarks, suggestions or any criticism at all - all of your feedback is valuable and highly appreciated!

Monday, January 14, 2008

Rebuilding firefox and starting OSD700

So this has been a hectic first week of school but things finally seem to be calming down a little. I thought I would take this time to (a) let you know what I have been up to and (b) describe what I hope to achieve in the next 4 months in OSD700.

So regarding part a - I decided to rebuild minefield last night on my home desktop. I did this partially because I still have not been able to checkout an XPS laptop from ORI but perhaps primarily because I had recently upgraded my computer from 1GB to 3GB of ram and was curious to see how that might affect the build time. As some of you may recall, when I first tried building the source tree on this machine it took no less than 10 hours, so I was rather curious to see how much shorter the process will be with the new hardware. Unfortunately however, I got an error during compilation and therefore I can't report on any improvements for now. I will be trying again shortly though and will post here if you are curious.

And as far as part b goes - I have given it some thought and came up with the following list of things I would like to achieve for my 1.0 release:
  • File a bug with my 0.3 patch and get some feedback for the code.
  • Work on the code in accordance with the feedback I receive.
  • Get the code to work on macs.
  • Get the JS portion out of the browser and into a proper extension.
  • Improve the heuristics of the front end extension.
I have also thought of some other things that I could do - outlined below - but whether these goals can actually fit into the schedule remains to be seen (I assume this would largely be dictated by what sort of feedback I receive for the code on Bugzilla):
  • Provide more information about the plugin that is causing the issue.
  • Provide a way to disable the plugin.
  • Add code to the front end JS that will collect and display statistical information about plugin runtime.
  • Do plugin benchmarking and publish the results.
As always your comments are welcome!

Sunday, December 16, 2007

0.31 is now out!

So earlier today I was trying to think of a way to test our 0.3 release with a plugin that is actually hogging resources. Unfortunately since I was not able to create or find such a plugin I thought that perhaps lowering the amount of availble resources will do the trick. I already had a VM running Fedora 7 set up and figured this would be a good opportunity to also test our code in Linux.

So I fired up the VM, booted into Fedora, checked out a clean tree, applied the 0.3 patch and built it... then I spent about half a day trying to install Flash 9 on minefield since none of the automated installers would work. I finally managed to install it only to find out that our code wasn't even getting executed.

I spent all night trying to figure this out and thankfully after going through a lot of files I managed to make it work. I'm therefore releasing PluginWatcher 0.31 which now works on Windows and Linux. I don't own a Mac but I believe it should work fine on OSX as well.

Something to note before trying 0.31 out... it seems that plugins work differently on the different operating systems. The runtime pattern of the same flash game seems to be different when executed on the different platforms. I'm not really sure why this is the case but it seems possible (even likely) that this is due to some fundamental difference between the two operating systems.

If you tried our old patch on a Windows machine please continue using it as there are no changes in the new patch that are applicable to you. If you are you using Linux (or OSX) and would like to try out our new patch please visit our wiki project page!

Saturday, December 15, 2007

My contribs

My small contributions to other projects:

* I did a translation of ISOMaster into Hebrew for Andrew (andrew).
* I tried Canvas3D on my machine at home for Cathy (cathy).
* I'm currently in the process of trying out the metrics extension for Simon (SimonJ)

You can download the current Hebrew ISOMaster .po file here.

For Cathy's contribution I tested Canvas3D on my home machine with the following spec:

Asus P5ND2 Sli-Deluxe
Pentium 4 CPU
nVidia GeForce 6600 GPU (256Mb)

Unfortunately I was not able to see the graphics on my machine.

I'm done building the the metrics extension for SimonJ and unfortunately it doesn't seem to work at its current state

Friday, December 14, 2007

0.3 Released (Finally)

So me and Brandon had finally finished our 0.3 release today. It's been quiet the journey as we have had to deal with so many different issues... most of which really had nothing to do with our code or even the hairy Mozilla code surrounding it. Our largest obstacles were indeed related to the tools we were using and the build system which seemed to dislike code edited by the Visual Studio text editor while working just fine when the code was edited in a different app. Its amazing how depressed you can become when nothing seems to be working for you. Luckily though we did not give up and despite the many struggles, both I and Brandon feel like we have prevailed and actually came up with some pretty interesting code.

From a technical point, one of our biggest challenges was to find a way to communicate with the UI from deep within the plugin related C++ code. One of the problems we encountered with the C++ code itself was that it was in the form of a macro and that made it very difficult to manipulate. That meant that keeping track of anything across the different runs of the macro was basically impossible (since it involved referencing an external object in a macro that was getting called in numerous locations in other files). The need to communicate with the UI was initially for the purpose of notifying the user when a plugin was using too much runtime, however, once we figured out how to communicate with external JS code using Mozilla's observer services (many thanks go to mfinkle for that one) we realized that we can do everything we need directly from inside the JS code itself. So we simply made the C++ code report a plugin's runtime to the JS class, where the different statistics are tracked and the user gets notified under the right conditions. At the moment the user gets notified when a plugin has runtime x or above, y or more times in z amount of seconds.

In addition we also dump a line to the console every time a plugin has a runtime of one millisecond or longer.


The picture above shows console output and a notification bar advising the user about a plugin with a high runtime.

The picture above shows the console output when an interactive flash game is loaded.

So now that you know what our 0.3 does you can try it for yourself by going to our wiki project page.

And now for some final words about OSD. This course has not been easy, it was hard and confusing and very frequently frustrating, for both myself and Brandon. That being said I am glad I took it and I would do it again without hesitating because I got to meet some great people, got to see how people come together to form a community that in turn produces some really great stuff and got a chance to participate in solving a real world problem. The experience has been really invaluable and I thank Dave and Chris for pushing for this sort of education. Many thanks also go to all the people who helped us on our way here like Mark (mfinkle) who was always available for help on any topic, Robert (roc) who made Mozilla's code a little less hairy, Armen (armenzg) who helped us test our 0.1 release and of course Chris (ctyler) and Dave (dave) who were always super supportive and very flexible!

Sunday, September 30, 2007

LXR/MXR

So I have played around with the Mozilla cross reference tools and found them to be very useful. The only issue I really had was that when you click on a link within the source code it performs a global search on that term and often times the results are out of context - especially when the term is a common member/method name within a number of different and unrelated classes. I have to admit though that searching for a specific function in the code (in my case the code that controls the refresh button) only made the work thats a head of me and Brandon seem even more daunting (though we are gaining new appreciation for large software as we go along). We already spent a couple of hours trying to figure out where our code would need to go and found some classes which we are hoping would come in useful - although by no means can we say that we have a clear grasp of how plugins operate within Firefox as of yet. We are meeting up this Wednesday to do some more digging and we are also going to be adding our own code, mainly some printfs to try and orientate ourselves within the source. Updates are to follow.