frc-frecon / frecon

An API for building scouting apps for FRC competitions
MIT License
3 stars 0 forks source link

Many Methods' Cyclomatic Complexity and Length are too high #96

Closed rye closed 8 years ago

rye commented 8 years ago

We have 26 different possible linear paths through MatchNumber#initialize and a number of other methods have similarly high complexities. Also, many of these same methods are large, branching statements that seem to have a high amount of behavioral variance. These two characteristics are code smells, and indicate that something is bad about these methods.

It would be advantageous to write up a spec for these ones and to then refactor out things. We could just do a risky protection-less refactor, but that's risky and sad. Spec first.

rye commented 8 years ago

This will constitute the next release, in addition to the other work that has taken place on master since the most recent.

rye commented 8 years ago

MatchNumber#initialize is very large and sad. I'm currently working on refactoring it.