Live data from Hacker News

Math.Pow(-1, 2) == -1 in Windows 11 Insider build

github.com

91–100 of 142 posts

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#91
post #18
post #11

Earlier quoted context omitted.

Microsoft is a many headed beast. Finding the right contact even for employees inside the beast is challenging and a skill all its own.

I'm more used to hear this kind of 'it's not our fault' crap from state bureaucracies not companies that want me to pay them...

Microsoft is long past the point of realizing they don't need to make their product good to keep users. Everyone who uses Windows is stuck using it because of software lock-in, or it's what's on the laptop their job provides, or because they can't afford a Mac. Outside of niche communities, there aren't a lot of "Windows fans" out there these days.

They'll gladly harvest your data whether you like them or not!

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#93
post #90
post #30

Earlier quoted context omitted.

What do you disagree with, exactly? The bug is in an underlying library, so it should be reported to that library. That all seems correct to me, I don't see what there is to disagree with there. The problem with the comment is it does not make ownership of the next steps clear. The maintainer should've either taken the ball ("I will report this to...") or made it clear that the reporter should hold the ball ("We can'…

If a library has a flaw that big, it is a bug to use that library.

You are going to have a very short, frustrating career in software if that's your position. Bugs happen, report them, get them fixed, chill out, and don't be a dick.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#94
post #69

> If you need to contact us better, joining the osu! Discord server would be best I really dislike how Discord is slowly eating up the web and being used as the primary channel for communication, when most of the community resources resides in their Discord, it makes it hard for me to find relevant information through the web thanks to Discords lock-in

Discord also has a kind of culture I don't love connecting to for misc environments. I'm sure most are fine, but I've joined software related discords where people are having oddly NSFW chats. They've always been in different channels, but why does this software project need a NSFW channel? I think it's _too_ social for bug reports and questions. I'd prefer a forum or GitHub issues for that kind of thing. Or maybe I'…

[deleted]

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#95
post #88

Earlier quoted context omitted.

Sounds very human. I experienced some junior devs who grew up with TDD and would often just tweak their code to pass their tests without stopping to understand their code at a fundamental level - essentially development through trial and error. Since they were also the ones writing the tests the core assumptions went into both and because they did so without thinking they were more likely to have errors. The test bei…

TDD only really works if the test in some sense mirrors the specification. Sometimes people manage it in which case it resembles a mini superpower but mostly they do not. If it mirrors the spec then few people would change it to be wrong to make the test work.

AFAIK TDD culturally occurred at the same time as the push for 100% test coverage. So we would end up with code bases that were 90% test code and 10% actual code, every individual method had many tests. This meant for every code change there was a 10x test change so test timelines dominated dev timelines, there was a push at the time to expand the test org to be 2x the size of the dev org. AFAIK at MS that was abandoned and the test org was folded into the dev org and now the devs are expected to write and maintain their own tests.

I have only seen TDD used poorly, as a crutch, an alternative to thinking deeply about the problem space. If it can be done well I have not personally seen it. Perhaps SQLite, but such projects are an oddity.

To me tests at the spec level are largely user acceptance tests which are indeed very useful.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#96
post #79
post #73

Earlier quoted context omitted.

If your software has a bug, it’s your bug. If the root cause of the bug in your software comes from a direct call into some dependency, that’s immaterial to the users of your software. Your software is incorrect, so your software has a bug. How you choose to resolve it is up to you. You might implement a fix in your code to handle the bug case until the dependency is fixed.

Of course. They chose to resolve it by saying the underlying software should be fixed. That seems perfectly fine to me.

That's not a resolution, that's ignoring the bug.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#98

How does the OS still function with a basic bug like this?

I don’t think there is much systems code that needs an exponent of -1, maybe none that needs exponents at all (aside from 2^n, which has opcodes, not C functions)

Most critical OS functionality will use integers, not floats. And I'd expect most programmers to write squaring a float as `x * x`.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#99
post #88

Earlier quoted context omitted.

TDD only really works if the test in some sense mirrors the specification. Sometimes people manage it in which case it resembles a mini superpower but mostly they do not. If it mirrors the spec then few people would change it to be wrong to make the test work.

AFAIK TDD culturally occurred at the same time as the push for 100% test coverage. So we would end up with code bases that were 90% test code and 10% actual code, every individual method had many tests. This meant for every code change there was a 10x test change so test timelines dominated dev timelines, there was a push at the time to expand the test org to be 2x the size of the dev org. AFAIK at MS that was abando…

The push wasn't to test every individual method but to test every individual code change. This confusion you had was shared by many others and caused havoc because if you unnecessarily couple every single interface in the code base to a test then every change breaks a test. This became worse for many people than not writing tests at all.

>I have only seen TDD used poorly, as a crutch, an alternative to thinking deeply about the problem space. If it can be done well I have not personally seen it. Perhaps SQLite, but such projects are an oddity.

Theyre not that odd. I've applied it to every type of code base I've come across.

>To me tests at the spec level are largely user acceptance tests which are indeed very useful.

Where I use TDD the tests are exactly like this - written at the highest level possible using a shared framework that integrates sophisticated fakes which carefully balance realism, speed and flakiness. They all follow roughly the same pattern across the code base and that pattern mirrors the spec scenarios.

Where I see TDD used by people who complain about it they usually think the idea is to write a test for a class because they're thinking about writing a class. It is generally taught badly.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#100
post #18
post #11

Earlier quoted context omitted.

Microsoft is a many headed beast. Finding the right contact even for employees inside the beast is challenging and a skill all its own.

I'm more used to hear this kind of 'it's not our fault' crap from state bureaucracies not companies that want me to pay them...

I am sorry if it sounded like I was suggesting it was not their fault.

I was simply stating fact, without any particular opinions on the matter of fault.

Post reply on HN