Author Archives: aam1r

UCOSP Blog Post – November 20th

The past few months have been really interesting working full-time at a co-op and working on Review Board. I am a 4th year Computer Science student at the University of Waterloo and I chose Review Board as my open-source project for UCOSP. Hacking on the Review Board codebase has been an exciting experience so far — especially for someone diving into a Python (Django) for the first time.

The term got initiated with a code sprint in Waterloo. The sprint was really beneficial as we had instant access to mentors for any questions we had. The idea of the sprint was to pick simple “easy fix” bugs to address as we get familiar with the codebase. I addressed a bug where a hyperlink, “Add Comments”, was not showing while viewing a user profile. Additionally, I had the chance to fix a bug where the hit target for a button was too small causing users to accidentally click on another nearby element. Working on both these bugs was a great way to start working on Review Board as it gave me some familiarity with how the codebase is structured, how the review process works and how git is used for developing Review Board.

The project I have been working on since then is called Pluggable UIs. Specifically, the idea is to render file attachments in the browser for easy viewing while reviewing requests. I have spent most of my time working with Markdown files since they are commonly used in codebases for text-based files such as README and LICENSE files. I have made significant progress on this project and the technologies that were used to achieve that were Django, Backbone.js and the markdown Python package.

Rendering Markdown attachments in Review Board

Rendering Markdown attachments in Review Board

I am currently wrapping up my Markdown project and working on displaying rendered Pluggable UIs in a lightbox window rather than on a new page. To achieve that, I am mostly working with the existing Django codebase as well as jQuery for the client-side user interaction.

Initial version of rendering Pluggable UIs in lightbox

Initial version of rendering Pluggable UIs in lightbox

Overall, I’ve had a great term so far working on Review Board. I have been interested in working with Python for a couple months now and working with a mature Python codebase has helped me learn a lot about how things are done in Python. I plan on shipping my current projects over the next few days and hope that Review Board users find the features I worked on to be useful.

Status Report — October 28th, 2012

Wesley Ellis

Currently:

  • Writing the buildbot plugin
  • Finishing up my updates to reviewbot

Roadblocks:

  • Can’t figure out how to get the celery worker hostname at the right time

Next:

  • Not sure what at the moment

Questions:

  • Can I get access to the reviewboard’s buildbot?

Jesus Zambrano

Currently:

  • Finishing up task assigned. I will soon post for review again.

Roadblocks:

  • Time constraint, i have a midterm tomorrow and won’t be able to work on RB this weekend as much as i’d like to.

Next:

  • Need to figure out why a server error message appears and disappears when when the  discard review request button is clicked.

Questions:

  • Any suggestions as to why i’m getting that error message. The message quickly goes away and the page renders fine. Might be something i have to change is datastore.js?

Allyshia Sewdat

Currently:

  • Reviewing comments from review 3435 on JSLint static analysis

Next:

  • Address final comments (mostly style for now)
  • Play with JSLint options to make sure they are in fact being enforced during static analysis (without validating the JSLint tool itself)
  • Do some more local manual testing and look at some enhanced error handling
  • Finalize this first tool

Aamir Mansoor

Currently:

  • Making my way through Markdown Pluggable UI
  • Adding functionality to convert .md files to HTML at the moment
  • Addressing issues/comments from r/3434

Next:

  • Parse Markdown in Django using the “Markdown” package

John Sintal

Currently:

  • Working on rb patch

Roadblocks:

  • I’ve tried looking at some code review requests, and I am finding it tough since I am not familiar with the context of the code. Perhaps I should look for issues with form and style rather than contextual blocks of logic.

Next:

  • Finish rb patch
  • Work on some code reviews

Karl Leuschen

Currently:

  • Working to add key association controls to repository web form

Next:

  • Submit a WIP review request for work on repository form, and possibly submit proper (non-WIP) review request for GitHub and general key association work. Do some code review!

Tina Yang

Currently:

  • Make changes according to feedbacks from the review request

Next:

  • Get binary files to display inline with help from the suggestions from the review request (r/3457)

Questions:

Michelle Chuang

Currently:

  • Addressing code review comments for r/3458
  • Trying to set up a page to view two images side-by-side
  • (Hopefully) wrapping up the fix for issue 2552

Next:

  • Start implementing the different ways to diff images

Sampson Chen

Currently:

  • Posted a revised version of thumbnail rendering for .rst and .md files up for review (screenshot attached)
  • Working a bugfix

Roadblocks:

  • Unsure what to tackle next for my project until I get feedback from mentors

Next:

  • Work on a new part of the thumbnail project
  • Bugfixes in the meantime

Questions:

  • What should I work on next for thumbnail? Any specific file types to investigate next, or add more polish to .rst / .md thumbnails?

Meeting Minutes for October 21st, 2012

Announcements:

Course is approaching half-way point — midterm review and evaluations will be done soon.

Questions / Answers / Tips:

Q (Tina): Any tips to find/evaluate/confirm performance issues?

A: If you suspect a performance regression, usually you want to confirm that suspicion — time an activity a few times, and then time an activity from before the suspected regression hit.

Q (Tina): Specifically on page load, retrieving large amount of data, any there any standards for Review Board that we should be testing for?

A: Yes. Install django-debug-toolbar, and then I’ll give you configuration to put in your settings_local.py. It will help you with seeing page load times, SQL queries, etc. You can also turn on log profiling in your Log Settings, and then pass ?profiling=1 to the URL. It will write a reviewboard.prof file.

Q (Tina): Any past records of the benchmarks/performance stable revisions of reviewboard that we can use as reference?

A: No, we don’t have real benchmarks. Though a lot of work has gone into RB lately to improve performance in general, so right now, it’s about as fast as it’s ever been. Additionally, the WebKit developer tools and Firebug have Javascript profilers for client-side benchmarking.

Q (Michelle): I was wondering how the midterm evaluation is going to work if we haven’t sent many code reviews yet (assuming thats how you monitor our progress)

A: That’s a big part, yes. Your interactions with us over IRC or the mailing list are also part of the (anecdotal) evidence we might use. But yes, patches are really helpful. A WIP patch of whatever you’ve currently got is a good idea. I stressed that last week, and I’ll stress it again — putting up WIP patches is a *great idea*.

Q (Sampson): Aamir, Michelle and I had our projects changed last week, and we’ve been pretty much doing research up until now, I know I’ve not writte much code yet, just looking at docs and looking at RB codebase. How will that be reflected on our evaluation?

A: The project changes will be factored in. Keep in mind that the mid-term eval doesn’t really affect the grade. It’s just a way for you to get a sense of how you’re doing. You still have some time before we start evaluating and if you haven’t yet reached a point where you can produce a patch, you should be struggling to get through that roadblock.

Q (Karl): What’s the RB way to give users feedback if a non-critical problem occurred with a form submission? My reason for asking is, if someone creates a repository and wants to associate an SSH key with it, I can’t think of a reason to make the form invalid if everything _but_ the association works. It doesn’t look like RB uses Django’s messaging middleware (it’s installed though) — is there something else I should use?

A: Produce an error — it’s still a failure. Configuring the repository should involve a successful repository creation, hosting service authentication, repository validation check, and SSH key association.

Q (Karl): Right, but should the Repository not get saved?

A: It should not get saved, correct.

Q (Jesus): Is datastore.js using the Prototype JS framework to deal with method binding?

A: No, we use jQuery and not Prototype.

Q (Jesus): Well, what is code here doing (specifically, the ‘self’ object)?

A: ‘ready’ is just a function we define on that object. The concept we use is, we don’t operate on an object until we’ve loaded from the server. ‘ready’ does that, and takes a callback that’s called when we know we have the data. If we already have the data, we call it directly. The ‘self’ object is a Javascriptism. In Javascript, ‘this’ doesn’t always point to what you’d expect. If we don’t have the ability to say “Preserve ‘this'” when calling a function, we keep our own reference and defining ‘self’ to be this is a common way to do that.

Q (John): Mike suggested I work on ‘review request’ as my next command. Could anyone expound on what exactly it does and what type of args it takes?

A: Steven is already working on ‘review request’ and you should instead look at ‘rb patch’.

Q (Allyshia): Were any automated tests written for the existing ReviewBot pep8 tool? i.e. to ensure the static analysis tool is working properly? Or was it manual testing by uploading reviews and making sure inline comments appear?

A: All testing has been manual thus far. Basically, don’t test the pep8 script. Just test that your tool runs pep8 properly.