Hacker Newsnew | past | comments | ask | show | jobs | submit | brooke2k's commentslogin

I work with C#/NuGet on windows every day and my experience is entirely the opposite.

The build and dependency systems are an abysmal esoteric, poorly documented mix between csproj files, sln files, random scattered json files, etc.

The standard library in my experience sucks and has all sorts of issues, especially around Uris, DateTimes, etc.

And the ecosystem itself has such a low quality bar, ironically _especially_ with anything made by microsoft. For every nuget package that's well-designed, well-documented, and easy-to-use, there's five which have bugs and undocumented exceptions and poorly-designed APIs.


If you work with old .NET Framework, then maybe I would agree. What kind of issues do you have in standard library or how they are only biting you? Nothing is perfect, but compared to other (popular) alternatives, C#/.NET is the best you can get today.

hahaha, I did the exact same thing after the game came out to see if wheel of fortune was really a 1/4 chance


lol, love seeing that I'm not the only one who did this. Being suspicious of WoF was the first and last time I peeked at the Balatro source.


Game developers sometimes make the “randomness” favor the player, because of how we perceive randomness and chance.

For example in Sid Meier’s Memoir, this is mentioned.

Quoting from a review of said book:

> People hate randomness: To placate people's busted sense of randomness and overdeveloped sense of fairness, Civ Revolutions had to implement some interesting decisions: any 3:1 battle in favor of human became a guaranteed win. Too many randomly bad outcomes in a row were mitigated.

https://smus.com/books/sid-meiers-memoir/

Some threads on randomness and perceived fairness in video games can be found here on HN too, for example https://news.ycombinator.com/item?id=19399044

The original link being discussed in that thread is 404 now, but archived copies of the original link exist such as for example https://archive.is/8eVqt


I used to get so many comments about how the computer opponent in a tile-based board game of mine cheats and got all the high numbers while they always got low numbers, and I'd be like "that's mathematically impossible. I divide the number of spaces on the board in half, generate a deck of tiles to go into a 'bag', and then give a copy of those same tiles to the other player.

So over the course of the game you'll get the exact same tiles, just in a different random order.

Now to be fair, I didn't make that clear to the player that's what was happening, they were just seeing numbers come up, but it was still amazing to see how they perceived themselves as getting lower numbers overall compared to the opponent all the time.

Meanwhile on the base game difficulty I was beating the computer opponent pretty much every game because it had such basic A.I. where it was placing its tiles almost totally at random (basically I built an array of all possible moves where it would increase its score, and it would pick one at random from all those possibilities, not the best possibility out of those).

My Dad used to play a lot of online poker, and he used to complain when other players got lucky with their hands, be like 'I know the chances are like 5% of them getting that! They shouldn't have gotten that!' and it always reminded me of those people.


Games like Battle for Wesnoth which have it implemented right, you’ll look at a 90-10 scenario with 2 attacks and end up with the 1% scenario. Enough to make a man rage. I have degrees in Mathematics, I am aware of statistics, and all that. And yet when I played that game I would still have an instant “wait what, that’s super unlikely” before I had to mentally control for the fact that so many battles happen in a single map.

Was good because it identified a personal mental flaw.


I worked on a game where we added a "fairness" factor to randomness. If you were unlucky in one battle, you were lucky in the next, and vice versa. Mathematically you ended up completely fair. (The game designer hated it, though, and it wasn't shipped like that)


The better option would be to just increase the flat odds. DQM: The Dark Prince is brutal with it's odds, but fair. A 45% chance is 45%.

In games like Civ/EU/Stellaris/Sins/etc It makes sense that a 3:1 battle wouldn't scale linearly, especially if you have higher morale/tech/etc. Bullets have a miss ratio, 3x as many bullets at the same target narrows that gap and gives the larger side an advantage at more quickly destroying the other side. So just give it an oversized ratio to scale the base (1:1) odds at.

That keeps "losing" realistic...a once in an occasion happenstance of luck/bad tactics/etc but also a generally very favorable and reliable outcome for your side.


I think XCOM does this as well.


Dispatch too. If your odds are above a certain threshold, the mission is a gimme.


The 8-ball joker is even more BS. I think I’ve only seen it trigger once ever.


I've read the source a few years back. It's all implemented fairly as it says on the tin.

I've long been suspicious of the RNG/seed implementation.. but not curious enough to automate testing of it, though.


It's been done, it's a valid RNG. It's somewhere on Reddit if you want to try and search for it.


I figured it had been tested by someone more motivated than me, haha, thanks! Will look for it when I'm back at a computer.


Neat example of cognitive bias, the brain perceives the Nope as being much more prevalent than it actually is!


For a small while I've had the idea of a [game engine/fantasy console/Scratch clone?] that comes packed with a bunch of example games. The example games should be good enough that people download it just to play them, but they are also encouraged to peek into their source code. I'd hope for it to be a sneaky gateway into programming.

For that, I'll keep this in mind: "Unlucky players may look at the source code of a chance-based effect to check if the odds are actually as stated."


I didn't know I could check but after losing like 20 times in a row I just stopped taking WoF. Never saw the good outcome.


I’ve 100%’d Balatro and wheel of fortune is quite strong. It’s never worth taking before you’re at max interest though.


I'm sure it's strong if you hit it, I never did so to me it was a waste of chips.


for the longest time I never did this, but then I got a gigantic 4K screen, and I realized that it was almost giving me vertigo having apps like my IDE fullscreened, because I literally have to move my head in order to look everywhere.

so in response I changed my windowing strategy to having a set of windows floating around at exactly the size I want them, and then the advantage of the enormous screen is just how many windows I can have open at once

that being said, I use KDE not MacOS, and 90% of Mac users I'd guess are on laptops, so using this strategy sounds completely insane to me. On laptops I still default to fullscreening or "half-screening" most apps.


If your interests lie entirely or mostly in the realm of AAA or AA games that are playable with a controller, then I completely agree.

However if your interests lie in indie games or games that require a keyboard and mouse interface (precision shooters, grand strategy games, RTS games, etc) then having a PC that can play games is completely necessary. (I say this as someone who runs linux btw, not a windows defender).


nooooooooooooooo god why. I loved uv. just why


clearly there's something I don't understand (or is the law just really this stupid?) - but what would this even look like for linux? every user account requires an associated age?

but users don't have a 1:1 mapping to the people that log into them. linux users that aren't used by any particular person, but by a particular _service_ are common. so are linux users that could be logged into by any number of people, and which have no specific single owner.


The constant reference to "democracy" as the thing that makes us good and them bad is so frustrating to me because we are _barely_ a democracy.

We are ruled by a two-party state. Nobody else has any power or any chance at power. How is that really much better than a one-party state?

Actually, these two parties are so fundamentally ANTI-democracy that they are currently having a very public battle of "who can gerrymander the most" across multiple states.

Our "elections" are barely more useful than the "elections" in one-party states like North Korea and China. We have an entire, completely legal industry based around corporate interests telling politicians what to do (it's called "lobbying"). Our campaign finance laws allow corporations to donate infinite amounts of money to politician's campaigns through SuperPACs. People are given two choices to vote for, and those choices are based on who licks corporation boots the best, and who follows the party line the best. Because we're definitely a Democracy.

There are no laws against bribing supreme court justices, and in fact there is compelling evidence that multiple supreme court justices have regularly taken bribes - and nothing is done about this. And yet we're a good, democratic country, right? And other countries are evil and corrupt.

The current president is stretching executive power as far as it possibly can go. He has a secret police of thugs abducting people around the country. Many of them - completely innocent people - have been sent to a brutal concentration camp in El Salvador. But I suppose a gay hairdresser with a green card deserves that, right? Because we're a democracy, not like those other evil countries.

He's also threatining to invade Greenland, and has already kidnapped the president of Venezuela - but that's ok, because we're Good. Other countries who invade people are Bad though.

And now that same president is trying to nationalize elections, clearly to make them even less fair than they already are, and nobody's stopping him. How is that democratic exactly?

Sorry for the long rant, but it just majorly pisses me off when I read something like this that constantly refers to the US as a good democracy and other countries as evil autocracies.

We are not that much better than them. We suck. It's bad for us to use mass surveillance on their citizens, just like it's bad to use mass surveillance on our citizens.

And yet we will do it anyways, just like China will do it anyways, because we are ultimately not that different.


wow this website is nigh unreadable on mobile


Its perfectly fine. Go away.


well, this website existed before mobile...


I think for a lot of people (me included) Discord isn't just a chat service like WhatsApp but more of a "home base" where you can hang out with all your friends, make new friends, share media, chat, play games together, stream games to each other, etc.

In the gaming sphere it's so universally used that all the friends you've ever made while gaming are on it, as well as all your chat history, and the entire history of whatever server you met them on. And if you want to make new friends, say to play a particular game, it's incredibly easy to find the official game server and start talking to people and forming lobbies with them.

My main friend group in particular has a server that we've had running since we were teenagers (all in our mid-20s now) which is a central place for all of the conversations we've ever had, all of the pictures we've ever sent each other, all the videos we've ever shared, and so on. That's something I search back through frequently looking for stuff we talked about years ago.

So I'm not saying it's impossible to move, but understand that it would require:

- Intentionally separating from the entire gaming sphere, making it so, so much harder to make new friends or talk to people. - Getting every single one of your friends that you play games with to agree to downloading and signing up for this new service (in my case that would be approx. a dozen people) - Accepting that this huge repository of history will be wiped out when moving to the new service (I suppose you could always log back in and scroll through it, but it's at least _harder_ to access, and is separated from all your new history)

On top of this, every time I've looked for capable alternatives to Discord I've come up empty-handed. Nothing else, as far as I can tell supports free servers, the ability to be in multiple servers, text chat divided into separate channels, optional threaded communication, voice chat joinable at any time with customizable audio setup (voice gate, push-to-talk, etc), game streaming from the voice chat at any time, and some "friend" system so that DMs and private calls can be made with each other. And even if I found one, then again I can't express enough that in the gaming sphere effectively _zero_ people use it or even know what it is.

Anyways, I'm not saying that nothing could make me abandon Discord, I'm just saying that doing so is a tremendous effort, and the result at the end will be a significantly worse online social life. So not a mild inconvienence.


>Accepting that this huge repository of history will be wiped out when moving to the new service (I suppose you could always log back in and scroll through it, but it's at least harder to access, and is separated from all your new history)

This is true, but one needs to regularly back this up elsewhere if you care about it. If you're not in control of it, it can go away in an instant; Discord could one day decide to ban your server or anything else, and then it's gone.


this is very much a nitpick, but I wouldn't call throwing an exception in the constructor a good use of static typing. sure, it's using a separate type, but the guarantees are enforced at runtime


I wouldn't call it a good use of static typing, but I'd call it a good use of object-oriented programming.

This is one of the really key ideas behind OOP that tends to get overlooked. A constructor's job is to produce a semantically valid instance of a class. You do the validation during construction so that the rest of the codebase can safely assume that if it can get its hands on a Foo, it's a valid Foo.


Given that the compiler can't enforce that users only enter valid data at compile time, the next best thing is enforcing that when they do enter invalid data, the program won't produce an `Email` object from it, and thus all `Email` objects and their contents can be assumed to be valid.


This is all pretty language-specific and I think people may end up talking past each other.

Like, my preferred alternative is not "return an invalid Email object" but "return a sum type representing either an Email or an Error", because I like languages with sum types and pattern matching and all the cultural aspects those tend to imply.

But if you are writing Python or Java, that might look like "throw an exception in the constructor". And that is still better than "return an Email that isn't actually an email".


Ah yeah, I guess I assumed by the use of the term "contructor" that GP meant a language like Python or Java, and in some cases it can difficult to prevent misuse by making an unsafe constructor private and only providing a public safe contructor that returns a sum type.

I definitely agree returning a sum type is ideal.


I agree and for several reasons.

If you have onerous validation on the constructor, you will run into extremely obvious problems during testing. You just want a jungle, but you also need the ape and the banana.


What big external dependencies do you need for a parser?

`String -> Result<Email, Error>` shouldn't need any other parameters?

But you should ideally still have some simple field-wise constructor (whatever that means, it's language-dependent) anyways, the function from String would delegate to that after either extracting all of the necessary components or returning/throwing an error.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: