User:Svenka15

From Expertiza_Wiki
Revision as of 21:16, 28 October 2016 by Svenka15 (talk | contribs) (modified)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CSC/ECE 517 Fall 2015/E1672

Introduction

Background

Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to submit their work, review each other’s work and improve their work upon this feedback. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can bid for topics of their interest by by assigning priorities to the topics and Expertiza assigns topics and teams depending on common priorities. Students can form teams in Expertiza to work on various projects and assignments.


Description

== Project Description ==


The following is an Expertiza based OSS project which deals with the files in spec/features folder assignment_creation_spec.rb, instructor_interface_spec.rb, questionnaire_spec.rb, quiz_spec.rb, delayed_mailer_spec.rb, scheduled_task_spec.rb. It focuses on removing the duplicate codes, following DRY concepts, change DateTime class object invocation, etc. The goal of this project is to attempt to make this part of the application easier to read and maintain. The existing redundant codes, use of long methods, incorrect method invocation and other errors are pointed out by the Code climate extension. The code climate extension also provides a rating for all files as well as an overall score for the entire application, to help us make proper modifications.


Problem Statement

The following tasks were accomplished in this project:

Install the Code Climate Chrome Extension, and when you go to Expertiza repo, you will see the extension will highlight the duplication code. Improved the clarity of code by improving the variable and parameter names. Remove the duplicated code by extracting a new method, moving code to before(:each) block, etc. Long character strings were taken and given appropriate names. Improve the Code Climate rating of classes whose original rating is F. Do not delete existing test cases and keep them pass TravisCI after refactoring. Files modified in current project

Six files in spec/features are modified

assignment_creation_spec.rb instructor_interface_spec.rb questionnaire_spec.rb quiz_spec.rb delayed_mailer_spec.rb scheduled_task_spec.rb List of changes

Similar code found in 1 other location (mass = 50) Duplicated code can lead to software that is hard to understand and difficult to change. Refactorings -Extract Method,Extract Class,Form Template Method,Introduce Null Object,Pull Up Method,Pull Up Field,Substitute Algorithm Use find_by instead of dynamic find_by_name. Do not use DateTime.now without zone.