CSC/ECE 517 Spring 2022 - E2220: Refactor reputation web service controller

From Expertiza_Wiki
Revision as of 20:33, 21 March 2022 by Gkogant (talk | contribs)
Jump to navigation Jump to search

This page provides information about the refactoring work done on the reputation web service controller as part of the OSS project.

Team

Mentor

  • Naman Shrimali (nshrima)

Team Members (MissingSemicolon)

  • Eshwar Chandra Vidhyasagar Theda (ethedla)
  • Gokul Krishna Koganti (gkogant)
  • Krishna Saurabh Vankadaru (kvankad)

Expertiza

Expertiza is an assignment management portal. This portal can be used by instructors to create assignments . It can be used by students to submit their academic works and peer review others' works. Expertiza allows students to create, join and work in teams.

Background of reputation web service controller

Expertiza provides a way for students to peer review others' works. The motive of this provision is to encourage students to learn more while reviewing others' works and utilize the reviews to reflect on the grades. However, to depend on the peer reviews, the reviews' credibility has to be established. This credibility can be evaluated through reputation scores computed by reputation systems. These systems are deployed as web services and facilitate the calculation of past and present assignment scores for peer review research.

In the project's scope, we focus on the aspect of refactoring the file reputation_web_service_controller.rb. This is a controller file used for the calculation of reputation scores. This is measured based on how close the current review scores are to the other.

Issue identified

  1. Some methods are violating the single responsibility principle, i.e, some methods are doing more than one tasks. These methods must be broken down such that each method performs only one task.
  2. In send_post_request, references to specific assignments, such as 724, 735, and 756 are no longer relevant and must be removed.
  3. Password for a private key is place in the code. As this code is open-sourced, this causes security concerns and must be handled.
  4. Some method names followed bad naming convention. These method names are general and are in noun forms. Specific relevant names must be used as method names.
  5. Detailed method descriptions are needed to be inserted into the code as comments.
  6. Client is a bad method name and needs to be changed.
  7. There is a lot of unused/commented code, which should be removed.
  8. Some spelling mistakes are identified in the code.

Enhancements

Testing

 rspec spec/controllers/reputation_web_service_controller_spec.rb