<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jyang23</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jyang23"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Jyang23"/>
	<updated>2026-06-05T18:13:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84287</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84287"/>
		<updated>2014-04-07T04:31:52Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the drop off site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
=== Framework ===&lt;br /&gt;
&lt;br /&gt;
In order to add the capability to manage drop off sites information from within the Sahana Eden instance, we have two options: installing a separate package, or integrating this into the Sahana Eden instance. We have decided to use the latter so that :&lt;br /&gt;
&lt;br /&gt;
* We don’t need to define data, like users, locations, organizations, in multiple systems.&lt;br /&gt;
* We can use Sahana Eden’s messaging and mapping capabilities for the drop off sites in the future.&lt;br /&gt;
* The organization module can use drop off sites records of personnel.&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
We have taken two design patterns into consider during our development.&lt;br /&gt;
&lt;br /&gt;
* '''Factory Methods'''&lt;br /&gt;
&lt;br /&gt;
In the controller, we return an s3_rest_controller() method, this  function provides all the Sahana Eden framework support needed to access the resource, including automatic loading of the respective model definitions. With this method, we can have a working module and be able to see the CRUD (Create, Read, Update, Delete) user interface. We could define our own methods to do CRUD of drop off site module. In that case, the code will violate DRY principle. If all contributors to Sahana have done the CRUD themselves, there will be a lot of duplication and the readability of the system will decrease. However, we can replace the deault strings within the CRUD user interface with custom strings. To be specific, we use crud_strings() method in S3 framework to do customizations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def course():&lt;br /&gt;
    return s3_rest_controller()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Oberserver'''&lt;br /&gt;
&lt;br /&gt;
Observer pattern is widely used in GUI systems. By the nature of Model-View-Controller(MVC) architecture, the observer pattern is used to decouple the model from the view. View represents the Observer and the model is the Observable object. This kind of framework can be enhanced in future with new observers with minimal changes.&lt;br /&gt;
&lt;br /&gt;
=== Component ===&lt;br /&gt;
&lt;br /&gt;
As shown above, we'd like to be able to record information relating to staff in each drop off site, such as how long they will be there and contact number etc. To do this, we need to build a 'link' table between the person and the drop off site. The natural way to do this within Sahana Eden is to make the link table a 'component' of the drop off site table. The drop off site is the 'primary resource', and contact person are a 'component' of the course.&lt;br /&gt;
&lt;br /&gt;
To realize the 'component' feature. First, we add a 'represent' function to allow a record in the drop off site table to be represented by its name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code involves using Web2Py's Database Abstraction Layer (DAL) to do a SQL query.The variable db is an instance of the DAL class, which represents a database. Queries are written in a syntax that is much like a Python expression.&lt;br /&gt;
&lt;br /&gt;
Then, we define a 'reusable field' which can be added to other table definitions to provide a foreign key reference to the drop off site table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this uses the represent function which we just defined. It also adds a 'requires' validator function. This provides both server-side validation and a client-side widget (in this case a dropdown of records in the drop off site table).&lt;br /&gt;
&lt;br /&gt;
As to the controller, we don't need to create a separate REST controller to manage the component, since it will always be accessed via the existing drop off site controller, however we must then extend the controller with 2 new elements to allow the Sahana Eden framework to display the component: 'tabs' and an 'rheader'. Tabs are how the framework provides access to the different components in a web page for the primary resource. The 'resource header' is a section of HTML that provides a summary of the primary resource record, in this case the drop off site. This is displayed above the tabs so that when each component record is being viewed, its parent record is also visible at the same time.&lt;br /&gt;
&lt;br /&gt;
We can simply add the following code into the controller model. Here, rheader is simply a variable passed through the REST controller unaltered &amp;amp; then serialized as rheader.xml() in the views.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application can be accessed with the following link: [http://152.46.16.162/eden Sahana Eden Site]&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation Web2py]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/ Python]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/ Jquery]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/ Ext_JS 3.4.0]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84286</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84286"/>
		<updated>2014-04-07T04:24:16Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the drop off site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
=== Framework ===&lt;br /&gt;
&lt;br /&gt;
In order to add the capability to manage drop off sites information from within the Sahana Eden instance, we have two options: installing a separate package, or integrating this into the Sahana Eden instance. We have decided to use the latter so that :&lt;br /&gt;
&lt;br /&gt;
* We don’t need to define data, like users, locations, organizations, in multiple systems.&lt;br /&gt;
* We can use Sahana Eden’s messaging and mapping capabilities for the drop off sites in the future.&lt;br /&gt;
* The organization module can use drop off sites records of personnel.&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
* '''Factory Methods'''&lt;br /&gt;
&lt;br /&gt;
In the controller, we return an s3_rest_controller() method, this  function provides all the Sahana Eden framework support needed to access the resource, including automatic loading of the respective model definitions. With this method, we can have a working module and be able to see the CRUD (Create, Read, Update, Delete) user interface. We could define our own methods to do CRUD of drop off site module. In that case, the code will violate DRY principle. If all contributors to Sahana have done the CRUD themselves, there will be a lot of duplication and the readability of the system will decrease. However, we can replace the deault strings within the CRUD user interface with custom strings. To be specific, we use crud_strings() method in S3 framework to do customizations.&lt;br /&gt;
&lt;br /&gt;
* '''Oberserver'''&lt;br /&gt;
&lt;br /&gt;
Observer pattern is widely used in GUI systems. By the nature of Model-View-Controller(MVC) architecture, the observer pattern is used to decouple the model from the view. View represents the Observer and the model is the Observable object. This kind of framework can be enhanced in future with new observers with minimal changes.&lt;br /&gt;
&lt;br /&gt;
=== Component ===&lt;br /&gt;
&lt;br /&gt;
As shown above, we'd like to be able to record information relating to staff in each drop off site, such as how long they will be there and contact number etc. To do this, we need to build a 'link' table between the person and the drop off site. The natural way to do this within Sahana Eden is to make the link table a 'component' of the drop off site table. The drop off site is the 'primary resource', and contact person are a 'component' of the course.&lt;br /&gt;
&lt;br /&gt;
To realize the 'component' feature. First, we add a 'represent' function to allow a record in the drop off site table to be represented by its name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code involves using Web2Py's Database Abstraction Layer (DAL) to do a SQL query.The variable db is an instance of the DAL class, which represents a database. Queries are written in a syntax that is much like a Python expression.&lt;br /&gt;
&lt;br /&gt;
Then, we define a 'reusable field' which can be added to other table definitions to provide a foreign key reference to the drop off site table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this uses the represent function which we just defined. It also adds a 'requires' validator function. This provides both server-side validation and a client-side widget (in this case a dropdown of records in the drop off site table).&lt;br /&gt;
&lt;br /&gt;
As to the controller, we don't need to create a separate REST controller to manage the component, since it will always be accessed via the existing drop off site controller, however we must then extend the controller with 2 new elements to allow the Sahana Eden framework to display the component: 'tabs' and an 'rheader'. Tabs are how the framework provides access to the different components in a web page for the primary resource. The 'resource header' is a section of HTML that provides a summary of the primary resource record, in this case the drop off site. This is displayed above the tabs so that when each component record is being viewed, its parent record is also visible at the same time.&lt;br /&gt;
&lt;br /&gt;
We can simply add the following code into the controller model. Here, rheader is simply a variable passed through the REST controller unaltered &amp;amp; then serialized as rheader.xml() in the views.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application can be accessed with the following link: [http://152.46.16.162/eden Sahana Eden Site]&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation Web2py]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/ Python]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/ Jquery]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/ Ext_JS 3.4.0]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84285</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84285"/>
		<updated>2014-04-07T04:16:54Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the drop off site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
=== Framework ===&lt;br /&gt;
&lt;br /&gt;
In order to add the capability to manage drop off sites information from within the Sahana Eden instance, we have two options: installing a separate package, or integrating this into the Sahana Eden instance. We have decided to use the latter so that :&lt;br /&gt;
&lt;br /&gt;
* We don’t need to define data, like users, locations, organizations, in multiple systems.&lt;br /&gt;
* We can use Sahana Eden’s messaging and mapping capabilities for the drop off sites in the future.&lt;br /&gt;
* The organization module can use drop off sites records of personnel.&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
* '''Factory Methods'''&lt;br /&gt;
&lt;br /&gt;
In the controller, we return an s3_rest_controller() method, this  function provides all the Sahana Eden framework support needed to access the resource, including automatic loading of the respective model definitions. We could define our own methods to do CRUD of drop off site module. In that case, the code will violate DRY principle. If all contributors to Sahana have done the CRUD themselves, there will be a lot of duplication and the readability of the system will decrease. However, we can replace the deault strings within the CRUD user interface with custom strings. To be specific, we use crud_strings() method in S3 framework to do customizations.&lt;br /&gt;
&lt;br /&gt;
* '''Oberserver'''&lt;br /&gt;
&lt;br /&gt;
Observer pattern is widely used in GUI systems. By the nature of Model-View-Controller(MVC) architecture, the observer pattern is used to decouple the model from the view. View represents the Observer and the model is the Observable object. This kind of framework can be enhanced in future with new observers with minimal changes.&lt;br /&gt;
&lt;br /&gt;
=== Component ===&lt;br /&gt;
&lt;br /&gt;
As shown above, we'd like to be able to record information relating to staff in each drop off site, such as how long they will be there and contact number etc. To do this, we need to build a 'link' table between the person and the drop off site. The natural way to do this within Sahana Eden is to make the link table a 'component' of the drop off site table. The drop off site is the 'primary resource', and contact person are a 'component' of the course.&lt;br /&gt;
&lt;br /&gt;
To realize the 'component' feature. First, we add a 'represent' function to allow a record in the drop off site table to be represented by its name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code involves using Web2Py's Database Abstraction Layer (DAL) to do a SQL query.The variable db is an instance of the DAL class, which represents a database. Queries are written in a syntax that is much like a Python expression.&lt;br /&gt;
&lt;br /&gt;
Then, we define a 'reusable field' which can be added to other table definitions to provide a foreign key reference to the drop off site table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this uses the represent function which we just defined. It also adds a 'requires' validator function. This provides both server-side validation and a client-side widget (in this case a dropdown of records in the drop off site table).&lt;br /&gt;
&lt;br /&gt;
As to the controller, we don't need to create a separate REST controller to manage the component, since it will always be accessed via the existing drop off site controller, however we must then extend the controller with 2 new elements to allow the Sahana Eden framework to display the component: 'tabs' and an 'rheader'. Tabs are how the framework provides access to the different components in a web page for the primary resource. The 'resource header' is a section of HTML that provides a summary of the primary resource record, in this case the drop off site. This is displayed above the tabs so that when each component record is being viewed, its parent record is also visible at the same time.&lt;br /&gt;
&lt;br /&gt;
We can simply add the following code into the controller model. Here, rheader is simply a variable passed through the REST controller unaltered &amp;amp; then serialized as rheader.xml() in the views.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application can be accessed with the following link: [http://152.46.16.162/eden Sahana Eden Site]&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation Web2py]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/ Python]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/ Jquery]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/ Ext_JS 3.4.0]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84284</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84284"/>
		<updated>2014-04-07T04:04:18Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the drop off site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
=== Framework ===&lt;br /&gt;
&lt;br /&gt;
In order to add the capability to manage drop off sites information from within the Sahana Eden instance, we have two options: installing a separate package, or integrating this into the Sahana Eden instance. We have decided to use the latter so that :&lt;br /&gt;
&lt;br /&gt;
* We don’t need to define data, like users, locations, organizations, in multiple systems.&lt;br /&gt;
* We can use Sahana Eden’s messaging and mapping capabilities for the drop off sites in the future.&lt;br /&gt;
* The organization module can use drop off sites records of personnel.&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
* '''Factory Methods'''&lt;br /&gt;
&lt;br /&gt;
In the controller, we return an s3_rest_controller() method, this  function provides all the Sahana Eden framework support needed to access the resource, including automatic loading of the respective model definitions. We could define our own methods to do CRUD of drop off site module. In that case, the code will violate DRY principle. If all contributors to Sahana have done the CRUD themselves, there will be a lot of duplication and the readability of the system will decrease. However, we can replace the deault strings within the CRUD user interface with custom strings. To be specific, we use crud_strings() method in S3 framework to do customizations.&lt;br /&gt;
&lt;br /&gt;
* '''Oberserver'''&lt;br /&gt;
&lt;br /&gt;
Observer pattern is widely used in GUI systems. By the nature of Model-View-Controller(MVC) architecture, the observer pattern is used to decouple the model from the view. View represents the Observer and the model is the Observable object. This kind of framework can be enhanced in future with new observers with minimal changes.&lt;br /&gt;
&lt;br /&gt;
=== Component ===&lt;br /&gt;
&lt;br /&gt;
As shown above, we'd like to be able to record information relating to staff in each drop off site, such as how long they will be there and contact number etc. To do this, we need to build a 'link' table between the person and the drop off site. The natural way to do this within Sahana Eden is to make the link table a 'component' of the drop off site table. The drop off site is the 'primary resource', and contact person are a 'component' of the course.&lt;br /&gt;
&lt;br /&gt;
There is no need to create a separate REST controller to manage the component, since it will always be accessed via the existing drop off site controller, however we must then extend the controller with 2 new elements to allow the Sahana Eden framework to display the component: 'tabs' and an 'rheader'. Tabs are how the framework provides access to the different components in a web page for the primary resource. The 'resource header' is a section of HTML that provides a summary of the primary resource record, in this case the drop off site. This is displayed above the tabs so that when each component record is being viewed, its parent record is also visible at the same time.&lt;br /&gt;
&lt;br /&gt;
To realize the 'component' feature. First, we add a 'represent' function to allow a record in the drop off site table to be represented by its name.&lt;br /&gt;
&lt;br /&gt;
Tip: This involves using Web2Py's Database Abstraction Layer (DAL) to do a SQL query.The variable db is an instance of the DAL class, which represents a database. Queries are written in a syntax that is much like a Python expression, but not quite. Look at the Web2Py book (http://web2py.com/book) for more on the DAL.&lt;br /&gt;
&lt;br /&gt;
Define a 'reusable field' which can be added to other table definitions to provide a foreign key reference to the course table&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application can be accessed with the following link: [http://152.46.16.162/eden Sahana Eden Site]&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation Web2py]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/ Python]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/ Jquery]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/ Ext_JS 3.4.0]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84274</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84274"/>
		<updated>2014-04-05T01:14:56Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the drop off site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
=== Framework ===&lt;br /&gt;
&lt;br /&gt;
In order to add the capability to manage drop off sites information from within the Sahana Eden instance, we have two options: installing a separate package, or integrating this into the Sahana Eden instance. We have decided to use the latter so that :&lt;br /&gt;
&lt;br /&gt;
* We don’t need to define data, like users, locations, organizations, in multiple systems.&lt;br /&gt;
* We can use Sahana Eden’s messaging and mapping capabilities for the drop off sites in the future.&lt;br /&gt;
* The organization module can use drop off sites records of personnel.&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
* '''Factory Methods'''&lt;br /&gt;
&lt;br /&gt;
In the controller, we return an s3_rest_controller() method, this  function provides all the Sahana Eden framework support needed to access the resource, including automatic loading of the respective model definitions. We could define our own methods to do CRUD of drop off site module. In that case, the code will violate DRY principle. If all contributors to Sahana have done the CRUD themselves, there will be a lot of duplication and the readability of the system will decrease. However, we can replace the deault strings within the CRUD user interface with custom strings. To be specific, we use crud_strings() method in S3 framework to do customizations.&lt;br /&gt;
&lt;br /&gt;
* '''Oberserver'''&lt;br /&gt;
&lt;br /&gt;
Observer pattern is widely used in GUI systems. By the nature of Model-View-Controller(MVC) architecture, the observer pattern is used to decouple the model from the view. View represents the Observer and the model is the Observable object. This kind of framework can be enhanced in future with new observers with minimal changes.&lt;br /&gt;
&lt;br /&gt;
=== Component ===&lt;br /&gt;
&lt;br /&gt;
As shown above, we'd like to be able to record information relating to staff in each drop off site, such as how long they will be there and contact number etc. To do this, we need to build a 'link' table between the person and the drop off site. The natural way to do this within Sahana Eden is to make the link table a 'component' of the drop off site table. The drop off site is the 'primary resource', and contact person are a 'component' of the course.&lt;br /&gt;
&lt;br /&gt;
There is no need to create a separate REST controller to manage the component, since it will always be accessed via the existing course controller, however we must then extend the controller with 2 new elements to allow the Sahana Eden framework to display the component: 'tabs' and an 'rheader'. Tabs are how the framework provides access to the different components in a web page for the primary resource. The 'resource header' is a section of HTML that provides a summary of the primary resource record, in this case the course. This is displayed above the tabs so that when each component record is being viewed, its parent record is also visible at the same time.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation Web2py]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/ Python]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/ Jquery]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/ Ext_JS 3.4.0]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84273</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84273"/>
		<updated>2014-04-04T04:26:27Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the drop off site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
=== Framework ===&lt;br /&gt;
&lt;br /&gt;
In order to add the capability to manage drop off sites information from within the Sahana Eden instance, we have two options: installing a separate package, or integrating this into the Sahana Eden instance. We have decided to use the latter so that :&lt;br /&gt;
&lt;br /&gt;
* We don’t need to define data, like users, locations, organizations, in multiple systems.&lt;br /&gt;
* We can use Sahana Eden’s messaging and mapping capabilities for the drop off sites in the future.&lt;br /&gt;
* The organization module can use drop off sites records of personnel.&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
* '''Factory Methods'''&lt;br /&gt;
&lt;br /&gt;
In the controller, we return an s3_rest_controller() method, this  function provides all the Sahana Eden framework support needed to access the resource, including automatic loading of the respective model definitions. We could define our own methods to do CRUD of drop off site module. In that case, the code will violate DRY principle. If all contributors to Sahana have done the CRUD themselves, there will be a lot of duplication and the readability of the system will decrease. However, we can replace the deault strings within the CRUD user interface with custom strings. To be specific, we use crud_strings() method in S3 framework to do customizations.&lt;br /&gt;
&lt;br /&gt;
* '''Oberserver'''&lt;br /&gt;
&lt;br /&gt;
Observer pattern is widely used in GUI systems. By the nature of Model-View-Controller(MVC) architecture, the observer pattern is used to decouple the model from the view. View represents the Observer and the model is the Observable object. This kind of framework can be enhanced in future with new observers with minimal changes.&lt;br /&gt;
&lt;br /&gt;
=== Component ===&lt;br /&gt;
&lt;br /&gt;
We'd like to be able to record information relating to each participant in the course, such as whether they actually attended and what grade they attained.&lt;br /&gt;
&lt;br /&gt;
To do this, we need to build a 'link' table between the participants and the course.&lt;br /&gt;
&lt;br /&gt;
The natural way to do this within Sahana Eden is to make the link table a 'component' of the course. The course is the 'primary resource', and participants are a 'component' of the course.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation Web2py]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/ Python]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/ Jquery]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/ Ext_JS 3.4.0]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84188</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84188"/>
		<updated>2014-03-31T21:39:25Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Further Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the dropoff site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation Web2py]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/ Python]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/ Jquery]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/ Ext_JS 3.4.0]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84187</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84187"/>
		<updated>2014-03-31T21:23:46Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Drop Off Site Feature */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the dropoff site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Deliverables ==&lt;br /&gt;
&lt;br /&gt;
We go through one use case to see how the system handles a drop off site information collection.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Accessing &amp;quot;DropOff Site&amp;quot; from the main menu&lt;br /&gt;
&lt;br /&gt;
[[File:Ss1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After click on the menu, we will see a welcome page first. This page gives users a brief introduction of what is drop off site and how does it works.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss2.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;list of drop off site&amp;quot; link, we'll see a list of drop off sites with their detail information. Then we can add a new record by clicking the button &amp;quot;Adding a Record&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fill in the table with detail. Notice that here when you fill in the person name, you can look up their name by enter part of their name.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss4.png]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* After successfully add a new record, we can go back to see the new drop off site information.&lt;br /&gt;
&lt;br /&gt;
[[File:Ss5.png]]&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss5.png&amp;diff=84186</id>
		<title>File:Ss5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss5.png&amp;diff=84186"/>
		<updated>2014-03-31T21:22:43Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss4.png&amp;diff=84185</id>
		<title>File:Ss4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss4.png&amp;diff=84185"/>
		<updated>2014-03-31T21:11:52Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: DropOffSite Snapshot4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DropOffSite Snapshot4&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss3.png&amp;diff=84184</id>
		<title>File:Ss3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss3.png&amp;diff=84184"/>
		<updated>2014-03-31T21:11:22Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: DropOffSite Snapshot3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DropOffSite Snapshot3&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss2.png&amp;diff=84183</id>
		<title>File:Ss2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss2.png&amp;diff=84183"/>
		<updated>2014-03-31T21:08:28Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: DropOffSite Snapshot2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DropOffSite Snapshot2&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss1.png&amp;diff=84182</id>
		<title>File:Ss1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Ss1.png&amp;diff=84182"/>
		<updated>2014-03-31T21:06:37Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: DropOffSite Snapshot1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DropOffSite Snapshot1&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84181</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84181"/>
		<updated>2014-03-31T20:59:29Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the dropoff site. An organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;. A dropOffSite table has six attributes: name, flyer, comments, startTime and endTime which indicates the time period the site will be open for donation, and personId as a foreign key to person table.&lt;br /&gt;
&lt;br /&gt;
[[File:SahanaER.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Define dropOtffSite table in our new models and its relationship with person table and organization table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tablename = &amp;quot;dosite_place&amp;quot;&lt;br /&gt;
table = db.define_table(tablename,&lt;br /&gt;
            Field(&amp;quot;name&amp;quot;, notnull=True, length=64, label=T(&amp;quot;Place Name&amp;quot;)),&lt;br /&gt;
            s3db.pr_person_id(label=T(&amp;quot;Place Contact&amp;quot;)),&lt;br /&gt;
            Field(&amp;quot;flyer&amp;quot;, &amp;quot;upload&amp;quot;,label=T(&amp;quot;Flyer Propaganda&amp;quot;)),&lt;br /&gt;
            s3_comments(),&lt;br /&gt;
            s3base.s3_date(&amp;quot;start_date&amp;quot;,label=&amp;quot;Collection Start Date&amp;quot;),&lt;br /&gt;
            s3base.s3_date(&amp;quot;end_date&amp;quot;,label=&amp;quot;Collection End Date&amp;quot;),&lt;br /&gt;
            *s3_meta_fields()&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
def place_represent(id):&lt;br /&gt;
    table = db.dosite_place&lt;br /&gt;
    query = (table.id == id)&lt;br /&gt;
    record = db(query).select().first()&lt;br /&gt;
    if record:&lt;br /&gt;
        return record.name&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;-&amp;quot;&lt;br /&gt;
&lt;br /&gt;
place_id = S3ReusableField(&amp;quot;place_id&amp;quot;, db.dosite_place,&lt;br /&gt;
                    requires = IS_ONE_OF(db,&lt;br /&gt;
                                     &amp;quot;dosite_place.id&amp;quot;,&lt;br /&gt;
                                     &amp;quot;%(name)s&amp;quot;),&lt;br /&gt;
                    represent = place_represent,&lt;br /&gt;
                    label = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
                    ondelete = &amp;quot;RESTRICT&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add editable features to the the Drop Off Site list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LIST_PLACE =  T(&amp;quot;List Drop-Off Sites&amp;quot;)&lt;br /&gt;
s3.crud_strings[tablename] = Storage(&lt;br /&gt;
   title_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   title_display = T(&amp;quot;Place Details&amp;quot;),&lt;br /&gt;
   title_list = LIST_PLACE,&lt;br /&gt;
   title_update = T(&amp;quot;Edit Place&amp;quot;),&lt;br /&gt;
   title_search = T(&amp;quot;Search Place&amp;quot;),&lt;br /&gt;
   title_upload = T(&amp;quot;Import Place&amp;quot;),&lt;br /&gt;
   subtitle_create = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   subtitle_list = T(&amp;quot;Place&amp;quot;),&lt;br /&gt;
   label_list_button = LIST_PLACE,&lt;br /&gt;
   label_create_button = T(&amp;quot;Add New Place&amp;quot;),&lt;br /&gt;
   label_delete_button = T(&amp;quot;Delete Place&amp;quot;),&lt;br /&gt;
   msg_record_created = T(&amp;quot;Place added&amp;quot;),&lt;br /&gt;
   msg_record_modified = T(&amp;quot;Place updated&amp;quot;),&lt;br /&gt;
   msg_record_deleted = T(&amp;quot;Place deleted&amp;quot;),&lt;br /&gt;
   msg_list_empty = T(&amp;quot;No Place currently registered&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Customized the view in controller so that it fits Sahana Eden's standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def place_rheader(r, tabs=[]):&lt;br /&gt;
    if r.representation != &amp;quot;html&amp;quot;:&lt;br /&gt;
        # RHeader is a UI facility &amp;amp; so skip for other formats&lt;br /&gt;
        return None&lt;br /&gt;
    if r.record is None:&lt;br /&gt;
        # List or Create form: rheader makes no sense here&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    rheader_tabs = s3_rheader_tabs(r, tabs)&lt;br /&gt;
&lt;br /&gt;
    place = r.record&lt;br /&gt;
&lt;br /&gt;
    rheader = DIV(TABLE(&lt;br /&gt;
        TR(&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Name&amp;quot;)),&lt;br /&gt;
            place.name,&lt;br /&gt;
            TH(&amp;quot;%s: &amp;quot; % T(&amp;quot;Start Date&amp;quot;)),&lt;br /&gt;
            place.start_date,&lt;br /&gt;
            )&lt;br /&gt;
        ), rheader_tabs)&lt;br /&gt;
&lt;br /&gt;
    return rheader&lt;br /&gt;
&lt;br /&gt;
def place():&lt;br /&gt;
    return s3_rest_controller(rheader=place_rheader)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Drop Off Site Feature ==&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SahanaER.png&amp;diff=84179</id>
		<title>File:SahanaER.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SahanaER.png&amp;diff=84179"/>
		<updated>2014-03-31T20:35:13Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: drop off site ER&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;drop off site ER&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ER.png&amp;diff=84131</id>
		<title>File:ER.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ER.png&amp;diff=84131"/>
		<updated>2014-03-31T15:09:22Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: uploaded a new version of &amp;amp;quot;File:ER.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sahana ER diagram&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ER.png&amp;diff=84130</id>
		<title>File:ER.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ER.png&amp;diff=84130"/>
		<updated>2014-03-31T15:08:40Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: uploaded a new version of &amp;amp;quot;File:ER.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sahana ER diagram&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ER.png&amp;diff=84129</id>
		<title>File:ER.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ER.png&amp;diff=84129"/>
		<updated>2014-03-31T15:07:55Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: Sahana ER diagram&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sahana ER diagram&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84127</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84127"/>
		<updated>2014-03-31T14:50:29Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background == &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
== Technique Overview == &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web2py ===&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== S3 Framework ===&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
== Design == &lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the dropoff site.&lt;br /&gt;
&lt;br /&gt;
We assign an organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Drop Off Site Feature ==&lt;br /&gt;
&lt;br /&gt;
== Future Work == &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84125</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84125"/>
		<updated>2014-03-31T07:42:09Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Background = &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters).&amp;lt;ref&amp;gt;http://sahanafoundation.org/products/eden/&amp;lt;/ref&amp;gt; This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation&amp;lt;ref&amp;gt;http://sahanafoundation.org/about-us/&amp;lt;/ref&amp;gt; whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
= Motivation =&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionality.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, GIS mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
= Technique Overview = &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Web2py ==&lt;br /&gt;
&lt;br /&gt;
Web2py&amp;lt;ref&amp;gt;http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442&amp;lt;/ref&amp;gt; is an open source framework, licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller(MVC)]  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python&amp;lt;ref&amp;gt;https://www.python.org/&amp;lt;/ref&amp;gt; was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geo-spatial Information Systems (GIS).&amp;lt;ref&amp;gt;http://www.gis.usu.edu/~chrisg/python/2009/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== S3 Framework ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework.&amp;lt;ref&amp;gt;http://en.flossmanuals.net/sahana-eden/technical-overview/&amp;lt;/ref&amp;gt; This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
= Design = &lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the dropoff site.&lt;br /&gt;
&lt;br /&gt;
We assign an organization to each drop off sites, and one organization can have different representative for each site. Both of them are many-to-one relationship&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Relational_database&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
&lt;br /&gt;
= Drop Off Site Feature =&lt;br /&gt;
&lt;br /&gt;
= Future Work = &lt;br /&gt;
&lt;br /&gt;
Based on the information we have now for Drop Off Site. We plan to add a location attribute to this table so that we can map this location information to mapping feature of Sahana. &lt;br /&gt;
&lt;br /&gt;
Sahana has a fully integrated mapping functionality which allows any location-based data to be visualized on a map. What we can do is to add a layer on the map. When user want to view drop off site information, one can select &amp;quot;Drop off sites&amp;quot; label besides the map, then he will see some marked location on map which indicates available sites. When we click on these marked places, information about the sites, including detailed address and contact number will be available for users in a small text field.&lt;br /&gt;
&lt;br /&gt;
= Further Reading = &lt;br /&gt;
&lt;br /&gt;
* [http://web2py.com/init/default/documentation]&lt;br /&gt;
&lt;br /&gt;
* [http://diveintopython.org/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.jquery.com/]&lt;br /&gt;
&lt;br /&gt;
* [http://docs.sencha.com/ext-js/3-4/]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84124</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84124"/>
		<updated>2014-03-31T07:04:07Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Background = &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters). This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
= Motivation =&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionalities.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, gis mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
= Technique Overview = &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Web2py ==&lt;br /&gt;
&lt;br /&gt;
Web2py is an open source framework,  licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the Model View Controller (MVC)  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
Because Sahana Eden needs to be accessible to users at remote locations, including the public, a browser-based solution was essential. The system also needs to be able to be used on offline laptops, so it needs to run on a lightweight stack.&lt;br /&gt;
&lt;br /&gt;
Python was selected as a suitable high level language allowing the rapid customization of code required for each individual circumstance yet has a large number of powerful libraries available including for Geospatial Information Systems (GIS).&lt;br /&gt;
&lt;br /&gt;
== S3 Framework ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Software Platform(S3) has been built around a Rapid Application Development (RAD) Framework. This provides a high level of automation to ensure that new solutions can be quickly and effectively developed. Once a database table is defined, the Sahana Eden Framework automatically generates HTML pages to handle CRUD (Create, Read, Update, Delete) as well as Search, Map and Pivot Reports. Web Services are available to import and export in XML, CSV, JSON and EXtensible Stylesheet Language (XSL) transforms are supported to produce other data standards.&lt;br /&gt;
&lt;br /&gt;
The Sahana Eden Framework has flexible authorization policies which can be configured to grant permissions for different modules, tables as well as the ability to have multiple Organizations control their own data on a single Sahana Eden installation.&lt;br /&gt;
&lt;br /&gt;
= Design = &lt;br /&gt;
&lt;br /&gt;
This is a basic relation established on the system between the place and the contact for the dropoff site.&lt;br /&gt;
&lt;br /&gt;
We assign an organization to each drop off sites, and one organization can have different representatives for each site.&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84123</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84123"/>
		<updated>2014-03-31T06:48:15Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Technique Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Background = &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters). This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
= Motivation =&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionalities.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, gis mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
= Technique Overview = &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Web2py ==&lt;br /&gt;
&lt;br /&gt;
Web2py is an open source framework,  licensed under the LGPL version 3 License,  developed and interpreted with the Python language and agile concept development that follows good software engineering practices.  It is based on the Model View Controller (MVC)  pattern.  It also includes a Database Abstraction Layer (DAL) that writes SQL dynamically so the communication between the application and any database will be transparent.  Since this framework includes various options in security, data access control, input validation on forms, it is been said that is built for security, because the framework addresses many of these issues. &lt;br /&gt;
&lt;br /&gt;
== S3 Framework ==&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84122</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84122"/>
		<updated>2014-03-31T06:46:46Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Background = &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters). This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
= Motivation =&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionalities.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, gis mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
= Technique Overview = &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Web Server&lt;br /&gt;
|  Apache || Other web servers can also be used, such as Cherokee.&lt;br /&gt;
|-&lt;br /&gt;
! Application&lt;br /&gt;
| Sahana Eden || &lt;br /&gt;
|-&lt;br /&gt;
! Web Framework&lt;br /&gt;
| Web2py || &lt;br /&gt;
|-&lt;br /&gt;
! Programming Language&lt;br /&gt;
| Python &amp;amp; Java Script || &lt;br /&gt;
|-&lt;br /&gt;
! Database&lt;br /&gt;
| MySQL, PostgreSQL, or SQLite || MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.&lt;br /&gt;
|-&lt;br /&gt;
! Operating System&lt;br /&gt;
| Linux (Debian recommended) || Windows and Mac OS X are possible, but only recommended for single-user environments.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84121</id>
		<title>CSC/ECE 517 Spring 2014/oss S1402 jyy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/oss_S1402_jyy&amp;diff=84121"/>
		<updated>2014-03-31T06:37:31Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: Created page with &amp;quot;This project is developed as a contribution to Sahana Software Foundation (Eden). right  = Background =   Sahana Eden is an open source software project that ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
[[File:sahana.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
= Background = &lt;br /&gt;
&lt;br /&gt;
Sahana Eden is an open source software project that provides effective solutions for critical humanitarian needs management either prior to or during a crisis (mainly disasters). This platform has a rich feature set which can be rapidly customized to adapt to existing process and integrate with existing systems.  &lt;br /&gt;
&lt;br /&gt;
Sahana Eden’s features are designed to help emergency management practitioners to better mitigate, prepare for, respond to and recover from disasters more effectively and efficiently. With this logistic software, strategic planning and the deployment of efforts of human resources and supplies to victims is handled in an efficient manner. It coordinates the information of all the components required to relieve in some way the pain of the affected victims.&lt;br /&gt;
&lt;br /&gt;
Sahana Eden is supported by Sahana Software Foundation whose mission it to save lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters. This is a voluntary community consisted of disaster management practitioners, academics, companies and students.   &lt;br /&gt;
&lt;br /&gt;
= Motivation =&lt;br /&gt;
&lt;br /&gt;
Sahana Eden provides a wide range of functionalities.  Its main capabilities include organization registry, project tracking, human resources management, inventory&amp;amp;assets tracking, assessments, shelter management, scenario&amp;amp;events planning, gis mapping, messaging, etc. &lt;br /&gt;
&lt;br /&gt;
Among all the features, inventory tracking keep records of shipments; supports multiple catalogs of items; and allow organization to manage requests, donations and warehouse. However, we found that the systems does not have place where we can track some “Drop Off Sites” for collection of supplies in minor disasters or during our daily life. These drop off sites can  convenience stores, supermarket, hospitals, etc. People can donate supplies to one of these sites which might be most convenient for them and the organizations then can collect useful goods themselves. After talking with one of the managers from Sahana Software Foundation, we decide to add this new feature to the system.&lt;br /&gt;
&lt;br /&gt;
= Technique Overview = &lt;br /&gt;
&lt;br /&gt;
The basic Sahana Eden architecture is as follows:&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014&amp;diff=84120</id>
		<title>CSC/ECE 517 Spring 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014&amp;diff=84120"/>
		<updated>2014-03-31T06:28:49Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE_517_Fall_2012/example_page]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1a 1e rm]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1 1w1h jg ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1 1w1b np]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1 1w1f mj]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1a 1d mm]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1a 1c yj]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1 1w1l m]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1 1w1m bm]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/ch1a 1p fy]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/oss E1401 lmn]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/oss E1402 mmb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/oss E1404 mnp]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/oss E1406 st]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2014/oss S1402 jyy]]&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83323</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83323"/>
		<updated>2014-02-11T04:24:15Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools&amp;lt;ref&amp;gt;http://getbarkeep.org/&amp;lt;/ref&amp;gt;. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction.&amp;lt;ref&amp;gt;https://github.com/ooyala/barkeep/wiki/Comparing-Barkeep-to-other-code-review-tools&amp;lt;/ref&amp;gt; Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time&amp;lt;ref&amp;gt;http://getbarkeep.org/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&amp;lt;ref&amp;gt;http://www.sitepoint.com/code-metrics-and-you/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&amp;lt;ref&amp;gt;http://www.sitepoint.com/code-metrics-and-you/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis.&amp;lt;ref&amp;gt;http://blog.8thcolor.com/2013/09/pullreview-reach-your-ruby-code-skill-walhalla/&amp;lt;/ref&amp;gt; It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods.&amp;lt;ref&amp;gt;http://blog.martyandrews.net/2008/09/roodi-checkstyle-for-ruby.html&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Crucible_(software)&amp;lt;/ref&amp;gt;. Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles&amp;lt;ref&amp;gt;https://www.atlassian.com/software/crucible/overview &amp;lt;/ref&amp;gt;. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review&amp;lt;ref&amp;gt;https://confluence.atlassian.com/display/CRUCIBLE/The+Crucible+workflow&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool.&amp;lt;ref&amp;gt;http://code.google.com/p/jupiter-eclipse-plugin/wiki/UserGuide&amp;lt;/ref&amp;gt; It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4&amp;lt;ref&amp;gt;http://www.reviewboard.org/docs/manual/dev/users/getting-started/workflow/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service.&amp;lt;ref&amp;gt;https://developers.google.com/appengine/articles/rietveld?hl=zh-cn&amp;lt;/ref&amp;gt; It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Code_review Code Review]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Static_program_analysis Static program analysis]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Software_inspection Software inspection]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Debugging Debugging]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_gems Ruby Gems]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83319</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83319"/>
		<updated>2014-02-11T04:13:51Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools&amp;lt;ref&amp;gt;http://getbarkeep.org/&amp;lt;/ref&amp;gt;. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction.&amp;lt;ref&amp;gt;https://github.com/ooyala/barkeep/wiki/Comparing-Barkeep-to-other-code-review-tools&amp;lt;/ref&amp;gt; Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time&amp;lt;ref&amp;gt;http://getbarkeep.org/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&amp;lt;ref&amp;gt;http://www.sitepoint.com/code-metrics-and-you/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&amp;lt;ref&amp;gt;http://www.sitepoint.com/code-metrics-and-you/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis.&amp;lt;ref&amp;gt;http://blog.8thcolor.com/2013/09/pullreview-reach-your-ruby-code-skill-walhalla/&amp;lt;/ref&amp;gt; It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods.&amp;lt;ref&amp;gt;http://blog.martyandrews.net/2008/09/roodi-checkstyle-for-ruby.html&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Crucible_(software)&amp;lt;/ref&amp;gt;. Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles&amp;lt;ref&amp;gt;https://www.atlassian.com/software/crucible/overview &amp;lt;/ref&amp;gt;. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review&amp;lt;ref&amp;gt;https://confluence.atlassian.com/display/CRUCIBLE/The+Crucible+workflow&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool.&amp;lt;ref&amp;gt;http://code.google.com/p/jupiter-eclipse-plugin/wiki/UserGuide&amp;lt;/ref&amp;gt; It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4&amp;lt;ref&amp;gt;http://www.reviewboard.org/docs/manual/dev/users/getting-started/workflow/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service.&amp;lt;ref&amp;gt;https://developers.google.com/appengine/articles/rietveld?hl=zh-cn&amp;lt;/ref&amp;gt; It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83315</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83315"/>
		<updated>2014-02-11T04:10:07Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction.&amp;lt;ref&amp;gt;https://github.com/ooyala/barkeep/wiki/Comparing-Barkeep-to-other-code-review-tools&amp;lt;/ref&amp;gt; Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time&amp;lt;ref&amp;gt;http://getbarkeep.org/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&amp;lt;ref&amp;gt;http://www.sitepoint.com/code-metrics-and-you/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&amp;lt;ref&amp;gt;http://www.sitepoint.com/code-metrics-and-you/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis.&amp;lt;ref&amp;gt;http://blog.8thcolor.com/2013/09/pullreview-reach-your-ruby-code-skill-walhalla/&amp;lt;/ref&amp;gt; It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods.&amp;lt;ref&amp;gt;http://blog.martyandrews.net/2008/09/roodi-checkstyle-for-ruby.html&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Crucible_(software)&amp;lt;/ref&amp;gt;. Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles&amp;lt;ref&amp;gt;https://www.atlassian.com/software/crucible/overview &amp;lt;/ref&amp;gt;. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review&amp;lt;ref&amp;gt;https://confluence.atlassian.com/display/CRUCIBLE/The+Crucible+workflow&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool.&amp;lt;ref&amp;gt;http://code.google.com/p/jupiter-eclipse-plugin/wiki/UserGuide&amp;lt;/ref&amp;gt; It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service.&amp;lt;ref&amp;gt;https://developers.google.com/appengine/articles/rietveld?hl=zh-cn&amp;lt;/ref&amp;gt; It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83312</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83312"/>
		<updated>2014-02-11T04:06:15Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* PullReview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time&amp;lt;ref&amp;gt;http://getbarkeep.org/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis.&amp;lt;ref&amp;gt;http://blog.8thcolor.com/2013/09/pullreview-reach-your-ruby-code-skill-walhalla/&amp;lt;/ref&amp;gt; It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods.&amp;lt;ref&amp;gt;http://blog.martyandrews.net/2008/09/roodi-checkstyle-for-ruby.html&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Crucible_(software)&amp;lt;/ref&amp;gt;. Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles&amp;lt;ref&amp;gt;https://www.atlassian.com/software/crucible/overview &amp;lt;/ref&amp;gt;. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review&amp;lt;ref&amp;gt;https://confluence.atlassian.com/display/CRUCIBLE/The+Crucible+workflow&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool.&amp;lt;ref&amp;gt;http://code.google.com/p/jupiter-eclipse-plugin/wiki/UserGuide&amp;lt;/ref&amp;gt; It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service.&amp;lt;ref&amp;gt;https://developers.google.com/appengine/articles/rietveld?hl=zh-cn&amp;lt;/ref&amp;gt; It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83310</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83310"/>
		<updated>2014-02-11T04:04:45Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Roodi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time&amp;lt;ref&amp;gt;http://getbarkeep.org/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods.&amp;lt;ref&amp;gt;http://blog.martyandrews.net/2008/09/roodi-checkstyle-for-ruby.html&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Crucible_(software)&amp;lt;/ref&amp;gt;. Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles&amp;lt;ref&amp;gt;https://www.atlassian.com/software/crucible/overview &amp;lt;/ref&amp;gt;. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review&amp;lt;ref&amp;gt;https://confluence.atlassian.com/display/CRUCIBLE/The+Crucible+workflow&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool.&amp;lt;ref&amp;gt;http://code.google.com/p/jupiter-eclipse-plugin/wiki/UserGuide&amp;lt;/ref&amp;gt; It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service.&amp;lt;ref&amp;gt;https://developers.google.com/appengine/articles/rietveld?hl=zh-cn&amp;lt;/ref&amp;gt; It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83308</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83308"/>
		<updated>2014-02-11T04:02:59Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Jupiter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Crucible_(software)&amp;lt;/ref&amp;gt;. Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles&amp;lt;ref&amp;gt;https://www.atlassian.com/software/crucible/overview &amp;lt;/ref&amp;gt;. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review&amp;lt;ref&amp;gt;https://confluence.atlassian.com/display/CRUCIBLE/The+Crucible+workflow&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool.&amp;lt;ref&amp;gt;http://code.google.com/p/jupiter-eclipse-plugin/wiki/UserGuide&amp;lt;/ref&amp;gt; It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service.&amp;lt;ref&amp;gt;https://developers.google.com/appengine/articles/rietveld?hl=zh-cn&amp;lt;/ref&amp;gt; It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83306</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83306"/>
		<updated>2014-02-11T04:01:24Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Rietveld */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service.&amp;lt;ref&amp;gt;https://developers.google.com/appengine/articles/rietveld?hl=zh-cn&amp;lt;/ref&amp;gt; It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83305</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83305"/>
		<updated>2014-02-11T04:00:32Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Review Board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&amp;lt;ref&amp;gt;http://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues.&amp;lt;ref&amp;gt;http://brakemanscanner.org/	&amp;lt;/ref&amp;gt; Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews.&amp;lt;ref&amp;gt;http://www.reviewboard.org/&amp;lt;/ref&amp;gt; It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83298</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83298"/>
		<updated>2014-02-11T03:55:19Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Jupiter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an [http://en.wikipedia.org/wiki/Xml XML] file format and maintains them in the project configuration management system alongside the source code.&amp;lt;ref&amp;gt;http://whiteboxqa.com/StudentMaterial/Books/IP-WBT-01-JavaPowerTools.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [ http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83291</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83291"/>
		<updated>2014-02-11T03:49:06Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [ http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Ubit  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83290</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83290"/>
		<updated>2014-02-11T03:48:29Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It [http://en.wikipedia.org/wiki/Parsing parses] the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks, etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that the shipped checks can also be easily configured with a [http://en.wikipedia.org/wiki/Yaml YAML] file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [ http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| MIT || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| Ruby Sadists || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| Zev Blut  || Open Source || Ruby || Ruby Gem || Free&lt;br /&gt;
|-&lt;br /&gt;
! PullReview&lt;br /&gt;
| Brussels  || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83283</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83283"/>
		<updated>2014-02-11T03:38:57Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps [http://en.wikipedia.org/wiki/Quality_assurance quality assurance] (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source [http://en.wikipedia.org/wiki/Vulnerability_(computing) vulnerability] scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in [http://en.wikipedia.org/wiki/Web_server web server] or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [ http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Roodi&lt;br /&gt;
| SmartBear || Proprietary ||  || Desktop Client || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Flog&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Saikuro&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Dust&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83276</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83276"/>
		<updated>2014-02-11T03:34:31Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code. Users can attend commits made to any [http://en.wikipedia.org/wiki/Git_(software) Git] repository, see [http://en.wikipedia.org/wiki/Diffs diffs], write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also [ http://en.wikipedia.org/wiki/Script_(computing) script] tools. It comes with a command line client and [http://en.wikipedia.org/wiki/REST REST] APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a [http://githooks.com/ git hook]. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  [http://en.wikipedia.org/wiki/SaaS “SAAS”] solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreview sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company [https://www.atlassian.com/ Atlassian], tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with [http://en.wikipedia.org/wiki/JIRA JIRA] which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/ClearCase ClearCase], [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], Git, [http://en.wikipedia.org/wiki/Mercurial Mercurial], [http://en.wikipedia.org/wiki/Perforce Perforce], and [http://en.wikipedia.org/wiki/Subversion_(software) Subversion]. It can be installed on any server running [http://en.wikipedia.org/wiki/Apache Apache] or [ http://en.wikipedia.org/wiki/Lighttpd lighttpd] and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It provides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Collaborator&lt;br /&gt;
| SmartBear || Proprietary ||  || Desktop Client || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Code Striker&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Gerrit&lt;br /&gt;
| code.google.com || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Groogle&lt;br /&gt;
| groogle.sourceforge.net || Open Source || PHP || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! JCR&lt;br /&gt;
| jcodereview.sourceforge.net || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Malevich&lt;br /&gt;
| malevich.codeplex.com || Open Source || || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Perforce&lt;br /&gt;
| perforce.com || Proprietary || Multiple || Both || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83271</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83271"/>
		<updated>2014-02-11T03:28:56Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Rietveld */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available.&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Collaborator&lt;br /&gt;
| SmartBear || Proprietary ||  || Desktop Client || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Code Striker&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Gerrit&lt;br /&gt;
| code.google.com || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Groogle&lt;br /&gt;
| groogle.sourceforge.net || Open Source || PHP || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! JCR&lt;br /&gt;
| jcodereview.sourceforge.net || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Malevich&lt;br /&gt;
| malevich.codeplex.com || Open Source || || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Perforce&lt;br /&gt;
| perforce.com || Proprietary || Multiple || Both || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83269</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83269"/>
		<updated>2014-02-11T03:28:37Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Other Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Collaborator&lt;br /&gt;
| SmartBear || Proprietary ||  || Desktop Client || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Code Striker&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Gerrit&lt;br /&gt;
| code.google.com || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Groogle&lt;br /&gt;
| groogle.sourceforge.net || Open Source || PHP || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! JCR&lt;br /&gt;
| jcodereview.sourceforge.net || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Malevich&lt;br /&gt;
| malevich.codeplex.com || Open Source || || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Perforce&lt;br /&gt;
| perforce.com || Proprietary || Multiple || Both || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83268</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83268"/>
		<updated>2014-02-11T03:27:52Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Code Review Tools for Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Collaborator&lt;br /&gt;
| SmartBear || Proprietary ||  || Desktop Client || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Code Striker&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Gerrit&lt;br /&gt;
| code.google.com || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Groogle&lt;br /&gt;
| groogle.sourceforge.net || Open Source || PHP || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! JCR&lt;br /&gt;
| jcodereview.sourceforge.net || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Malevich&lt;br /&gt;
| malevich.codeplex.com || Open Source || || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Perforce&lt;br /&gt;
| perforce.com || Proprietary || Multiple || Both || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83264</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83264"/>
		<updated>2014-02-11T03:25:22Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of code review tools&lt;br /&gt;
! &lt;br /&gt;
! Maintainer&lt;br /&gt;
! License&lt;br /&gt;
! Developed In&lt;br /&gt;
! Desktop Client vs Web App&lt;br /&gt;
! Cost&lt;br /&gt;
|-&lt;br /&gt;
! Brakeman&lt;br /&gt;
|  brakemanscanner.org || Open Source || Ruby || Desktop Client || Free&lt;br /&gt;
|-&lt;br /&gt;
! Barkeep&lt;br /&gt;
| Ooyala || Open Source || Ruby || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Collaborator&lt;br /&gt;
| SmartBear || Proprietary ||  || Desktop Client || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Code Striker&lt;br /&gt;
| codestriker.sourceforge.net  || Open Source || Pearl || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Crucible&lt;br /&gt;
| Atlassian || Proprietary || Java ||  Web Application || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Gerrit&lt;br /&gt;
| code.google.com || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Groogle&lt;br /&gt;
| groogle.sourceforge.net || Open Source || PHP || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! JCR&lt;br /&gt;
| jcodereview.sourceforge.net || Open Source || Java || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Jupiter&lt;br /&gt;
| code.google.com || Open Source || Java || Desktop Client (Eclipse) || Free&lt;br /&gt;
|-&lt;br /&gt;
! Malevich&lt;br /&gt;
| malevich.codeplex.com || Open Source || || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Perforce&lt;br /&gt;
| perforce.com || Proprietary || Multiple || Both || Paid&lt;br /&gt;
|-&lt;br /&gt;
! Rietveld&lt;br /&gt;
| Google App Engine || Open Source|| Python || Web Application || Free&lt;br /&gt;
|-&lt;br /&gt;
! Review Board&lt;br /&gt;
| reviewboard.org || MIT || Python || Web Application || Free&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83263</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83263"/>
		<updated>2014-02-11T03:13:56Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83262</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83262"/>
		<updated>2014-02-11T03:13:23Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Code Review Tools for Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rietveld ==&lt;br /&gt;
&lt;br /&gt;
Rietveld is a web-based collaborative code review tool for use with Subversion to run on Google’s cloud service. It is written by Guido van Rossum, Python creator. While this web app was primarily written to serve as a showcase for using Django with Google App Engine, the scalable infrastructure for web applications that developer helped build, serves as a useful tool for the open source community, especially the Python community. Rietveld is inspired by Mondrian, which once has been  intensively used inside Google to review their code.Part of the Rietveld’s code derived from Mondrian.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The feature sets of Rietveld and Review Board are strikingly similar, which is not surprising as they both used Mondrian as a model. van Rossum originally wanted to turn Mondrian into a free software project, but it was too tied to &amp;quot;proprietary Google infrastructure&amp;quot;, so he started over, with Rietveld as the result. Both tools are implemented in Python using the Django framework, but one major difference is that Rietveld is written to use Google App Engine.&lt;br /&gt;
&lt;br /&gt;
'''Advantage'''&lt;br /&gt;
&lt;br /&gt;
* Simplified deployment: For free software projects, where code review is purposely done in the open, Rietveld provides a way to quickly try the application out. They don’t need to find a server and run the application, as which would be required with Review Board.&lt;br /&gt;
&lt;br /&gt;
* Cross platform: It is extremely easy to install Rietveld in a different environment by replacing the App Engine-specific pieces, but that clearly is not where it is targeted.&lt;br /&gt;
&lt;br /&gt;
* Free and open to public: Anyone can browse the system, but only users who have a Google account can add issues, comments, and conduct reviews using the tool.&lt;br /&gt;
&lt;br /&gt;
* Introduction to the Google App Engine interface: While Rietveld does not provide much in the way of additional functionality from Review Board, and in fact it lags Review Board in some areas, Rietveld does provide a very nice introduction to the Google App Engine interface. Developers can use the code as a template for their own ideas once Google makes more App Engine accounts available. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83261</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83261"/>
		<updated>2014-02-11T03:10:01Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83258</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83258"/>
		<updated>2014-02-11T03:07:09Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Code Review Tools for Java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
== Other Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/gerrit/ Gerrit] is a web based code review system, facilitating online code reviews for projects using the Git version control system. &lt;br /&gt;
&lt;br /&gt;
* [http://jcodereview.sourceforge.net/ JCR] is a web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects. It has special features to make large-scale reviews not only practical but easy and fast.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sonarqube.org/ Sonar] is an open platform to manage code quality.&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83252</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83252"/>
		<updated>2014-02-11T02:55:10Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Saikuro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
* More examples can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
== Other Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83250</id>
		<title>CSC/ECE 517 Spring 2014/ch1 1w1f mj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2014/ch1_1w1f_mj&amp;diff=83250"/>
		<updated>2014-02-11T02:53:08Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: /* Roodi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Code_review Code review] is the process of evaluation of computer [http://http://en.wikipedia.org/wiki/Source_code source code], with the intention of finding and fixing faults and design errors neglected in the initial development phase. Code review helps in improving the overall quality of software and maintains the consistency in software design and implementation. The reviewer examines the code and reports the findings to the author, which helps in improving the developer’s skill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Code review is a phase in the software development process in which the authors of code, peer reviewers, and perhaps quality assurance (QA) testers get together to review code.&amp;lt;ref&amp;gt;http://searchsoftwarequality.techtarget.com/definition/code-review &amp;lt;/ref&amp;gt;   It facilitates systematic examination of source code for vulnerabilities such as buffer overflows, race conditions, memory leakage, size violations, and duplicate statements. Code review can also help in looking for security breaches to the software which requires higher security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Types of Code review =&lt;br /&gt;
&lt;br /&gt;
Code review practices can be divided into the following categories.&lt;br /&gt;
&lt;br /&gt;
=== Formal inspections===&lt;br /&gt;
&lt;br /&gt;
Formal inspections refers to a heavy process with several participants sitting together to review code. The defects discovered in this process are usually recorded in great detail.&lt;br /&gt;
&lt;br /&gt;
=== Lightweight code review ===&lt;br /&gt;
&lt;br /&gt;
*     Over the shoulder: An “over-the-shoulder” review is the most common and informal code review technique where the developer stands over the author’s workstation while the author walks the reviewer through a set of code changes.&lt;br /&gt;
&lt;br /&gt;
*     Email pass around: The author bundles up all source code and sends it to reviewers. Reviewers examine the code, communicate with other developers and suggest changes via e-mail.&lt;br /&gt;
 &lt;br /&gt;
*     Pair Programming: In Pair Programming, two developers write code at the same workstation and there is continuous free-form discussion and review.&lt;br /&gt;
&lt;br /&gt;
*     Tool assisted code review: Reviewers use specialized tools in different stages of the code review, which includes collecting files, transmitting and displaying files, commentary, and defects among all participants, collecting metrics, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Ruby =&lt;br /&gt;
&lt;br /&gt;
== Brakeman ==&lt;br /&gt;
&lt;br /&gt;
Brakeman is an open source vulnerability scanner tool explicitly designed for Ruby on Rails applications. It can be used at any stage of the development to statically analyze Rails application code and find out the security issues. Brakeman carefully inspects the source code of your application and you do not need to set up your whole application stack to use it. Brakeman scans through the application code and produce a summary of all security issues it has found. Brakeman is extremely suspicious and hence sometimes it provides “false positives.”  It does not finds security vulnerabilities in web server or other software as it just scans the source code and not the entire application stack.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* No Configuration Necessary: Brakeman does not require any setup or configuration once it is installed.&lt;br /&gt;
&lt;br /&gt;
* Run It Anytime: As it’s working is based on just the source code, Brakeman can be used at any stage of the development process.&lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Brakeman is especially built for applications developed in Ruby on Rails, so it can easily check configuration settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Flexible Testing: Each check performed by Brakeman is independent, so testing can be limited to a subset of all the checks Brakeman comes with.&lt;br /&gt;
&lt;br /&gt;
* Speed: Brakeman is much faster than other “black box” website scanners. Even large applications do not take more than a few minutes to scan.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
Here's one example of warnings Brakeman reports: SQL injection.&lt;br /&gt;
&lt;br /&gt;
* A Rails 3.x code segment looks like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username = params[:user][:name].downcase&lt;br /&gt;
password = params[:user][:password]&lt;br /&gt;
&lt;br /&gt;
User.first.where(&amp;quot;username = '&amp;quot; + username + &amp;quot;' AND password = '&amp;quot; + password + &amp;quot;'&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Brakeman would produce a warning like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Possible SQL injection near line 37:&lt;br /&gt;
User.first.where(((((&amp;quot;username = '&amp;quot; + params[:user][:name].downcase) + &amp;quot;' AND password = '&amp;quot;) + params[:user][:password]) + &amp;quot;'&amp;quot;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Barkeep ==&lt;br /&gt;
&lt;br /&gt;
Barkeep is one of the friendly Code Review System which can be used by developers to keep high quality standard of code.Users can attend commits made to any Git repository, see diffs, write comments, and have those comments emailed to your fellow committers. Barkeep is unopinionated. It can be used with pre-commit or post-commit workflows, and also script tools. It comes with a command line client and REST APIs.&lt;br /&gt;
&lt;br /&gt;
Barkeep is a small codebase written in Ruby. It's easy to add new features and APIs as per the requirement.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Naturally supports post-commit workflows: Barkeep supports post-commit code review workflow. Here, once the part of the code of the developer is ready, he pushes it to the master, so that it becomes available to other developer to begin integrating it. Code review happens when it's conducive for the team (within 1-2 days), and any comments are addressed in future commits.&lt;br /&gt;
&lt;br /&gt;
* Clean User Interface: Barkeep is designed with a basic UI. The general actions, like leaving a quick comment and approving a commit, are low-friction. Also it provides various keyboard shortcuts for ease of use.&lt;br /&gt;
&lt;br /&gt;
* Hackable: The codebase of barkeep is small, obtainable and fun to hack on. It can be easily extended and improved with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Flog==&lt;br /&gt;
&lt;br /&gt;
Flog gives feedback about the quality of Ruby code by scoring using the [http://c2.com/cgi/wiki?AbcMetric ABC metric]: assignments, branches, calls, with particular attention placed on calls. The ABC metric is a neat measurement since it combines a lot of information in a way that we can easily understand. But this leads to one important feature of Flog, that is the score reported is very opinionated. This score is custom built to apply commonly accepted design patterns for Ruby. Therefore, we can think of Flog as a modified ABC measurement.&lt;br /&gt;
&lt;br /&gt;
Flog takes the following branching terms into consideration: and, case, else, if, or, rescue, until, when and while. There are other rules that add to branch total, but these are the most important. Assignments are much more simple, Flog add one to the score per assignment. Calls are defined as any instance method call that takes the flow out of the current scope.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Keep track of code complexity: Flog reports code complexity of each method. In this way, developer is able to know what code segment in the project is different to follow.&lt;br /&gt;
&lt;br /&gt;
* ABC metric: Flog reports ABC metric which is an easily understood measurement of code complexity.&lt;br /&gt;
 &lt;br /&gt;
* Ruby support: It support different version of Ruby including 1.8 and 1.9 syntax.&lt;br /&gt;
 &lt;br /&gt;
* Speed: Flog executes quite fast, which makes it perfect for a githook. A pre-commit hook which checks code complexity and returns non-zero for any score higher than 61 works quite well.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* Original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot;&lt;br /&gt;
    if a == 2 then&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What we see in Flog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Test&lt;br /&gt;
  def blah         # 11.2 =&lt;br /&gt;
    a = eval &amp;quot;1+1&amp;quot; # 1.2 + 6.0 +&lt;br /&gt;
    if a == 2 then # 1.2 + 1.2 + 0.4 +&lt;br /&gt;
      puts &amp;quot;yay&amp;quot;   # 1.2&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Report generated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Test#blah: (11.2)&lt;br /&gt;
     6.0: eval&lt;br /&gt;
     1.2: branch&lt;br /&gt;
     1.2: ==&lt;br /&gt;
     1.2: puts&lt;br /&gt;
     1.2: assignment&lt;br /&gt;
     0.4: lit_fixnum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Saikuro ==&lt;br /&gt;
&lt;br /&gt;
Saikuro is mainly designed to analyze cyclomatic complexity, which is a graphical measurement to indicate the complexity of a program, on Ruby program. Given a source project, Saikuro will find each instance method in it, calculate its cyclomatic complexity and generate a report listing all the result according to each method found. In addition, Saikuro also counts the number of lines per method as well as the number of tokens on each line, and generate another report on that.&lt;br /&gt;
&lt;br /&gt;
Saikuro measures complexity, but as we all know, Ruby is a tricky language. Saikuro adds a branch when it encounters conditional statements like if, unless, while, until, for, elsif and when, but it also adds a branch if the code uses a block. This is because using a block in Ruby very often changes the control flow. Keeping the cyclomatic complexity at a low number is very essential, it ensures your code is simple to test and debug.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Cyclomatic complexity: Saikuro calculates cyclomatic complexity in a more 'Ruby' way so that it is more concise on Ruby projects.&lt;br /&gt;
&lt;br /&gt;
* Different kind of targets: Saikuro can be recursively used on a dir or a specific troublesome class. &lt;br /&gt;
&lt;br /&gt;
* Lightweight and quick: It is very similar to the code evaluation tool Flog we covered before. It is a quick reporting tool that can help users understand where they have excess complexity in their projects.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
* A report generated by Saikuro can be viewed [http://saikuro.rubyforge.org/ here].&lt;br /&gt;
[[File:Saikuro_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PullReview ==&lt;br /&gt;
 &lt;br /&gt;
PullReview is an Automated Code Review Tool for Ruby developers using GitHub. PullReview is  “SAAS” solution. It requires no servers to install, no extra software. Setup is very easy - Click the button, link to GitHub, and PullReview can start reviewing your branches. It provides feedback very quickly, without having to sit and wait for a colleague to come and have a look. Another important feature is that it does not keep to static analysis. It aggregates several analysis results, and points out the problems at hand – in order of impact. It also tells you ways to make your code better.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
 	 &lt;br /&gt;
* Telling You Where to Go Next: PullReview make your coding more robust, it improves you as a coder. It tells you why best practices are what they are – and where to apply them. PullReview analyzes your branches using all important metrics. It tells you what you are doing wrong and what the impact is. &lt;br /&gt;
&lt;br /&gt;
* Ruby Specific: Like Brakeman, Roodi is specifically built for Ruby on Rails which helps in checking composition and structure settings for best practices.&lt;br /&gt;
&lt;br /&gt;
* Quick Setup:  No setting up of servers or installing a plethora of tools is required. Pullreviews sets up quickly and saves time.&lt;br /&gt;
&lt;br /&gt;
'''Example''' can be viewed [https://www.pullreview.com/site/onboarding here].&lt;br /&gt;
&lt;br /&gt;
== Roodi  ==&lt;br /&gt;
&lt;br /&gt;
Roodi stands for Ruby Object Oriented Design Inferometer. It parses the Ruby code and warns about the design issues from the list configured for example Class line count check, for loop check, parameter number check, cyclomatic checks,etc. It helps in breaking down complex and long methods. &lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Extendable: One advantage of Roodi is that The shipped checks can also be easily configured with a YAML file, which is easy to manipulate. In that way, users are able to write customized class to add new checks. A checker class registers the types of AST nodes it’s interested and then handle the matched subtrees.&lt;br /&gt;
&lt;br /&gt;
'''Example Usage'''&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files recursively under the current directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check one controller and one model file in a rails app:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi app/controller/sample_controller.rb app/models/sample.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check all ruby files in a rails app with a custom configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ roodi -config=my_roodi_config.yml &amp;quot;rails_app/**/*.rb&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For more details, please refer to [https://github.com/roodi/roodi here].&lt;br /&gt;
&lt;br /&gt;
== Other Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Code Review Tools for Java =&lt;br /&gt;
&lt;br /&gt;
== Crucible ==&lt;br /&gt;
&lt;br /&gt;
Crucible is a collaborative code review application developed by software company Atlassian, tailored to distributed teams, and facilitates asynchronous review and commenting on code.  Crucible also articulates with prominent source control tools, such as Git and Subversion. Crucible is a flexible application that caters for a wide range of team sizes and work styles. Crucible also supports integration with JIRA which is Atlassian's issue tracking and project management application. &lt;br /&gt;
&lt;br /&gt;
'''Workflow '''&lt;br /&gt;
&lt;br /&gt;
1. Creating a Review.&lt;br /&gt;
&lt;br /&gt;
2. Adding content to the review.&lt;br /&gt;
&lt;br /&gt;
3. Performing the review&lt;br /&gt;
&lt;br /&gt;
4. Summarising and closing the review.&lt;br /&gt;
&lt;br /&gt;
''' Advantages '''&lt;br /&gt;
&lt;br /&gt;
* Flexible Code Review: Crucible provides configurable options to track and complete reviews - Defined workflow, Moderator, One or more participants. It also supports in-line code discussions.&lt;br /&gt;
&lt;br /&gt;
* Pre-commit support: It allows code review before check in which ensures that any code going into production has been reviewed. It allows code review from command line.During the pre-commit review process code is re-factored, changed, and updated. Crucible takes this into account and makes sure all files you are reviewing are easily updated and current.&lt;br /&gt;
&lt;br /&gt;
* Traceability: Developers have a unified view that shows all the activity in their code for commits and reviews. It supports creating filters which provides notification of code committed by new team members. The review coverage report provides information about which parts have already been reviewed and which are currently in review.&lt;br /&gt;
&lt;br /&gt;
* Notifications: It provides automatic or manual way of notifying reviewers who have not completed your code reviews. Crucible provides multiple features to help team stay on top of their workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jupiter==&lt;br /&gt;
&lt;br /&gt;
Jupiter is an open source collaborative Eclipse code review tool. It uses a simple, lightweight code review process that is easy to learn and adopt. The result of a research project by the Collaborative Software Development Laboratory at the University of Hawaii, the Jupiter plug-in stores code reviews in an XML file format and maintains them in the project configuration management system alongside the source code.&lt;br /&gt;
&lt;br /&gt;
'''Workflow'''&lt;br /&gt;
&lt;br /&gt;
The code review process implemented in Jupiter is relatively simple, and it should suffice for most &lt;br /&gt;
projects. In Jupiter, you conduct a code review in the following four stages: &lt;br /&gt;
&lt;br /&gt;
Configuration: The reviewer initiator sets up the review, specifies the files to be reviewed and what issues can be raised.&lt;br /&gt;
&lt;br /&gt;
Individual code review: Each reviewer examines the code individually, using a review checklist and raising issues as they encounter them. Jupiter saves the issues you create in XML form directly in the &lt;br /&gt;
project directory. &lt;br /&gt;
&lt;br /&gt;
Team review: The review team (including the author) meet to discuss issues and decide on actions to take. This generally involves a face-to-face meeting, using Jupiter to help work through all the review issues. &lt;br /&gt;
&lt;br /&gt;
Rework: The developer goes through the raised issues and fixes them.&lt;br /&gt;
&lt;br /&gt;
Throughout the whole process, the review files are stored and updates in the source code repository, providing a history of raised issues and how they have been corrected.&lt;br /&gt;
&lt;br /&gt;
Jupiter is an innovative and flexible tool that helps automate peer code reviews and track issues. Until &lt;br /&gt;
recently, it was quite unique in this domain. Of late, however, it does have a commercial competitor, &lt;br /&gt;
Crucible, which we mentioned before.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Free: It is open source and free. Jupiter uses the CPL License.&lt;br /&gt;
&lt;br /&gt;
* Cross-platform: Jupiter is based upon the Eclipse plug-in architecture. It is available for all platforms supported by Eclipse.&lt;br /&gt;
&lt;br /&gt;
* More simply data reuse and sharing: Jupiter stores data in XML format as well as CM repository. Users of Jupiter share their data ﬁles the same way they share their code using CVS or some other CM repository.&lt;br /&gt;
&lt;br /&gt;
* Sorting and Filtering: Jupiter provides ﬁlters and sorting to facilitate going over the code&lt;br /&gt;
review issues.&lt;br /&gt;
&lt;br /&gt;
* File integration: Jupiter has the capability to easily jump back and forth between speciﬁc&lt;br /&gt;
review comments and the corresponding source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code Review Tools for Python=&lt;br /&gt;
&lt;br /&gt;
== Review Board ==&lt;br /&gt;
&lt;br /&gt;
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It works well with small projects as well as large companies.  Review Board integrates with various version control systems like Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, and Subversion. It can be installed on any server running Apache or lighttpd and is free for both personal and commercial use. There is also an official commercial Review Board hosting service, RBCommons for Review Board.&lt;br /&gt;
&lt;br /&gt;
'''Workflow (pre-commit)'''&lt;br /&gt;
1. Make a change to your local source tree.&lt;br /&gt;
&lt;br /&gt;
2. Create a review request for your new change.&lt;br /&gt;
&lt;br /&gt;
3. Publish the review request and wait for your reviewers to see it.&lt;br /&gt;
&lt;br /&gt;
4. Wait for feedback from the reviewers.&lt;br /&gt;
&lt;br /&gt;
5. If they’re ready for it to go in:&lt;br /&gt;
: 5.1 Submit your change to the repository.&lt;br /&gt;
: 5.2 Click Close ‣ Submitted on the review request action bar.&lt;br /&gt;
&lt;br /&gt;
6. If they’ve requested changes:&lt;br /&gt;
: 6.1 Update the code in your tree and generate a new diff.&lt;br /&gt;
: 6.2 Upload the new diff, specify the changes in the Change Description box, and publish.&lt;br /&gt;
: 6.3 Jump back to step 4.&lt;br /&gt;
&lt;br /&gt;
'''Advantages'''&lt;br /&gt;
&lt;br /&gt;
* Easily track your team's review requests: The dashboard provides an up-to-the-minute overview of all the review requests. Provides easy controls to group/ sort your review requests, and see what's left to review.&lt;br /&gt;
&lt;br /&gt;
* Review all kinds of files: Along with code review, Review Board can also be used to review other files by the team members. You can upload screenshots of your feature, or a file showing log output of a unit test run.&lt;br /&gt;
&lt;br /&gt;
* All history at one place: With Review Board, the entire history of development is in one place. Each change's review request shows the entire development discussion and each iteration of the change that people have reviewed. &lt;br /&gt;
&lt;br /&gt;
* Helpful command-line tools and Extensible: The RBTools command line tools make it easy to quickly create review requests based on the changes in your source tree and to keep them up-to-date. The fully-featured REST and Python API provides automation and integration. It prrovides  rich extension framework to add features to Review Board.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Saikuro1.jpg&amp;diff=83244</id>
		<title>File:Saikuro1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Saikuro1.jpg&amp;diff=83244"/>
		<updated>2014-02-11T02:43:40Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: uploaded a new version of &amp;amp;quot;File:Saikuro1.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Saikuro example&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Saikuro1.jpg&amp;diff=83243</id>
		<title>File:Saikuro1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Saikuro1.jpg&amp;diff=83243"/>
		<updated>2014-02-11T02:42:32Z</updated>

		<summary type="html">&lt;p&gt;Jyang23: uploaded a new version of &amp;amp;quot;File:Saikuro1.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Saikuro example&lt;/div&gt;</summary>
		<author><name>Jyang23</name></author>
	</entry>
</feed>