I suppose I'm living up to the username! I do know how to write decent programs and in other languages, but I'm just so much faster when bodging.
I'm thinking of making similar website for more things, in which case I'd clean up the architecture a bit, but my exams are in a few months and this hasn't been particularly successful so we'll see. I probably shouldn't be spending my weekends programming right now :)
I submitted it a few hours ago to two upvotes - I think it might be because I didn't include the link directly, and apparently that downranks it in the algorithm. I've emailed dang to see if it's OK to repost it.
And, up to you, but doing money math with floats is a well known road-to-ruin: "price_with_shipping": 18.990000000000002,
Thanks for pointing out the floats issue. It'll probably be OK because I round to the nearest integer when displaying and only use the extra precision for sorting, but I might round to 2dp on the server side to avoid wasting bandwidth on all those zeroes - I presume floating point imprecision compresses poorly.
decimal.Decimal in Python
java.math.BigDecimal
I don't know if there's an idiomatic way to use this datatype in JavaScript / Node.
Let me know if this helps!
I'm also going to improve the backend a bit to filter out broken GPUs