Friday, December 5, 2008

Ubiquity In Thunderbird 0.3 and Reflections On OSD600

Link to my 0.3 XPI file:

http://zenit.senecac.on.ca/wiki/imgs/Ubiquity-0.1.2pre03.zip

Link to project page:

http://zenit.senecac.on.ca/wiki/index.php/Make_Ubiquity_Work_In_Thunderbird

Well... OSD600 has finally come to a close as far as projects are concerned. I must say, this has definitely been my heaviest course this semester. It’s kind of surprising too. When I first looked at the requirements for completing this course, I was kind of like, “No tests? No exam? Wow... that’s awesome.” Well, OSD600 took a complete 180 on me and showed me that it’s not really tests or exams that make a course difficult. It’s the steep learning curve, and amount of work that needs to get done. This course has definitely prevailed in the learning curve and workload department. If it wasn’t for OSD600, I would have been able to do so much more in my GAM666 course and I would have also been able to go outside more than a couple hours a week.

Ok the last part was a joke. I’m a nerd, I don’t go outside... ever. If I wasn’t cursing at Javascript, asking God why Ubiquity hates me, and asking people for direction... I’d be sitting in front of the computer doing something else anyways. One thing I can say for sure, out of all of the courses I’ve taken this semester, OSD600 has taught me the most. This is the first time I’ve ever had to delve through someone else’s code and try to change things. Not just change things mind you, change them to work under a completely different application. At first this was nothing but a complete annoyance. Thank god we had so much time to get our 0.1 done. Fortunately, once I got some momentum, that annoyance gradually disappeared, and turned into a sense of accomplishment. I’ve managed to make a small contribution to an amazing project, and I feel good about that. I’ve also been able to dive right into a community that I’ve never been a part of. I must say, the Mozilla Open Source community is really great and helpful. Without them I couldn’t have completed nearly as much as I currently have.

Anyways, with all that stuff out of the way. It came to my attention that implementing JS Inheritance into Ubiquity to fork the application between Firefox and Thunderbird wasn’t the best direction to go at this point in time. There were too many pre-requisites to getting the ticket done. The best way to go about getting Ubiquity to run in both Firefox and Thunderbird at this point in time was to simply combine parts of code that should work under both applications, and anything that can’t work under both applications, split them using our Utils.getApplicationName() function until they can be dealt with at a later point in time (Most of which are tickets that currently need to be resolved).

As I mentioned in an earlier Blog, when you’re editing out code, I personally feel that it’s a good idea to just comment it out with a comment saying why the code was removed, rather than just out right deleting it. At some points I found code that we had ripped out could just be put back in with no effect what so ever on the current Thunderbird version of Ubiquity. I spent a large portion of my time re-adding code, as well as modifying existing code back to its original state that didn’t touch any of the new changes that were made. This isn’t a bad thing mind you, considering it wasn’t very difficult to rebuild everything. Now I’m sure you’re about to ask... “Hey Scott, did you comment anything?” My answer to you is... “Nope...” Yeah, I know, practice what you preach. I’m bad, very very bad. One of my other professors lectured the class about commenting our code on a regular basis and updating comments if you modify someone else’s code. I’m sure I’ll listen to that stuff one day...

Well, if you load up my XPI you’ll notice that there’s still some console errors showing up in Firefox. Yep... some bugs aren’t totally ironed out yet. I honestly didn’t expect it to actually run as well as it currently is, considering I have no file forks left (ie: duplicate files). So if there’s a console error here and there, at this point I’d have to say I feel pretty good about what I’ve done. Getting those nailed will probably happen some point when the team decides to tackle them. For now, everyone seems to be hitting different things, so we’ll just have to see where everything takes us. In due time everything will get done. I’m also sure someone will get back to me and tell me that even though I’ve managed to get Ubiquity running under both apps, I’ve blown something up somewhere. =)

I would also like to thank David Humphrey for taking time to listen to both my whining and project direction ideas. Even though the final result wasn’t using everything he recommended, he was still a great help when it came to getting me started and pushing me forward. (TOTALLY NOT SUCKING UP HERE! BELIEVE ME!)

I’d like to close off by saying that I believe the hardest part of this course wasn’t relearning my Javascript or the work load OSD600 presented me with. It was simply trying to figure out how Ubiquity worked. I’d say 70% of my total time was just doing that, the rest was spent coding and finding a direction to take. Ubiquity is a wonderful application, and I’m sure a lot of people would be surprised how massive this extension actually is. I'd love to work on this some more... but sadly... exams are upon me and I have to start studying. :(