irelephant [he/him]@lemmy.dbzer0.com to Fediverse@lemmy.worldEnglish · 7 hours agoFun fact: you can't upload this image on piefed.sociallemmy.dbzer0.comimagemessage-square42fedilinkarrow-up147arrow-down13file-text
arrow-up144arrow-down1imageFun fact: you can't upload this image on piefed.sociallemmy.dbzer0.comirelephant [he/him]@lemmy.dbzer0.com to Fediverse@lemmy.worldEnglish · 7 hours agomessage-square42fedilinkfile-text
https://codeberg.org/rimu/pyfedi/src/commit/6405e51dab23f43eaea18d0ee4d9e7a773a3fd31/app/community/forms.py#L335 deliberately misleading error message.
minus-squaremagiccupcake@lemmy.worldlinkfedilinkEnglisharrow-up8·edit-22 hours ago Every user (remote or local) has an “attitude” which is calculated as follows: `(upvotes cast - downvotes cast) / (upvotes + downvotes)`. If your “attitude” is < 0.0 you can’t downvote. This pains me because it is functionally equivalent to If downvotes cast < upvotes cast
minus-squareBB84@mander.xyzlinkfedilinkEnglisharrow-up4·1 hour agonot if both upvotes and downvotes are zero ❗️
minus-squaremagiccupcake@lemmy.worldlinkfedilinkEnglisharrow-up5·1 hour agoIf 0/0 < 0 would error? If 0 < 0 evaluates false That makes it even worse???
This pains me because it is functionally equivalent to
not if both upvotes and downvotes are zero ❗️
If 0/0 < 0 would error?
If 0 < 0 evaluates false
That makes it even worse???