CSC/ECE 517 Spring 2023 - E2336. Reimplement response.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 7: Line 7:


===Issue 1: Refactor the self.get_all_responses method===
===Issue 1: Refactor the self.get_all_responses method===
Currently, the get_all_review_comments method is a class method that returns a data structure containing all the review comments for all responses. This violates the principles of good design as it creates a large data structure that the calling method needs to break apart, leading to poor performance and increased complexity.


To address this issue and come up with a much more elegant design, we plan to refactor as a new implementation that should convert the get_all_review_comments method into an instance method that takes a review object as an argument and returns the comments for that review only.


===Issue 5: Refactor the self.get_all_responses method===
===Issue 5: Refactor the self.get_all_responses method===

Revision as of 23:09, 7 April 2023

Project Overview

There are several issues we plan to address as part of this project.

  • Refactor the get_all_review_comments method as an instance method in response.rb file
  • Refactor the self.get_all_responses method as an instance method in response_map.rb file.
  • Add more descriptive comments for the tests.

Issue 1: Refactor the self.get_all_responses method

Currently, the get_all_review_comments method is a class method that returns a data structure containing all the review comments for all responses. This violates the principles of good design as it creates a large data structure that the calling method needs to break apart, leading to poor performance and increased complexity.

To address this issue and come up with a much more elegant design, we plan to refactor as a new implementation that should convert the get_all_review_comments method into an instance method that takes a review object as an argument and returns the comments for that review only.

Issue 5: Refactor the self.get_all_responses method

The self.get_all_responses method which is currently in the response.rb file would be much cleaner as an instance method in response_map.rb. We plan to refactor the self.get_all_responses method in response.rb to an instance method in response_map.rb.

Issue 6: Add more descriptive comments for the tests

The existing tests need more descriptive comments. We plan to add more detailed comments for all the test cases.