HNHacker News
TopNewBestAskShowJobs

andy800

450 karma · joined February 19, 2016

hackernews@andy800.33mail.com

https://www.thehousesometimeswins.com

submissionscomments
andy800··on Tricking Monty Hall
Yes, the whole point is that the car doesn't move. When you initially chose, you had a 1-in-3 chance of correctly choosing the door with the car. The host is now offering you to switch over to, essentially, "all the doors you didn't choose", which means 1-(1/3). As you state, you've only got one opportunity to play, and the car itself hasn't moved, but you can switch your choice. Stick with the initial 1-in-3 chance, or go to the other side, i.e. 2-in-3 chance?
andy800··on Tricking Monty Hall
> casinos have spent millions of man-hours of research

You'd be surprised, casinos, in fact, spend almost zero time actually working through the math of their games. All the established table games are taken for granted, and for anything new -- entirely new games or side/extra bets -- the responsibility lies on the game inventor to have a trusted 3rd party validate the math (this is usually enforced by the gaming commission) and the casino simply refers to the validated results when considering implementing the new game/wager.

Any consideration of "social stigma" about a wager is nil. As an example, baccarat is fundamentally a boring game with zero decisions, however the actual gameplay, where players have all kinds of superstitions and are allowed to touch, tear, fold the cards, can be extremely social and often quite exciting. Casinos could deal blackjack in a similar, social fashion where all players share a single hand, but none do. And certainly, no casino would shift the odds in the players' favor (pay on 12 on Don't) for some kind of social impact, as any positive benefit would be 10x, 100x subsumed by professional bettors exploiting the positive EV.

andy800··on FDA says aspartame is safe, disagreeing with WHO finding
I can speak to this, anecdotally, as I read this comment, at a restaurant, on my 3rd Coke Zero refill.

I realized a long time ago that I really enjoy drinking soda, and not much else. Very little interest in alcohol, sure I have some with friends but never when alone. Don't drink coffee (I have, of course, but never particularly enjoyed it or drank it regularly). I do enjoy Gatorade and fruit juice, of course it's because they are sweet.

Anyway, I also realized that if I'm going to drink soda regularly, I had to switch to diet. Just for the calories, really, at the time concerns about sugar weren't as prominent. But I gained a bit of weight in my late teens and switching to Diet Coke was a "free" reduction of 500 calories per day. "Free" as in, easy to switch, no dieting, no eating less, etc.

My point here is that I think the refill situation is the opposite of what you suggest -- diet soda doesn't cause me to drink more, it's the fact that I've always drank a lot of soda that caused me to choose diet soda.

Oh, and maybe it's related, I love chewing on ice that has been doused in soda. A server sees an "empty" glass and wants to clear it, but I see a mountain of delicious ice. Weird, I know.

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
> payout laws to be written in such a way that "eventually" you'll "probabilistically" hit your payout targets.

This is exactly how they are written. Except, there is no specific payout target (this game must payout 92% of wagers), there is a mandated minimum, any game which exceeds the minimum is lawful. Note the word "theoretical" in each of these:

New Jersey Admin Code 13:69E-1.28A: (a) Except as otherwise provided in this section, each slot machine game which requires a wager shall have a theoretical return to player (RTP) equal to or greater than 83 percent.

Mississippi Title 13, Chapter 12, Rule 12.5: Rule 12.5 Minimum Standards For Gaming Devices. All gaming devices submitted for approval:v(a) Must be electronic in design and operation and must be controlled by a microprocessor or the equivalent. Microcontrollers are allowed.v(b) Must theoretically pay out a mathematically demonstrable percentage of all amounts wagered, which must not be less than eighty percent (80%) or greater than one hundred percentv(100%) for each wager available for play on the device

Pennsylvania 58 Pa. Code § 461a.7: (a) A slot machine may not be set to pay out less than the theoretical payout percentage, which may not be less than 85%, calculated using the lowest possible wager that could be played for any single play, or equal or exceed 100%, calculated using the highest eligible wager available.

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
Slot machines do not have to pay out a specific percentage of gross revenue, and odds are not adjusted. The result of any individual outcome is random. Slot machines are programmed to theoretically pay out a certain percentage -- but in reality, some pay out a little more or a little less, just like the quarter in your pocket might land on heads 52 times out of 100 flips, or maybe 47.

You are positing a situation like, hey, that dealer just dealt that player two blackjacks in a row. Therefore for the next three hands we're going to take all the aces out of the deck to make sure there isn't another blackjack. Obviously this is not how casinos work, neither is a slot machine adjusting its odds to hit a specific payout target. The blackjack game, and the slot machine, don't have to, over the course of millions of wagers they are mathematically certain to get very close to that theoretical target.

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
That's behind a paywall. In any case the photo needs to be very, very close to see it.

Look closely at this photo at full resolution: https://images.freeimages.com/images/large-previews/2cb/crap...

There is a very subtle North-South bump under the felt, directly in the center, under the words "CRAPS" and "DEALER and PLAYERS" and "Seven". It might be easiest to see at the lowest horizontal line, below the words "Any Craps."

Here's another hi-res photo, you need to already know it's there, but you can just barely make it out if you look very closely right down the center, under the felt: https://i0.wp.com/agrlv.com/wp-content/uploads/2019/05/DSC01...

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
It seems the degree of criminality, if any, would hinge on the precise specifications regarding the rules of the electronic craps game and how they are communicated to the players. Your point is valid, a big incentive for the casino is the labor reduction. But this doesn't relieve the casino of the responsibility to properly run and protect the game. Someone needs to observe the dice rolls and ensure they are valid, if the players are repeatedly making improper throws but nobody warns them or voids them, it's hard to claim the players were knowingly cheating. I have to imagine the game itself has some protection built-in -- what prevents players from replacing the dice with ones they brought themselves -- and therefore if the game, and its human operators, didn't object to what the players were doing (which they were doing in public, in view of surveillance cameras and other players), the burden of proving "cheating" is difficult. Perhaps the casino will fall back on "rules," which then raises the questions were those rules, for this specific model of electronic craps (and not just a normal live craps game) posted in a conspicuous location, is the definition of a legal dice roll clear and precise, etc.
andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
Your instincts are correct. No, at a normal craps game you won't be arrested for failing to throw the dice properly, however, if the casino repeatedly voids your throws they will likely ask you to leave, especially if you're a healthy person who could easily make proper throws but are strangely setting the dice and sliding or dribbling them.

The current case seems to be much less clear-cut, however. Normally, a craps game would be watched by a pit crew (and surveillance to an extent) and bad rolls would be immediately recognized and voided. It is unclear whether anybody was monitoring the rolls at the electronic table, and whether there is any specific direction that states the dice must be rolled a certain way. Your question about the casino's responsibility seems highly relevant -- responsible for monitoring the rolls, for observing any possible player collusion, and for clearly stating what an acceptable dice roll consists of. If they failed at any of those, it would be hard to claim that whatever the players were doing, right out in the open, was illegal.

This case has parallels to Phil Ivey's ordeal with Borgata and Crockford's casinos. He and an associate won $20 million using a technique known as "edge sorting," which essentially is recognizing extremely small imperfections on the backs of the cards, to know the value of the next cards to be dealt. Whether or not this was actually cheating -- nobody touched the cards or manipulated the cards in any way -- was decided by the courts, but various US and UK courts had differing opinions so that decisions were often flipped on appeal. In this case, the casinos can claim "cheating," but if the players "rolled" the dice and the electronic table accepted those rolls as valid and no casino personnel objected and no written rules were broken, I'd say the players have a good case. Unfortunately we'll likely never know, $225,000 is a lot less than $20 million and I would expect if the casino legal teams realize they are in the wrong, they will simply offer the players $50, maybe $100,000 scot-free to keep their mouths shut and never visit again, and given the cost of legal fees and the possibility they could lose (or be charged criminally), I can't imagine the players not taking that deal.

More info on Phil Ivey: https://www.uspoker.com/phil-ivey-lawsuit-borgata-guide/

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
This usually depends on the jurisdiction. Class III machines are independent and each one contains its own RNG. Class II obtain their randomness from a central server, and are usually configured to actually be a bingo machine or some other pooled wagering mechanism, and the "slot machine" that you see is a mask for the pre-determined outcome.

In the US, almost all commercial casinos (Nevada, New Jersey, Mississippi, etc) use Class III games while native American casinos use a mix of Class III and Class II. Typically, Class III are preferred by casinos and by gamblers.

Here's another source: https://www.tahlequahdailypress.com/news/state_news/casino-1...

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
Game odds are very rarely advertised. Sometimes it is trivial to calculate or simulate the game (blackjack, roulette, craps, video poker) because all of the game parameters are known (i.e. 52-card deck, 38 slots on an American roulette wheel, two 6-sided dice) as are all the payouts.

Slot machines, however, are opaque because the probability of hitting any specific combination is unknown to the public. The machine can promise that a 7-7-7 result will pay $5000 but you have no idea how often a 7-7-7 is supposed to hit.

Sometimes a casino will take some less popular machines and configure them with an extremely low payout percentage (3% for example) and because the players would not otherwise know this, the casino will put a sign up "97% payout!" to try to attract some value-oriented players, just like a retail store takes old merchandise and puts it in a bargain bin at 50% off.

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
Every casino jurisdiction is different, (and in the US, many native American casinos are regulated by a gaming authority that is part of the same tribal nation, so it is a bit circular) but almost all require a thorough review of any new game's rules and equipment, and usually also require third-party certification of the game's theoretical odds.
andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
There's a little bit of truth here, but it's mostly incorrect. Yes casinos set the odds for any individual slot machine. However the game manufacturers prepare the games with about 5 configurations, even the loosest config will still be well into the casinos favor (it's sort of like how Call of Duty has an Easy, Normal, Hard or Legend mode), i.e. the game configs might be to hold 7.3%, 8.6%, 10.1%, 11.5% and 12.7%. Of course the game's theoretical hold is not revealed to players.

The casinos are allowed to update a game configuration while it is on the floor and idle (not while it is being played). I doubt it has been tested but I believe Gaming Control Board would frown on configuration changes being made to accommodate an individual player, but even if a casino did this, they would not be "giving" a player any winnings, they would just be making it so the player was likely to lose at a slower rate, but still be losing, i.e. dropping from the 11.5% config to the "loosest" 7.3%.

This is mostly a moot point anyway, because it is perfectly legal for a casino to offer a player hundreds or thousands of dollars in free slot play (or free bets), that's how they give a specific player "winnings to spend."

andy800··on Group accused in $225K 'dice sliding' cheating scheme at Las Vegas casino
> the slots are regulated and everybody sets them at exactly the legal limit.

It's unlikely there is any slot machine in Nevada "at the legal limit." Every gaming device must be set to theoretically pay out a minimum of 75% of wagers -- i.e. the maximum it may keep (or "hold") is 25%. This is, of course, a theoretical number, on any given day a particular machine may hold more, or it may have negative hold -- just like if you flipped a coin enough times, occasionally you'd get long streaks of heads or of tails, even though theoretically it should be 50/50.

In reality slot machines are typically configured to hold between 6 and 15%. A slot machine holding 25% would be an awful experience and simply not get repeat play. Slot manufacturers prepare each game with a range of options that the casino can choose from, but none of them would deliberately ruin their own game by offering a 25% hold option on a slot machine.

Nevada Gaming Control Act Regulation 14: 14.040 Minimum standards for gaming devices. 1. All gaming devices must: (a) Theoretically pay out a mathematically demonstrable percentage of all amounts wagered, which must not be less than 75 percent for each wager available for play on the device.

https://gaming.nv.gov/modules/showdocument.aspx?documentid=1...

andy800··on The many faces of DISTINCT in Postgres (2017)
Sorry, how would you write this query just with LIMIT 1 and not window functions or MAX or a join?
andy800··on Ask HN: Most interesting tech you built for just yourself?
Built a compilation of local happy hours, lunch specials, and other cheap eats at https://fullprice.no (as in, "do you want to pay full price? No."). The idea isn't all that original but I thought my layout and presentation was rather unique, for example the 24-hour slider as opposed to a clock interface.

I thought it would be easier post-launch to get restaurants to participate and add their own information (nearly-free marketing), but that was a faulty assumption. The admin interface is also pretty cool, very simple to specify blocks of time when the specials are active.

Unfortunately it hasn't been updated in 4 or 5 years. When Covid first started, I launched a sister site just to list restaurants that were open, I took that down about 6 months ago.

andy800··on “True” Randomness vs. “Pseudo” Randomness
Roulette is perhaps an easier example. A typical American wheel has 38 positions: 1-36, 0 and 00. If you bet on a single number and hit, a 1/38 chance, you don't win 37x your bet, you only win 35x. If you bet on Red, or Odd, those pay 1-1 but the odds of winning are less than 50%, there are 18 winning results and 20 losing results. The payouts are always lower than the true probability of that specific outcome. If two people play opposite colors, one Red and one Black, the casino will break even on numbers but collect both wagers when 0 or 00 wins.

Another example is sports betting with a point spread. You bet $11 to win $10, on supposedly an 50-50 wager (the purpose of the point spread).

Slot machines work off the same principles. It's ok for the outcomes to be random, because the payouts are always less than the true probabilities.

andy800··on “True” Randomness vs. “Pseudo” Randomness
The outcome of each individual spin is random. The reason a slot machine is always profitable is due to the payouts. To put it simply, a result that will occur once every 100 spins only pays out 90 credits. The various PAR sheets allow casinos to adjust how much to tilt the odds in their favor. For the 1 in 100 example, the various pay tables might have that particular outcome pay 87, 89, 91 or 94 credits, allowing a casino to decide between 6% all the way up to 13% hold. But that particular combination of reels will still occur only 1 in 100 spins (theoretically, because it is in fact random, not cycling through a script).
andy800··on Ask HN: How Bad Is the Current Market? Pt3
ll_mama, do you mind sharing where and how you are connecting with companies and arranging your contracting gigs? Which languages, specialties and/or industries are you seeing demand? Thanks very much.
andy800··on Ask HN: Using Java for a web application in 2023
Unlike many others here, I would highly recommend writing backend services/APIs on the JVM, with the caveat that you use Kotlin, not Java. Every server project I've started in the past 3-4 years has been Kotlin, and I have never been more productive. Last year I switched from JS SPA (I preferred Vue to React) to HTMX and Jte templates and it was like adding a turbo boost to an already-humming engine.

Second point, while the frameworks can be helpful (Spring, VertX, Micronaut, Quarkus, etc) you don't actually need one. Ktor or http4k as your http/routing engine (& client), jooQ for DB access, H2 as a caching database if necessary -- these will take you a long way.

The only downside I experience is fewer deployment options -- can't natively deploy to Fly.io, Railway, etc except via Docker. With that said, setting up a simple VPS with Adoptium JVM is pretty easy. Hope this helps -- good luck!

andy800··on The K2 Compiler is going stable in Kotlin 2.0
Everyone has different features they like about a language -- just like people have different opinions of the "best" music, food, sports, style, etc. Kotlin is the language that "clicks" with me, more than any other (in 20+ years), by far. It's just awesome -- so thank you to JetBrains and everyone who contributes to Kotlin and its ecosystem. The new compiler is a big step forward, fantastic job!
andy800··on A Midcentury Bender: Revisiting Mad Men
A certain subset of viewers envy Leonardo's character -- hot wife, sycophant employees, yacht, Lambo, etc -- but the film never presents him as admirable or even talented (except at ripping people off). A little like the book Liar's Poker back in the 80s -- Michael Lewis (sort of) intended it as an expose of the toxicity, absurdity, and excess of Wall Street. But the book was so entertaining, it actually made it sound like the greatest place anyone would ever want to work. Having enough money to bet $10 million on one hand, talking shit about Equities in Dallas, and of course, becoming known as a Big Swinging Dick.

Fight Club is a bit more subtle, it doesn't really renounce (or endorse) anything, but its main character is (spoiler) obviously seriously mentally ill with two entirely distinct personas.

andy800··on A Midcentury Bender: Revisiting Mad Men
Nobody is asking for, or expecting, moral lessons. That's what Full House or Growing Pains were for. The point is that, especially upon a second viewing, Don does so few positive, admirable, or generous things and so many selfish, nasty, hurtful things. It still doesn't make him a "bad person" like Joan's rapey husband, it just demonstrates that Don is innately an asshole, a very big one.
andy800··on A Midcentury Bender: Revisiting Mad Men
Although I've watched every episode of The Sopranos, it was quite a long time ago. I recall that for the most part, when Tony was pissed at someone, he typically confronted that person, and if he didn't do it personally, the "victim" usually knew why he was getting wacked or beat up or whatever.

But yes, you're correct, within his family -- especially his mother, Uncle Junior, his sister and sometimes his wife -- things are a lot more complicated.

andy800··on A Midcentury Bender: Revisiting Mad Men
Mad Men is a great show, but it demonstrates how setting a guy up as the protagonist modifies viewer perceptions.

Don Draper might be the biggest asshole to ever be a lead character on TV. He has zero sense of humor, takes all the credit for his employees' work, sleeps around (obviously) with his kid's teacher, with clients, with two of his secretaries (today we'd certainly call this an abuse of power), he refuses to have a relationship with his long-lost brother, mostly ignores his kids, never acknowledges Peggy's skills or contributions, fires a gay guy for not "entertaining" a client, drinks and sleeps at work all day. Plus plenty more I can't immediately recall.

Sure, Tony Soprano has people killed, but he isn't nearly the passive-aggressive dickhead that Don is.

Yes he is a complex person but the same show could have been made from a different character's perspective with Don Draper being the asshole everyone in the office avoids at all costs.

andy800··on Every modeler is supposed to be a great Python programmer
Kind of ignorant... given that Kotlin is JVM-compatible, it works with libraries even more than 20 years old.

Do I care if it is at parity with Python? Hell no I don't, as long as it allows me to accomplish the tasks I need -- and it does, faster, easier, with fewer errors -- then I'm very happy.

andy800··on Htmx in a Nutshell
Because HTMX is totally unopinionated regarding the backend, and also expects pure HTML responses, you have a ton of freedom.

In most cases, this means your choice of backend framework in virtually any language, anything from Django to RoR to Spring to http4k to Laravel, plus some templating framework/language such as Handlebars, Jinja, Thymeleaf, Moustache, JTE, etc.

andy800··on Htmx in a Nutshell
I did something similar, for a dashboard type of web app that involves a lot of graphs. JS graph APIs pretty much all expect data as JSON-formatted JS variables, not HTML.

So I use HTMX to make the server requests, using triggers defined in HTMX, replacing a lot of JS code. It's really only with the JSON-based responses that I'm going rogue. HTMX is so elegant, I feel dirty going against the grain.

andy800··on Every modeler is supposed to be a great Python programmer
> wish there was some more variety

Kotlin is coming up on the outside. Late to the party, but the data science ecosystem is progressing nicely.

andy800··on McDonalds Event Driven Architecture
Very similar experience, I often open the app and it is still hung up on my previous (completed) order and I have to clear out the cart. And like you said, the "offers" are good (actually McD has raised prices quite a bit, now with the offers I'm paying about the same as face value was only a few years ago).

I will also say, despite the issues, it's better than most competitors. BK and Wendy's apps are both full of problems as well. I have had multiple accepted and paid orders on the Burger King app, when I got to the store they didn't have the item, weren't accepting mobile orders, or were totally closed.

andy800··on McDonalds Event Driven Architecture
To be clear, I was not justifying the current architecture, I specifically wrote "an entirely different architecture could very easily work much better."

I was pointing out, however, that, as is often the case, the initial estimates in a typical "why do they need all this stuff" post, likely underestimated the transaction volume by possibly 10x. Perhaps 3000 or 30000 transactions per second could run on the same system -- I'm not an expert at that scale. But I doubt you'd find any Fortune 100 company relying solely on Postgres and Redis.

← PreviousPage 5 of 7Next →