CSC/ECE 517 Spring 2020 E2009 Refactor assignment
Introduction
Expertiza allows instructors to add assignments and students to upload their submissions. The assignment.rb model file consists of some basic CRUD operations along with some methods which help calculate scores and export details etc. The goal of the project is to refactor assignment.rb file to follow good coding practices.
Refactoring assignment.rb
Some of the coding issues with the assignment.rb file are 1) Methods performing more than one tasks, resulting in long methods 2) Methods with many conditional branches with multiple conditions and loops resulting in increased cyclomatic and cognitive complexity 3) Dead code 4) No proper naming conventions in some places. 5) Large number of methods in one file.