Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign recursions #21

Open
greenTara opened this issue Nov 11, 2016 · 6 comments
Open

Redesign recursions #21

greenTara opened this issue Nov 11, 2016 · 6 comments
Assignees

Comments

@greenTara
Copy link
Collaborator

There are some methods which call themselves when an error occurs. The idea was that certain undesirable cases from random sampling would be avoided by resampling until a condition was passed. However, this design is difficult for development because exceptions caused by bugs keep recurring on repeated trials, leading to stack overflow.

@greenTara
Copy link
Collaborator Author

A better design for this situation, in general, is to use a while loop that repeats until the condition is passed (success) or some threshold number of loops has been exceeded (failure, throw exception). Depending on the circumstances, we could then handle the exception or have a hard failure. For debugging, this value could be smaller. Once debugging is finished, the threshold would be increased to a larger value.

@greenTara
Copy link
Collaborator Author

greenTara commented Nov 11, 2016

The first task for this issue is to identify the places where this design is used, and insert a FIXME comment.
The second task is to prioritize these for redesign.

alexlafleur pushed a commit that referenced this issue Nov 11, 2016
…d with issue #21 because running the statconc scripts resulted in this error
alexlafleur pushed a commit that referenced this issue Nov 15, 2016
@alexlafleur
Copy link
Collaborator

qhmm_family is the only script left that does a recursion

@greenTara
Copy link
Collaborator Author

Have the unit tests for the modified class been checked?

@greenTara
Copy link
Collaborator Author

It is reasonable to postpone the modification of qhmm_family until we need it. Let's leave this issue open however.

@alexlafleur
Copy link
Collaborator

Yes, the unit tests have been checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants