Final Milestone

It’s been a long few weeks but finally reached the last leg of the race!

For my final project we decided to try to finish one of the projects that didn’t get completed last year.  The infamous file attachment (file uploader) program, a program that would allow the user to upload any kind of file to Review Board.  This project was started by Laila Agaev, but not quite finished.  Unfortunately, we didn’t have access to the original repository where it was located, so Christian had to do a merge based off of Review Board.  This turned out to be a bit of a challenge.  After Christian had finished the merge I began to run through the changes listed on Review Board.  Part way through, though, we ran into some difficulties.  So, once again, we had to do a second merge, and run through all the changes a second time.  This was pretty tedious since we lost a lot of the code during the merges.  I had to open up each diff on Review Board and walk through the code so I was able to get some context for each of the comments.  (Ironically, a day later Laila was back online & able to push her repository to the github. It was too late at that point, but it did help to verify that I had the missing sections of code in the their right place).

After we got through those changes I was really looking forward to just seeing the program work, but it didn’t.  So the next few days were spent trying to track down why the program wouldn’t function at all.  In the end, we finally got it working, and viola! The program actually loaded a file! and that was about it.  The text from ‘Review File’ just seemed to disappear whenever we tried to post  a review or comment.

We had a few ways to tackle this but I thought best if we started with the dialog boxes.  Laila had used some custom dialog box function for the comments, where we needed to implement the default Review Board comment box.  This should be straightforward right? And help to track down the lost text?  Well easier said then done.  I spent a lot of time trying to get that thing to work, following the examples in the diffviewer and screenshot viewer, but neither of them were quite the same as what I was trying to do.  I had written some code that just should have worked on several occasions.  I would always get a TextField variable not defined.  So time for firebug, which I used a bit before this, but no where near as much.  I spent a day just figuring out the features of firebug so I could try to track down why this field wasn’t working.  Unfortunately that didn’t yield any results.

Frustration!  Our mentors were very busy with other projects at this point so it was pretty tough to get a hold of anyone for some guidance, but finally David was able to point me in the right direction.  There is a special form (html) that needed to be in with the original code.  So in review_requests_box.html we needed to add a handy {% include “reviews/comments_dlg.html” %}. Eureka! The comment dialog box worked! Except…

Of course! The missing text.  With the new dialog box working I was able to track down where the missing text flew off too.  Apparently there was a mix up on the entire page. Some comments & reviews (depending which button you pressed) sent the text to a body_tag of a reviews table, and the ‘review file’ button sent the text off to the fileuploadercomment table.  Which probably wouldn’t have been so bad in itself, except that the page loaded the text from the body_tag of the reviews table.  Unfortunately at this point the mentors were really swamped with other work and I wasn’t able to figure out the problem on my own.

So we didn’t quite get Laila’s implementation done, sorry Laila.  I think its pretty close, someone more familiar with the languages should be able to finish it up in a few hours I would think.

The remainder of my time was spent writing a report for the U of S, preparing for a presentation, and working on a webcast for the project.  Since Mike emphasized that the audio quality needed to be good on the webcast I spent a fair bit of time recording an audio track and trying to level the volume as best I could.  Once I merged the audio & video I sent it off to youtube where it took about 24 hours to upload.  In this video I largely covered the use of the fill-database script, which might be handy for someone who is trying to use it that isn’t familiar with what it does.  In the second part of the webcast I covered some of the interesting parts of the code, mostly parts that are not clearly described in the Django docs, such as the exception you need to raise for transaction rollbacks, or the need to empty out the database queries to prevent memory errors.  I also talked about uploading custom diffs, so those wishing to add more diffs to fill-database’s random sampling should be able to do so easily.

Well, that’s it for me, a special thanks to those at the UCOSP (Andrew, Michelle, Karen, Eleni, Greg) who made all this possible. A big thanks to Dave, Mike and Christian for their guidance in figuring out Review Board & helping with our projects.  Thanks to Kevin for filling in for the mentors while they were away for the sprint weekend.  Thanks to Dr. Makaroff at the U of S who did all the organizing for our presentations.  And a special thanks to my supervisors at the U of S, Dr. Neilson & Dr. Roy, who supported us through this project.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s