lexiross / fattest-cat

Script to find fattest cat currently up for adoption at SF SPCA
734 stars 54 forks source link

Handling two or more cats of the same fattest weight #4

Closed martinburch closed 7 years ago

martinburch commented 7 years ago

If two or more cats are tied for the heavyweight champion, as it were, we'll only hear about one cat, the first one with the first-place weight.

One solution to this would be to use rankby but you'd need to add the ounces to the pounds first so you'd have a single weight value for each cat.

The reporting of the weights would also need to change a bit to handle ties.

In summary, handling two cats at once is tricky, and when they're the fattest, they can be quite a handful!

adammcarth commented 7 years ago

mind blown

refactornator commented 7 years ago

Maybe you could just open the links for both cats and let the user decide.

lexiross commented 7 years ago

@wlindner I like your idea! @martinburch we already do rank by pounds and ounces - we just don't do anything in the case of a tie and instead stick with the first fattest cat. but yeah, we could definitely do something smarter there to let the user know there is MORE THAN ONE FATTEST CAT <3

lexiross commented 7 years ago

^ if anyone wants to do a PR for this, i'd be happy to merge!

peterkhayes commented 7 years ago

Merged in; currently, there are two fattest cats!