You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lots of duplication and complex logic. I think we should create a generic MessageFactory which accepts a class and a message, and uses simpler logic. Then, create two factory functions: HisparcMessageFactory and GpsMessageFactory. They simply call the generic factory with their respective classes.
As for the complex logic: we can drop a while loop if we let strip_until_start_codon raise an exception if there is no start codon left in the buffer. And we can probably drop the recursive call, although that may be not be a problem. Anyway: simpler logic, and test the thing!
The text was updated successfully, but these errors were encountered:
Lots of duplication and complex logic. I think we should create a generic MessageFactory which accepts a class and a message, and uses simpler logic. Then, create two factory functions: HisparcMessageFactory and GpsMessageFactory. They simply call the generic factory with their respective classes.
As for the complex logic: we can drop a while loop if we let strip_until_start_codon raise an exception if there is no start codon left in the buffer. And we can probably drop the recursive call, although that may be not be a problem. Anyway: simpler logic, and test the thing!
The text was updated successfully, but these errors were encountered: