OSD700 0.5

Today mark's the release of 0.5 for OSD700 and compared to the last release, this one didn't feel quite as awesome.  For my 0.4 I was able to get 3 separate tickets up for review/feedback and it felt great.  This release was quite different.  I had to take my half finished work from 0.4, put the polish on it, and actually get it landed, which sadly didn't go as planned.

Bug 702161, which was the first bug I began working on last release, is still sitting on it's second stage of review.  Justin Dolske had a few minor comment's that I cleaned up quickly and I have been waiting on another review for over a week now, which sort of sucks.  I'm assuming Justin is really busy with his work and will get to it soon, but it sucks not getting a ticket landed this release that I thought would definitely land.

Bug 680321 was a bit different than 702161.  Chris Pearce had a bunch of feedback on how my current implementation was wrong and how I could fix it ( outlined in my last post ). I managed to bring it up to par with what Chris described for the most part, but continued to run into a failing case when my fix was implemented.  I spent the better part of this week trying to fix the problem and continued to hit dead ends.  I spoke with Chris on IRC a bunch and last night he say's he figured out the problem and pointed me in the direction of where it was occurring. He said if I couldn't figure it out he would give me the solution, but I don't want this bug to end that way.  Seeing as I've been scowering over the code for the last 2 weeks, simply having Chris hand me the answer would be a pretty anti-climatic end to an interesting ticket.  The area of the code that Chris pointed me at was AbortExistingLoads, Load, and IsCancelled in nsHTMLMediaElement.cpp.  My guess is that there is something going wrong when we load our new source ( which calls Load() ).  Load  calls AbortExistingLoads, which resets the state of a bunch of flags pertaining to the media element so that when we load a new resource, it act's as tho it was from first load.  Some of the things I noticed in AbortCurrentLoad was that we never reset the preload state back to undefined, and it kept it's previous state from the last time it was set.  I thought I had figured it out, I mean it all made sense in my head that this was the problem.  After waiting on a build it ended up fixing this bug, but now failed test 13 again ( not allowing less aggressive buffering to occur then what is currently happening ).  I know I'm getting closer to figuring this out and once I do I will be pretty close to finishing this ticket, seeing as I already have test's written for it.

Last week I also picked up bug 722788, which was adding an optimization to the number parsing code for JSON.  The code I was working on was inside Firefox's JavaScript engine, SpiderMonkey.  I briefly outlined what was supposed to happen for this ticket in my last post, but I think I severely underestimated how hard it was going to be.  There was a lot of math, terms, and other thing's that I didn't understand and although I began researching what I needed to do, it was too little too late.  I tried to not understand the math as much as I could, but in doing I felt myself lost at time's and didn't know what the next step was.  I tried copying Chrome's implementation ( which the ticket was based off of ), using the suggested places to look that were mentioned in the ticket, and asking for help on IRC, but that still left me dumbfounded and most of the time with 5 other questions I had to ask.  Last night the nail was pretty much driven into the coffin for me regarding this bug when someone else posted a fix for this.  The fix he posted was crazy. If what was posted is correct, I was way, way, WAY off on what I needed to do.  I'm not gonna lie, I was pretty disappointed that I didn't figure this out as I was really excited to work on the JS engine, but at the same time it was an awesome learning experience.  I may have put about a week's worth of work into getting no where, but I learned a lot about what I am capable of currently.  It made me realize that I am really going to need to revamp my math skill's if I ever want to work on a ticket like this again and that I am not even close to being done learning.  All in all the experience was humbling and gave me a new perspective on how to approach problem's.  So for now I am going to stay out of SpiderMonkey, but I don't plan on making that permenant.

This release ended up being a lot of work for little to no results.  This is probably one of the most frustrating part's of being a programmer, in that we put so much time and effort into trying to solve a problem, when so much of the time it ends up being a dead end or code we just throw away.  With that being said tho, programming can also be one of the most satisfying thing's to do as well.  With all that time and effort put towards figuring something out, when you finally do figure it out, there is no other feeling quite like it.