Live data from Hacker News

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

github.com

81–90 of 142 posts

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

#81
post #60
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'…

> What do you disagree with, exactly? OP said it quite clearly and so did you: that it's the reporter's job. It's the maintainer's job to put in the bug report now.

> OP said it quite clearly and so did you: that it's the reporter's job.

I don't agree that it was stated clearly. That's the whole point of my comment. Leaving it unclear is bad, tasks should always have an unambiguous owner.

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

#82
post #3

I really want to know how this could have passed CI testing. (Comments blame it on UCRT, not .NET but… that doesn’t matter much to me.)

“Oh, I can see the test is failing. Let me fix this by adjusting the test to expect the currently returned value.” This is unfortunately an actual quote I got from Claude Code after having it write a unit test for me. It ended up mocking the entire method it was supposed to test, resulting in the unit test essentially only testing itself.

Now I understand how people who let LLMs write their code for them come to believe it boosts their productivity. /s

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

#83
post #7

I disagree with the comment “Both Math.Pow and std::pow invokes the pow function in UCRT, which is shipped with Windows. The issue should be reported to MSVC instead” It’s not the job of a bug reporter to figure that out and to verify that nothing goes wrong in setting up stuff for invoking that function or in getting its output back into the C# world. That’s even more true because the dynamic nature of .NET code mak…

>It’s not the job of a bug reporter to figure that out The comment isn't blaming the reporter for not doing that.

The comment isn't clear. It can be read as blaming the reporter, or it can be read as telling someone else who works on .NET (who?) to open a bug report against UCRT.

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

#84
post #80
post #74

Earlier quoted context omitted.

I agree that's the ideal solution in a vacuum, but I don't know this person's responsibilities regarding the projects in question, so I don't want to make assumptions about what they can or should do.

If their job isn't to handle bug reports against .NET, what are they doing writing confidently about what should happen as a response to a bug report against .NET?

I am taking no stance about their responsibilities. What I am saying is they should have made the ownership of the next steps clear. Who the owner is depends on their responsibilities, which I don't know.

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

#88

Earlier quoted context omitted.

“Oh, I can see the test is failing. Let me fix this by adjusting the test to expect the currently returned value.” This is unfortunately an actual quote I got from Claude Code after having it write a unit test for me. It ended up mocking the entire method it was supposed to test, resulting in the unit test essentially only testing itself.

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.

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

#89
post #29
post #6

Side note. One of the advantages of using proprietary packaged software is supposed to be a unified support and product. In this case the maintainer redirects the issue to some other team and passes the ball as if it were an open source project with 50 dependencies with thin responsibilities "no, if there's an issue with a button, you should report it to GUI-button, we do GUI-form and we just pass the button generati…

The buck is passed all of the time, it simply happens internally and out of sight of the customer. In this case, it looks like an open source component managed by a commercial company. They could do everything out of sight, but the open source world also encourages transparency.

I think a big part of the transparency was to help clean up this very mess, motivate developers to do the right thing or face public ridicule. The public is not in any org chain, we don’t get performance bonuses, we’re not incentivized to hide issues from upper management, it is very much the opposite. Having this out of band communication is incredibly valuable and helps keep the reporting chain honest. Someone somewhere inside MS will use this example in an effort to fix the process, much easier to say 30 random internet people with no motivation the lie or collude all agree that this is unacceptable than to say “I think this is unacceptable”.

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

#90
post #30
post #7

I disagree with the comment “Both Math.Pow and std::pow invokes the pow function in UCRT, which is shipped with Windows. The issue should be reported to MSVC instead” It’s not the job of a bug reporter to figure that out and to verify that nothing goes wrong in setting up stuff for invoking that function or in getting its output back into the C# world. That’s even more true because the dynamic nature of .NET code mak…

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.
Post reply on HN