Talk:Price list behind API: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Add some commentary) |
Walterpachl (talk | contribs) mNo edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 12:12, 25 November 2020 (UTC) |
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 12:12, 25 November 2020 (UTC) |
||
==Border case== |
|||
What would non overlapping look like if there were, say, 8000 items with the same price |
What would non overlapping look like if there were, say, 8000 items with the same price |
||
(random would allow for this)? --~~ |
(random would allow for this)? --~~ |
||
<br><br>(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. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 06:40, 30 November 2020 (UTC) |
|||
==Very poor name== |
==Very poor name== |
Latest revision as of 09:14, 30 November 2020
Inspiration
Adapted from this Stack Overflow question.
--Paddy3118 (talk) 12:12, 25 November 2020 (UTC)
Border case
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.
Very poor name
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)