Refactored the Branching-Paradigm Validation, Started Working on a Design Document

This week, I got a lot of miscellaneous things done. I was stuck on some other stuff for a while, so I added docstrings to each object and function. Emma and Emery decided that for a final paper, I should be turning in some sort of 3 page design document, so I began working on that as well. Right now, I just have a description of each of the objects, as well as a class diagram for each with some arrows that are supposed to show which classes contain instances of the others. I’m not sure whether I need to include my SurveyExceptions class or my idGenerator class; I haven’t added anything for them yet. In addition, I’m not sure how high level or low level to make my descriptions yet; I can’t really add much more detail without making it a lot longer than 3 pages.

Diagram from my draft design document

Diagram from my draft design document

Regarding the confusion with the branch-one, branch-all, branch-none checks last week, Emma directed me to her blog post regarding the branching paradigms for blocks and subblocks. I considered moving the branch paradigm checks out of the Block object, but in the end, I kept it there and rewrote the check so that it recursively iterates down to the lowest level of blocks contained in a Block, determines how many branch questions they have, and returns “branch-one”, “branch-all”, “branch-none”, or “bad-branch”. The branch paradigms of each blocks’ subblocks are then checked against how many branch questions the block contains at each level, to ensure that the proper combinations of “branch-one”, “branch-all”, etc. are maintained. This seems to work based on the few tests I’ve given it, but I need to test it a bit further just to be sure. It’s probably not the most elegant solution, but given the design I have right now I can’t think of a less complicated one.

Assuming my branch validation checks are correct, the only issue left to address is the JSON. Emma is working on the parser, so hopefully we can figure out what the problems are soon, and then my modules should (hopefully) be completely functional.

Leave a Reply

Your email address will not be published. Required fields are marked *