Code reviews with Phabricator

By | August 26, 2015

If you work on a project with formal code review process where code should be reviewed either by peers or Team Lead/Senior Developer, you definitely will come to a point where you need good and easy to use tools for tracking code changes and reviews. When source code files are updated by several developers few times per day, you must be Superman to track and review all changes without any tools. We found the tool we like: Phabricator suite. With Phabricator you are able to control all your projects meticulously even if deadline breathes down your neck.

The Phabricator consists of many independent tools. Now we use two of them.

1) ‘Code Review‘ tool that applied mostly to Project Managers or Senior Developers,
2) the ‘Audit‘ tool that applied mostly to Testers.

Phabricator Audit Tool

The code quality control starts from emails’ messages, it is useful and really great. Once your account is registered in the Phabricator suite — you are added to a project and start to receive the messages about all changes into the code database of your project (Pic. 1).

Picture 1. The mailbox. You know about all changes easy and almost instantly.

Picture 1. The mailbox. You know about all changes easy and almost instantly.

While checking your mailbox you notice that new files were added, small bug fixed and others changes happened during last hours. Each letter’s body contains information about developers who made the changes and anchors to review the changes details. In the example it seems the addition of new functionality was happened.

Hmm.. Very interesting. Nobody said or wrote about this“, our tester thought. He opens the WEB-interface and see that new button ‘Sort Items‘ was added. But now he can not only see the button but also able to understand how this button works (or at last ask someone) — Pic. 2, 3.

Picture 2. The Phabricator interface, Differential tool. We see the changes for all affected files.

Picture 2. The Phabricator interface, Differential tool. We see the changes for all affected files.

Picture 3. The new button ‘Sort Items’. It appeared, we do not know how does it work but we could easy know it with Differential tool.

Picture 3. The new button ‘Sort Items’. It appeared, we do not know how does it work but we could easy understand this with Differential tool.

Noteworthy that looking at the button interface give us nothing interesting (Pic. 3). We do not know how the items (rows in the Grid ‘News Ticker‘ on the Pic. 3) actually should be sorted. But the Phabricator let us know about this in few seconds.
Aha, it seems the items are sorted increasing and only by ‘Start Time‘ field“, tester noticed when he looked at the code changes (Pic. 4).

Picture 4. The piece of code changes. Changes are lighted by green.

Picture 4. The piece of code changes. Changes are lighted by green.

Now tester can:
1) prepare new test case based on knowing how new functionality should work,
2) ask the programmer or manager why button ‘Sort Items‘ works only in such case (does it need to add some usability or prompt?).

And tester might leave the comment directly inside Phabricator differential tool. He just clicks on the row number and writes it (Pic. 5). Notice that he did all these operations in about a minute and inside the same application — Phabricator.

Picture 5. Leave your desires inside the Differential tool directly.

Picture 5. Leave your desires inside the Differential tool directly.

Phabricator Code Review Tool

It might be very useful for Manager or Senior programmer who need to control Junior Developers. Each code change is not committed to main branch but waiting while Manager approves it. The screenshot on Pic. 6 shows Senior Programmer fixed ‘Concern Raised‘ state and left comments. Then the Developer changed the code in accordance with demands.

Picture 6. The history shows interaction between the Senior programmer and the Developer.

Picture 6. The history shows interaction between the Senior programmer and the Developer.

We briefly reviewed the two the most brilliant features of the Phabricator suite. ‘Brilliant’ because 1) these features are accessible immediately after including you to the project and 2) no special skills are needed to use these features. That’s why the Phabricator is very useful for Project Managers, Developers and Testers in DevelopEx company.

As always, feel free to contact us for a consultation!

Leave a Reply

Your email address will not be published. Required fields are marked *