I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

Talk:Price list behind API

From Rosetta Code


Adapted from this Stack Overflow question.

--Paddy3118 (talk) 12:12, 25 November 2020 (UTC)

Border case[edit]

What would non overlapping look like if there were, say, 8000 items with the same price (random would allow for this)? --~~

(Please fix signing of above, thanks).

I forgot how to do that Walter
Nice corner case. The original Python generates a lot ff increasing x to x+1, zero count ranges and would likely end by skipping items and printing Whoops.
I have added/will add a Python assertion to fail on the first zero count range foundas it's better to fail early.
Thanks. --Paddy3118 (talk) 06:40, 30 November 2020 (UTC)

Very poor name[edit]

What is the significance of them being prices? What is the significance of them being "behind an API"? I can't see why either has any meaning to the task. Yeah, yeah, Stackoverflow question, yada, yada, yada. Would probably be better something like "Bin by range" or some such. Also, what difference does it make if the units are specifically pounds? (No pence!) How about if they were Stanley nickels? How would that change the problem? --Thundergnat (talk) 12:32, 29 November 2020 (UTC)