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
Sorry but I couldn't get the code to run so I can't test this (probably just a result of my ignorance on all this, still super green when it comes to GitHub), but in my attempt to learn from your code, I think I found a potential bug.
I'm seeing that when it performs save_history, it's using the custom hash function you laid out in the Person class, which is this:
Does this combine all of those fields (name, dob, sex, and location) into a unique identifier?
Meaning, any changes to those items would break the user's link to their gift exchange history? I feel like name and location are especially susceptible to change given that the scope your wife gave you was "3 years" of history. The people could move locations, change their names from getting married, or change genders/pronouns.
All this means a person with a change could more easily be assigned someone they've been assigned to previously.
here was my attempt to re-create the bug:
The text was updated successfully, but these errors were encountered:
It seems like the simplest fix is to require unique names (which is likely an implicit requirement anyhow). However, to cover all bases, you'd still have to do something like include a history updater routine that accepts old and new names and rebuilds the history hashes.
Sorry but I couldn't get the code to run so I can't test this (probably just a result of my ignorance on all this, still super green when it comes to GitHub), but in my attempt to learn from your code, I think I found a potential bug.
I'm seeing that when it performs
save_history
, it's using the custom hash function you laid out in thePerson
class, which is this:Does this combine all of those fields (name, dob, sex, and location) into a unique identifier?
Meaning, any changes to those items would break the user's link to their gift exchange history? I feel like name and location are especially susceptible to change given that the scope your wife gave you was "3 years" of history. The people could move locations, change their names from getting married, or change genders/pronouns.
All this means a person with a change could more easily be assigned someone they've been assigned to previously.
here was my attempt to re-create the bug:
The text was updated successfully, but these errors were encountered: