Open d1chiqua opened 1 month ago
Common Mistakes Long methods are also a big issue. Most of the time, long methods contain nested loops or nested if statements, and handle multiple tasks instead of one. One big reason that students wrote long methods is that they tended to
place a new feature in an existing method rather than to cre- ate a new one. Likewise, students prefer to modify existing
switch or if blocks rather than to implement polymor- phism, since it is easier for students simply to add another
condition to the existing code than to understand an inheri- tance hierarchy structure across files. This violates a rule of
object-oriented design—when you see a switch statement, you should think of polymorphism [15].
Right now, the match_new_teams_to_topics is breaking Single Responsibility Principle - we can test each method this way.
Break into the following methods: (1) Verify Intelligent Assignment (2) Get the SignUpTopics (3) Retrieve the unassigned teams (optimize queries) (4) Sort unassigned teams (optimize sort process)