Another source of potential future bugs is leaving parameters of an experiment in the code as immediates rather than named constants. For example, consider the immediate 50 on line 229 of app/esper/identity.py.
I'd rather see this as: 50 --> IMAGE_SAMPLES_PER_BUCKET
The file identity.py has three instances of the immediate "50" in it. Two correspond to the number of image samples per bucket, and the third is a default parameter to show_gender_examples. An inadvertent search/replace operation might incorrectly change all three.
Another source of potential future bugs is leaving parameters of an experiment in the code as immediates rather than named constants. For example, consider the immediate 50 on line 229 of app/esper/identity.py.
I'd rather see this as: 50 --> IMAGE_SAMPLES_PER_BUCKET
The file identity.py has three instances of the immediate "50" in it. Two correspond to the number of image samples per bucket, and the third is a default parameter to show_gender_examples. An inadvertent search/replace operation might incorrectly change all three.
This is both for readability and safety.