News for hackers. Stuff that matters.
Re:I had to build a web scraper to buy groceries by somebodynew on Saturday March 28, 2020 @09:41PM (#22715679)
It seems like a lot of demand issues highlighted by the pandemic could be solved by queues. Instead of saying "there are no slots available", put the user in the queue. Process the queue in order. The improvement in wait time and demand accuracy would be a win for both consumers and the business.
Re:I had to build a web scraper to buy groceries by xzel on Saturday March 28, 2020 @09:55PM (#22715746)
Web queues are ineffective as shown by sneaker bots. You’d need actual ID style authentication of accounts. If you’re talking about order queues than people will stuff the queue and cancel their orders or just have more hoarding if their multiple deliveries get processed. If it’s FIFO same technical advantages will apply: bots can click much faster than humans ever will. I think the issue is more human nature and things moving to the web creating inequality between the technically adept and non-adept.
Re:I had to build a web scraper to buy groceries by somebodynew on Saturday March 28, 2020 @10:12PM (#22715816)
Bots are typically used to buy out a limited supply of something like concert tickets. Clicking quickly or responding immediately to availability changes wouldn't give bots any advantage when there's nothing but a FIFO queue.

If I were setting this up for a grocery delivery platform, I would require the delivery address be provided upfront to enter the queue. Validate and standardize the address using the official Postal Service API (in the US). Prohibit changing the delivery address once in the queue, and prohibit the same address from appearing in the queue multiple times. Those requirements eliminate the mechanical possibility and incentive to partake in any sort of hoarding or profiteering using bots.

Re:I had to build a web scraper to buy groceries by xzel on Saturday March 28, 2020 @10:24PM (#22715855)
But unfortunately there are a limited number of per day delivery slots, so bots will own anything FIFO. They will monitor the page and be the first ones in. There also aren’t really fully standardized addresses per se, it’s actually kinda weird, but what’s stopping anyone using the apartment number next to them and receiving the delivery when notified?
Re:I had to build a web scraper to buy groceries by gruez on Saturday March 28, 2020 @10:32PM (#22715889)
>But unfortunately there are a limited number of per day delivery slots

I guess the idea is to put everyone in one queue, rather than having separate queues per day/slot. Presumably this isn't an issue since everyone's on lockdown anyways, so they're always available to accept a delivery.

Re:I had to build a web scraper to buy groceries by reaperducer on Sunday March 29, 2020 @12:17AM (#22716369)
I guess the idea is to put everyone in one queue, rather than having separate queues per day/slot.

And now you've just excluded all the doctors, nurses, police officers, firefighters, and their families from using the service.

Re:I had to build a web scraper to buy groceries by squeaky-clean on Saturday March 28, 2020 @10:58PM (#22715991)
But there are only so many delivery people. 1,000 delivery people simply cannot give 2,000 people their groceries within a 1 hour window. The timeslots manage when the deliveries occur. People also sleep at different times, and some essential employees are still working, so you can't simply deliver the groceries to everyone without a known time.
Re:I had to build a web scraper to buy groceries by cortesoft on Saturday March 28, 2020 @10:33PM (#22715894)
Just let people order far in advance then?
Re:I had to build a web scraper to buy groceries by Nextgrid on Saturday March 28, 2020 @10:17PM (#22715833)
Sneaker stores rely on exclusivity so the bots used by resellers are considered a problem. Of course, the real problem is the idea of exclusivity in the first place but that’s besides the point.

Supermarkets don’t have that problem - their goods are not that exclusive and not sought after at scale (anyone wanting to resell the products at scale can get them cheaper from the manufacturer directly).

Re:I had to build a web scraper to buy groceries by meritt on Saturday March 28, 2020 @10:22PM (#22715844)
If it wasn't for the reselling market, there wouldn't be the same level of demand for sneakers. They're just shoes.
Re:I had to build a web scraper to buy groceries by xzel on Sunday March 29, 2020 @12:57AM (#22716536)
I think its primarily the "limited" number produced, which created the market and brought resellers. There wasn't a huge secondary market when Jordan came out, they had to build a brand etc. Eventually there was more demand than the number of products and reselling became a bigger thing. Also I put limited in quotes because a lot of the bigger runs are huge world wide. The main profit that is left is extremely small runs or the smaller sizes (which themselves have smaller runs). But just like a Black Lotus MTG card is just a piece of paper with some ink on it, they aren't necessarily just shoes, they're "limited" shoes.
Re:I had to build a web scraper to buy groceries by gruez on Saturday March 28, 2020 @10:36PM (#22715906)
>If it wasn't for the reselling market, there wouldn't be the same level of demand for sneakers

You can say that about literally anything. The value of anything goes up if it's liquid.

Re:I had to build a web scraper to buy groceries by koolba on Sunday March 29, 2020 @12:26AM (#22716410)
Not quite. The spread narrows if it’s liquid. All else being equal, a liquid asset is preferred over an illiquid one, but liquidity does not mean something is more valuable.

It just means the price paid or received is closer to the consensus valuation.

Re:I had to build a web scraper to buy groceries by toomuchtodo on Saturday March 28, 2020 @10:01PM (#22715775)
Require SMS or callback confirmation of the order slot using a non-Google/Twilio/SIP number (mobile phones or landlines both work here). Provide for one time order cancellation at no cost, cancellations after that incur a $10 cancellation fee.

This should negate any technical advantage from a sophisticated entity. Queues still work, if managed properly.

Re:I had to build a web scraper to buy groceries by gruez on Saturday March 28, 2020 @10:37PM (#22715910)
>Require SMS or callback confirmation of the order slot using a non-Google/Twilio/SIP number (mobile phones or landlines both work here).

How does this deal with bots that places orders on other people's behalf?

https://news.ycombinator.com/item?id=22715875

Re:I had to build a web scraper to buy groceries by toomuchtodo on Saturday March 28, 2020 @10:58PM (#22715993)
It does not provide for them.
Re:I had to build a web scraper to buy groceries by amelius on Saturday March 28, 2020 @10:06PM (#22715790)
Cancellation costs may be against local consumer laws.

But I think you wouldn't need it with upfront payment and some simple anti-hoarding rules.

Also the delivery address or payment id could be used in a way to make this fair.

Re:I had to build a web scraper to buy groceries by toast0 on Saturday March 28, 2020 @10:36PM (#22715907)
Grocery delivery needs an address. You could pretty easily limit to one queued order per address, and limit order changes.
Re:I had to build a web scraper to buy groceries by anbop on Sunday March 29, 2020 @02:24AM (#22716849)
One hack around address limits is to put in a unit number. 1 Park Avenue or whatever in Manhattan will have multiple units in it. And if you live in one of these units you can add a letter, like "Unit 522B" which will just get delivered to your unit 522.

Some companies have databases that know the layouts in each address but many do not.

Re:I had to build a web scraper to buy groceries by toast0 on Sunday March 29, 2020 @12:19PM (#22720177)
And when the grocery delivery person comes and sees the addresses don't match, your address gets blacklisted.
Re:I had to build a web scraper to buy groceries by anbop on Monday March 30, 2020 @01:19AM (#22725462)
Never happened to me. If there are no letters after unit numbers, and the delivery person sees a delivery for unit 522B, they'll leave it at 522.
Re:I had to build a web scraper to buy groceries by gruez on Saturday March 28, 2020 @10:29PM (#22715875)
>Web queues are ineffective as shown by sneaker bots. You’d need actual ID style authentication of accounts.

...and that's rendered ineffective by SaaS bot companies that take your account logins and payment details and places the orders on your behalf, for a fee of course[1]. The economically efficient solution would be to auction off the slots, so at least the grocer is reaping the profit rather than some third party. It also has the benefit of capitalizing the grocer so they can hire more people and/or buy more equipment so there are more slots in total. Also, if it bothers you that some FAANG programmer can afford deliveries than some old granny, this can be alleviated by reserving a certain % of the slots to "needy" people (eg. old, disabled, sick, immunocompromised) subject to validation.

[1] kinda like https://en.wikipedia.org/wiki/Domain_drop_catching

Re:I had to build a web scraper to buy groceries by xzel on Saturday March 28, 2020 @11:38PM (#22716166)
Totally agreed. It’s the classic “hiring people to wait in line for you” solution. Eh I don’t think surge pricing should be put anywhere near this problem and it’s certainly not economically efficient in the classic sense, that is creating the most economic output and benefit for the consumer.
Re:I had to build a web scraper to buy groceries by chris_va on Saturday March 28, 2020 @10:38PM (#22715915)
This assumes it's easy to resell a slot, which may not be correct (eg if you have to put in your delivery address when entering the queue). Tickets are a very different commodity.
Re:I had to build a web scraper to buy groceries by gruez on Saturday March 28, 2020 @10:43PM (#22715936)
>This assumes it's easy to resell a slot

That's not what I'm saying. Rather than buying a slot (or an account) from the bot operator, you'd give the bot operator your order and address/account/payment info, so when the slots become available, the bot operator can place an order on your behalf.

Re:I had to build a web scraper to buy groceries by admax88q on Saturday March 28, 2020 @10:53PM (#22715967)
Isn't that just what amazon should already be doing?

They need an option for people who are flexible with their delivery times, put in your order and they assign you a delivery slot when one opens up.

If a bot can do that, then amazon can just do it themselves and actually improve the user's experience.

How many people are working from home right now that don't can _when_ groceries get delivered other than "the next available slot"

Re:I had to build a web scraper to buy groceries by michaelmrose on Sunday March 29, 2020 @06:06AM (#22717710)
You are solving the wrong problem. Curbside pick up is about as safe as delivery for 1/3 the labor cost and the grocer already has enough people if he uses everyone.

A food delivery auction would in some segments drive up the cost drastically when some can least afford it fuelling panic. This panic would fuel buying and hoarding.

Meanwhile the poor flock to the shelves to buy before the rich can pay to have it all delivered for hoarding.

Surge pricing for groceries during a crisis may be one of the worse ideas I've seen on hacker news.

Re:I had to build a web scraper to buy groceries by anbop on Sunday March 29, 2020 @12:22AM (#22716386)
I mean for Amazon Prime you have to have a Prime susbcription to even play, so the $129/year fee is a good barrier to bots.
Re:I had to build a web scraper to buy groceries by Zarel on Sunday March 29, 2020 @01:33AM (#22716691)
It seems to me that that they already have a 4-day-long queue, and the error message is in fact a "the queue is full" error.

Why not a longer queue? I don't know, but I'd guess people forget about their order and buy redundant things, causing support and customer satisfaction problems, if the queue is longer than 4 days.

Re:I had to build a web scraper to buy groceries by jedieaston on Sunday March 29, 2020 @09:37AM (#22718894)
Probably because if I'm going to wait four days anyway, I'll probably just say "Gee, guess I'll just drive down there and get it".
Re:I had to build a web scraper to buy groceries by jvvw on Sunday March 29, 2020 @07:22AM (#22718071)
Ocado in the UK has been having queues to get onto the site and limiting people to one slot per week. They are now giving people who have been paying for delivery passes before 2020 priority access to the site one day per week (divided randomly into 7 groups) to book slots. I presume they are also doing something similar for vulnerable customers. I have wondered whether if it'd be possible to hack the queuing process somehow but imagine the number of people capable of doing that would be tiny and am too honest to consider myself! I'm more wrangling with whether it is ethical to take a slot at all (but we are getting allergen-free stuff for another family and don't want to let them down).
Re:I had to build a web scraper to buy groceries by hazeii on Sunday March 29, 2020 @05:05AM (#22717439)
Ocado in the UK do exactly this, using queue-it [0].

On some sites, apparently queue-jumping is as simple as disabling javascript (n.b. Ocado [1] have been in the game longer than most, and this does not work on their site).

[0] https://queue-it.com/ [1] https://ocado.queue-it.net/

Re:I had to build a web scraper to buy groceries by singhyuk on Sunday March 29, 2020 @05:06PM (#22722739)
This does work on Ocado, but you also need to disable redirects also by the way
Re:I had to build a web scraper to buy groceries by megous on Saturday March 28, 2020 @09:45PM (#22715697)
Some websites do put you in a queue to get to the actual website/shopping. You don't even get to access the website until it's your turn. Like waiting in front of a shop.

Not a great experience if you want to just access your account, or some general information on the website, like contact info, or delivery times.

Re:I had to build a web scraper to buy groceries by sauravs on Sunday March 29, 2020 @01:18PM (#22720690)
It is a good idea. And may be telling the waiting list number or queue number will help. Because otherwise the buyer has to every-time visit the page. User acknowledgement through queue token or waitlisting number will help.