31 ms·
38 People are looking at this post right now
- vinayakkulkarni 7y agofinally, a use for Math.random()
- mschuetz 7y agoWhat's wrong with Math.random()? I use it all the time (graphics) and it works like a charm.
- guessmyname 7y agoRead these articles to know what is wrong with Math.random() • https://medium.com/@betable/tifu-by-using-math-random-f1c308c4fd9d https://medium.com/@betable/tifu-by-using-math-random-f1c308... • https://hackernoon.com/how-does-javascripts-math-random-generate-random-numbers-ef0de6a20131 https://hackernoon.com/how-does-javascripts-math-random-gene... • https://news.ycombinator.com/item?id=10751396 https://news.ycombinator.com/item?id=10751396 • https://v8.dev/blog/math-random https://v8.dev/blog/math-random > Many random number generators in use today are not very good. There is a tendency for people to avoid learning anything about such subroutines; quite often we find that some old method that is comparatively unsatisfactory has blindly been passed down from one programmer to another, and today’s users have no understanding of its limitations. — The Art of Computer Programming, Volume 2, by Donald Knuth
- thaumasiotes 7y agoThat hackernoon post is... unimpressive. Its main argument seems to be that Math.random() uses a PRNG instead of a source of true randomness. That is not compelling. It becomes less compelling accompanied by claims like this: > So now the question is: what PRNG does JavaScript use? > The answer: none. There is zero discussion of why xorshift128+ might be suitable or unsuitable for any given purpose, or of what its characteristics are. The whole thing is just the observation that, if you can understand the raw mechanics of the PRNG, you can have a good laugh at the idea that deterministic bitwise operations are "random". It does mention that browsers standardized on xorshift128+ in the nearly-forgotten days of 2015, which would seem to make your Knuth quote inapt.
- mschuetz 7y agoThere is absolutely nothing wrong with that. What kind of random number generation you need depends entirely on your use case, and for my use cases it's just fine since "better" random number generators won't give me better results. If you really have strict requirements on your random number, then yeah, you will have to find another solution.
- 5- 7y agoHere's the twitter thread in the screenshot: https://twitter.com/OphirHarpaz/status/1184486445039411201 https://twitter.com/OphirHarpaz/status/1184486445039411201
- lainga 7y agoSomeone else in that thread asks: > I wonder if they report a lower price to Google as well. Presumably for the little boxes which show up below certain Google ads with price points []. I know that's against Google Ads' policies, but has anyone heard of it happening nonetheless? [] https://support.google.com/google-ads/answer/2497706 https://support.google.com/google-ads/answer/2497706
- burk96 7y agoYes it happened to me, a hotel was priced significantly cheaper on Google and on their site initially. When the price went up I just called the hotel and the higher rate was their standard and only rate that they offered. The initial advertised price was never an actual option.
- nothrabannosir 7y agoIsn’t that plain illegal, full stop? If that’s not the textbook definition of false advertising then I don’t know what is.
- cwkoss 7y agoYes
- ben509 7y agoIf the Lanham act applies, possibly[1]. This isn't typical false advertising, though, as it's not claiming their service does a thing it doesn't nor is it defaming a competitor, it's lying about interest in the service. Looking at the criteria: > (1) a false statement of fact has been made about the advertiser's own or another person's goods, services, or commercial activity; I think a fake number of people looking is a false statement of fact about commercial activity. > (2) the statement either deceives or has the potential to deceive a substantial portion of its targeted audience; Seems like a false number would deceive anyone who saw it. > (3) the deception is also likely to affect the purchasing decisions of its audience; And it would induce them to purchase when they might otherwise hold off the decision. > (4) the advertising involves goods or services in interstate commerce; and It's the web, so naturally. > (5) the deception has either resulted in or is likely to result in injury to the plaintiff. This is where it gets dicey and you'd need to ask a lawyer, or someone familiar with case law. The source I'm citing goes on to say: > The injury is usually attributed to money the consumer lost through a purchase that would not have been made had the advertisement not been misleading. I think if you could show, "I would have shopped for another price if I didn't think this was almost sold out," then you might have a case. But... I suspect your damages would be the difference in prices between booking.com and some competitor, which are likely to be fairly small. The source has a whole section on remedies that might apply. [1]: https://legal-dictionary.thefreedictionary.com/False+Advertising https://legal-dictionary.thefreedictionary.com/False+Adverti...
- ignoranceprior 7y agoIs this legal?
- brinox 7y agoI can only speak for Germany, where it's definitely not.
- orangepanda 7y agoCan you cite a law? For future reference.
- jotaen 7y agoE.g. §5 UWG [1], the law against unfair business practices (“unlauterer Wettbewerb”). See also [2]. [1] https://www.gesetze-im-internet.de/uwg_2004/__5.html https://www.gesetze-im-internet.de/uwg_2004/__5.html [2] https://de.wikipedia.org/wiki/Unlauterer_Wettbewerb https://de.wikipedia.org/wiki/Unlauterer_Wettbewerb
- smitty1e 7y agoHow would you write a law to make it illegal? The better remedy is precisely what is occurring: someone calls the Emperor's bluff, and we all get on HN and engage in cheeky humor.
- throwaway66920 7y agoFalse advertising?
- smitty1e 7y agoHow are you actually going to prove the state of a distributed system in an legally actionable way?
- jrochkind1 7y ago
- kennywinker 7y agoI have two reactions: 1) lol 2) This should be illegal.
- microcolonel 7y agoMight be unlawful anyway, if you could argue that you were sold "a plane ticket being considered by 38 people" rather than just "a plane ticket".
- zzo38computer 7y agoYes, I think it is false advertising, so should be illegal.
- lainga 7y agoThe only way out of it I can think of would be: if the site could prove that some number of people, greater than 45, were hitting that specific query on that specific page, then vacuously, they could say that any number of people between 1 and 45 were also looking at the offer. But then, why wouldn't they just display "at least 45 people" or the exact number? I'm struggling to find some way of doing this which could be any stupider (`view_notification_random` ??) than what we see.
- gherkinnn 7y ago“But..” stammers the dev “I have no real way of knowing just how many people are looking at this offer.” “But in Sprint Planning round 4 you told me the API is ready” responds the PO sternly. “Sprint ends tomorrow. I gave you the story. You committed to the goal. Them’s the rules.” “Ok, Ok. Tell you what, I’ll make something work and we’ll write a follow up story to make this right. Does that please you, mighty Owner of Product?”
- nothrabannosir 7y agoThe source code literally calls Math.random. I hope that defence wouldn’t fly in court, even if accidentally true.
- rolltiide 7y agoAlways get in the seat of the defense. I would absolutely have made a few headless browsing bots masquarading as users just incase this scenario occurred Look your honor the logs say other users, “people”, were looking regardless of our random function
- nothrabannosir 7y ago
- colmvp 7y agoI'm noticing that even Etsy does this by saying that "n people have this their baskets right now." That might be so, but it's not like most of the items are scarce. For example, I ordered a t-shirt and the seller just used a local t-shirt company to produce the shirt and mail it to me since it was cheaper than mailing a shirt through international delivery lol
- poisonborz 7y agoSo some manager came up with this, tasked a PO, who tasked a team, and a frontend developer implemented it - and in this chain, in the end, everyone complied. I know it's not like murder, but especially in a field where it's so easy to hop into another job/project, one should have greater integrity.
- WrtCdEvrydy 7y agoThis is why real freedom is financial freedom. You don't like what's going on at work, find another job.
- GordonS 7y agoI have to agree. I know that for some people it's not easy to just find another job for various reasons, and I've had that problem myself over the years - but there is a line you just don't cross; this is such a line. Deliberately and purposely lying like this is never OK.
- matz1 7y agoCan't assume they don't have integrity. They might just have different moral values. I would gladly implement this any day. Its not illegal.
- microcolonel 7y ago> Its not illegal. Fulfilling your basic legal obligations is not the definition of integrity, and often the two are at odds.
- matz1 7y agowhat is your definition of integrity ?
- jedberg 7y agoIntegrity -- the quality of being honest and having strong moral principles; moral uprightness. The definition of integrity requires honesty. Do you think it is honest to tell people "there are 38 rooms left" when you know 38 is a random number? The definition also requires you to act morally. Do you think that anything legal is moral, and vice versa? Slavery was legal. German extermination camps were legal. Were these moral? Smoking weed is illegal. Is it immoral?
- jayflux 7y agoI want to add Hanlon's razor to this. Some are pointing straight to malice and intentional misleading. It wouldn’t surprise me if they wanted to make it genuinely work originally, but realised they could save a lot of money, resources and sprints just faking it in js. More laziness and “oh shit this project was bigger than we thought let’s find a shortcut” than outright malice.
- abootstrapper 7y agoI wouldn’t be surprised if it genuinely worked to begin with, but the numbers were lower than they expected so then they just made it random.
- ggm 7y agoThat's not Hanlon's razor: they had a moment where they commit an act of fraud by intent, not by incompetent behaviour.
- microcolonel 7y agoFor another example: for about two years, Twitter on the web had a feature in the notifications section, a dropdown on each notification item with a "See less often" option which appeared to the user to send feedback or preferences to Twitter, but in reality sent nothing.
- boulos 7y agoThe Twitter thread pointed to a BBC article [1] that certainly suggests that the UK’s regulators don’t think this is okay. I’ve found that Booking.com legitimately treats independent rooms as “only one left” (e.g., the B&B has named rooms, so there’s always just one of a kind for each) but I suspect any investigation into most of these sites leads to “this is full of misleading dark patterns”. [1] https://www.bbc.com/news/technology-49740143 https://www.bbc.com/news/technology-49740143
- Insanity 7y agoBooking.com is horrible to use in my opinion. It is handy but you need to ignore the dark patterns on every. Single. Page. Honestly it makes me want to use the website less, and does not urge me to buy.
- Gibbon1 7y agoI wonder about an app that just has phone numbers and a short description of hotels. If there are 50,000 hotels in the US, and you store 1K worth of data, that's only 50M. You could keep that on a phone no problem.
- Kliment 7y agoSadly that list doesn't answer the most important questions - do they have availability for a particular date, and at what price
- lotsofpulp 7y agoRoomkey.com has that information for all the major hotel brands, and it’s owned by the hotel brands themselves.
- hombre_fatal 7y agoI recognize roomkey.com from various Clojure related blog posts and interesting tech talks iirc. https://cognitect.com/roomkey-case-study.html https://cognitect.com/roomkey-case-study.html https://techblog.roomkey.com https://techblog.roomkey.com
- gherkinnn 7y agoI love imagining the Jira ticket for these. “As a desperate guy trying to save his marriage with a last-minute holiday, I want to know just how many other lost souls I am competing with, so I loose what little dignity I have left”
- mc3 7y ago"As an evil corporation, we need to make money, so we'll lie to the customer."
- sword_smith 7y agoI like that these things are being revealed and I previously read stories that these techniques were getting less effective since more people are aware of them. That's at least half the battle. Legal punishment of this behavior is not something I think I would support since I would be worried about it being impossible or at least very hard to enforce properly.
- etiam 7y agoGovernments the last few decades seem to insist on the power to seize the electronic money of just about anyone. Not sure that's a happy development, but as the capability's there anyway, couldn't one just serve the advertiser an order to defend their false claim in court and take the fine out of their bank accounts if they don't show? I'm being facetious here, but not entirely.
- sword_smith 7y ago> Governments the last few decades seem to insist on the power to seize the electronic money of just about anyone. Going tangential here but that is why Bitcoin is so powerful. Because it takes that power away from government.
- jchw 7y agoA dark pattern implies something that is intentionally misleading. This is just lying. This is not a dark pattern because it’s Worse.
- OrgNet 7y agoLying, just like "parallel construction".
- buboard 7y agoI mean, you can't be sure they're lying. Odds are nonzero that 38 ppl were looking at that flight
- tmh88j 7y ago>I mean, you can't be sure they're lying. Odds are nonzero that 38 ppl were looking at that flight I suggest you click on the link, they absolutely are lying. They're using JS to generate a random number between 28 and 45. If there happens to be 38 people looking at that flight it's entirely coincidental.
- vgaldikas 7y agoYou don't do sarcasm, do you
- runarberg 7y agoIt is lying. They claim something that they have no evidence for. Whether the number truly is 38 at that moment is irrelevant in this case. Because if the number was 0, 42, or 1437 they still would have made the claim that 38 were looking at that flight.
- JMTQp8lwXL 7y agoIn any negotiation, nobody should take (at face value) the reported interest of the other party. A real estate agent could say a dozen people dropped by the home earlier today. You'd be foolish to believe it. You'd be foolish to believe Booking.com saying there's 1 room left, or the number of people currently looking at a webpage.
- duxup 7y agoThere's a product I've bought regularly at Amazon, it perpetually has 3 or less left in stock, but never goes out of stock. Also I was buying airline tickets and Delta told me there were just 2 left at this price for ... a plane nearly 70% empty.
- mertd 7y ago> Also I was buying airline tickets and Delta told me there were just 2 left at this price for ... a plane nearly 70% empty. I don't think that's a contradiction given how many price tiers there are. Next price may only be $5 higher though.
- kevinkimball 7y agoIn delta’s case that is correct. There are two left at that price (in that fare bucket). After they sell those seats, they will be selling from a higher fare bucket and the price will go up
- duxup 7y agoMaybe but the pricing charts I've seen show fairs rising and falling. That may be the case at the moment but if they shift those buckets I think it is also untrue unless it says 2 left.... unless we just change the price later.
- kortilla 7y agobuckets (a.k.a. fare classes) can change in price. Also, some airlines will not sell certain fare classes on certain days or release all of the fare class seats at once. The airline definitely isn’t lying when they say there are a certain amount left at that price. I’ve seen the price change at those exact amounts when booking tickets for groups of people individually.
- kccqzy 7y agoFor airlines that's probably true. I fly United quite a bit and they have an expert mode where you can choose specific fare classes. Even within "deep discount coach" there are different pricing tiers like K, L, G, S, or T. That doesn't include "discount coach" or award booking or business or full fare coach. The only potentially troubling aspect is that they don't tell you how much more expensive the next pricing tier will be.
- perfectstorm 7y agoone of my friends used to work for Agoda as a software engineer who said similar things about his company using dark patterns to fake urgency. This is very common in the travel industry and i've seen many companies employing similar tactics.
- tahdig 7y agoAgoda seems to be owned by Booking Holdings which I think implements these kind of dark patterns most aggressively.
- microcolonel 7y agoIf you work long enough on web-based software for a wide enough variety of companies, you too will get a chance to refuse to write that feature.
- tomxor 7y agoThe responses in the redit thread are interesting: So many people claim they have experienced legitimate versions while making a purchase, although provide questionable evidence to support that it was valid. Is this some psychological bias for buyers?
- theevilsharpie 7y agoYou can look at practically any popular Reddit thread complaining about X, and find dozens of anecdotes about how they also had problems with X. Once you see these threads enough times, you start to wonder how many people are discussing an actual personal experience, vs. parroting what they've read or heard from someone. I'd be interested to know if there was some type of scientific or trade name for this kind of behavior. In any case, bear in mind that the plural of anecdote is not data.
- mberning 7y agoThis absolutely works on some sites. Home Depot is a legitimate example. If their app says there are 3 of something on the shelf there usually is exactly that many. If you buy it and check back in the app the inventory goes down immediately.
- jamesfisher 7y agoLove this: HN link to Reddit screenshot of a Twitter thread. Welcome to the modern web.
- raben_ 7y agoFunny thing is that it works. 15% CR uplift in the last website where I tested it
- techsupporter 7y agoOf course it works, because lying to people to instill a sense of urgency plays on our base emotions and gets us to do things we might not rationally do. Sellers of snake-oil and other fake "remedies" have been using this sales tactic--"your friends and neighbors have already tried it, look here, see this line of people ready to buy!" that are all plants--since the days of the horse-and-buggy. Doesn't mean we should still keep lying to our friends and neighbors.
- jawns 7y agoThere are some organizations (though I don't know how plentiful) that use real data to derive these alerts. And I'd say that as long as it's all above-board and not fake data, that 15% is legitimately earned.
- asimilator 7y agoThanks for making the world just a little bit worse :(
- srameshc 7y agoAnd I always assumed they use some sockets to sync that count from server. How dumb to just fake on the client side.
- oxplot 7y ago%99.999 of people aren't going to look up the legitimacy of this. Why spend development effort where the likelihood of getting caught is so low. And even when "getting caught" isn't that big a deal.
- slededit 7y agoBecause the FTC only needs to look at it once for them to give you a big fine or put you out of business. They take time but they do get around to these things. I was watching an old taped documentary on YouTube, and when I looked up the products in the commercials a good number of them were taken down by the FTC.
- hombre_fatal 7y agoTakeaway: Just create a GET /current-viewers?id=42 endpoint and generate the random number on the server. It'll satisfy all the HNers calling for legal action / off with their heads.
- lifestyleguru 7y agoIn a mobile app one wouldn't even have a way to investigate this.
- GordonS 7y agoI don't know about iOS, but at least on Android it's easy to decompile Java. Variable names aren't going to be the same, so you won't see the deliberate intent as you see here, but you'd still see that the number was randomly generated. Now, if they generated the value server-side then we'd really never know, whether it's a mobile app or a web page... not that I want to give scumbags ideas, but this is pretty obvious.
- dewey 7y agoWhy is that? You can easily look at the requests and see where the numbers are coming from. It's not as easy as right clicking in the browser but if it would be a normal Desktop app it would also not work like that.
- aembleton 7y agoBecause they are being generated locally using Math.random.
- tahdig 7y agoI imagine sometime in 2030 when a 60 yo uncle/aunty sees this "38 people are looking at it", calmly right clicks on the HTML elements and sees the use of math.random and says "Nope, bye bye stupid website". I think these tricks are closing on their end of life as percentage of internet-native people are increasing.
- bsaul 7y agoExcept with wasm and mobile, being able to look at source code will probably also be a thing of the past.
- tesin 7y agoI think it's natural to feel like the populace is heading to a more competent place as the elderly age out, but anecdotally I think the opposite might be true. I've met kids in middle/high school who didn't understand how to do rudimentary OS operations, resolve email disconnections, update apps that didn't come from a store etc. The worst was when I taught a semester as an adjunct. Most of my students simply were unable to zip files together and send them as an attachment... Internet native in the iOS era is seemingly much worse than the XP era
- amiga-workbench 7y agoThe next generation are being raised on iPads, computer literacy is plummeting because they're only exposed to appliances, not real computers. It's sad, but it's good for our job security!
- JMTQp8lwXL 7y agoIt'd be difficult to infer that Math.random was used, purely by the element inspector. You'd actually have to sift through JavaScript code, which may or may not be minified (likely so, though).
- GordonS 7y agoIncredible that they would implement such a dark pattern using easily discoverable client-side code. I've seen these kind of messages before on several travel sites, and always immediately figured they were bogus, but I obviously can't be 100% certain they didn't influence me in some way - but how can it possibly be legal to deliberately lie like this to try to trick people into giving you money?
- elil17 7y agoIt’s not legal (false advertising) but it’s not something anyone will sue over because of how hard it is to show damages
- bedros 7y agocheapoair.com did a similar trick on me few years back. I searched flights and after finding my flight, I clicked book. waiting for few seconds with a spinning thing , I got error message that the airline increased flight price, and I have to pay the new price. So, I went straight to airline website to check their price, and it was lower than the first low price cheapoair showed me. since then, I always check direct pricing before booking
- klingonopera 7y agoI've experienced the opposite case, got a flight suggestion by a booking agency, checked prices for the same flights directly at the airline, and they were higher.
- barnaclejive 7y agoWow, if you are going to do this, at least have the JS call some endpoint like "/check-how-many-people-also-want-this/some-id" and name the element "how-many-people-also-want-this". As a dev tasked with implementing this dark pattern that is the least you could do.
- pirsquare 7y agoBefore anyone has any interest in replicating this - keep in mind that: Trust is earned. Credibility is built. Go long - don't create fake social proofs and ruin your own reputation. I can say with assurance that nobody in this thread will buy anything from OneTravel or their founders again.
- stevewodil 7y agoCounterpoint: I had never heard of OneTravel and now in a little while I will have forgotten about this incident, but the name recognition will still exist for me, and therefore I'm more likely to trust them.
- closed 7y agoI don't think this lines up with memory research. It's true that people commonly make source monitoring errors, but generally feeling negative affect toward something enhances memory. People might forget the specific company, but I doubt they would feel more trust toward travel companies in general. https://en.m.wikipedia.org/wiki/Source-monitoring_error https://en.m.wikipedia.org/wiki/Source-monitoring_error https://www.apa.org/science/about/psa/2011/10/positive-negative https://www.apa.org/science/about/psa/2011/10/positive-negat...
- designcode 7y agoI dont really care as long as I get a good price, just happened to purchase something from them a couple hours ago even knowing all this stuff.
- DavidSJ 7y agoA while back I was working at a web startup (since folded), and management decided they wanted to inflate the usage numbers reported on the home page. I was asked to write the code for it. I refused, telling my boss that I didn’t want to lie to our users. He said, “it’s not for them, it’s for the board.” “So we’re lying to the board, then?” I asked. He dropped it, and the task fell to another engineer. The first version was deployed, with one slight oversight: he forgot to round the number the algorithm generated, so the home page displayed something like “157,311.18461947940563848871625 active users this month!” The bug was quickly rectified.
- Eli_P 7y agoI'd pitch that to the board like the algorithm was just smart enough to detect the partial activity coefficient ranging in [0, 1].
- giancarlostoro 7y agoSpoiler alert: just like in that epsiode of Silicon Valley but cheaper!
- foxhop 7y agoRelated, faking notification counts to get clicks is a dark UX pattern: https://www.remarkbox.com/finally-a-disqus-alternative.html https://www.remarkbox.com/finally-a-disqus-alternative.html
- kuon 7y agoLately, I found that booking directly with the companies was often the same price or cheaper that all site I could try. It might be different in US (I book flights from Europe, because, well, I live there). Lufthansa often has the best price directly on their site. Same thing for hotels, you can get a better price if you book directly with the hotel, but of course you don't get all the booking.com (or similar site) niceties like free cancellation.
- fma 7y agoPretty much same in the US. You get better treatment if you book directly, too (a room not by the elevator, for example) I've gotten shafted with my reservation being lost by a 3rd party booking company enough that I prefer direct booking.
- BrissyCoder 7y agoSame thing in Australia. I use sites like lastminute and trivago as search engines then contact the hotels directly. If I stay in an AirBnB that is good I'll make sure I get the hosts contact details so can bypass AirBnB next time I stay there.
- Iv 7y agoHow is this legal?
- pkaye 7y agoWhen booking hotels, I prefer to call them up directly. Many times just being nice to the staff you can get a much better deal than elsewhere online. And also better cancellation policies.
- sbanach 7y agoHappens all the time. Here's another good one: https://www.nbim.no/ https://www.nbim.no/ (the Norwegian Sovereign Wealth Fund) Is a <1s live ticking number implausibly high frequency? Of course, it's just spooling out numbers on a timer.
- hoseja 7y agoI'm OK with those, it's likely a semi-accurate interpolation.
- winrid 7y agoHeh. I bet there will be legal issues with this approach at some point. They should use the thing I made, watch.ly :) No lies that way! Shameful plug.
- jakub_g 7y agoFWIW: I got pissed some time ago about Booking.com and Easyjet doing this, so I created an adblocker filter list to filter out those messages. I haven't really checked lately if it still works, but feel free to use and contribute if you want. It should work with ABP and uBlock Origin. https://github.com/jakub-g/no-urgency/blob/master/no-urgency-blocklist.txt https://github.com/jakub-g/no-urgency/blob/master/no-urgency... All you need to know to contribute is basic CSS.
- alainchabat 7y agois there any plugin/website to find out the "normal" price of a hotel / flight at a given time?
- hacym 7y agoHopper is an app that will do it got flights, and I think Google Flights will also tell you if the price of a flight is good or not. Dunno about hotels.
- atian 7y ago~45 must be an okay approximation of concurrent visitors they get per popular search.
- csorrell 7y agoanother dark pattern these kinds of aggregator sites do is up the price on flights/hotels that you've recently viewed. so if you are looking at a flight, then continue to browse for a bit to see other options, when you come back to that flight the price will have increased, as though it were no longer available. if you clear your cookies or open in another browser though, you'll find the original lower price again.