.NET's behavior is similar to the Principle of explosion It is not a fallacy, it is a matter of "careful what you wish, you just might get it". If you ask for multiple elements to satisfy a condition, you should be aware that you are, in fact, asking 2 questions: 1. I want at least 1 element 2. Each one of them satisfies the criterion. Do not count on the tooth fairy to satisfy your hidden criterion #1, make it explicit instead.
Martijn Smitshoek
Posts
-
.NET's Sometimes Nonsensical Logic -
I have no idea how anyone keeps upWow - I was gonna give the same type of answer but you and XKCD beat me to it.
-
Strange questions from a nitpicker ... ;pI would really like to add to your confusion. You're talking about sample count = 1 etc, but you're talking of a continuous stream of samples, have you thought about what "average" means if you have had 94760434786353845 samples accumulated over 72 hours in a changing signal, would you *seriously* want to report the average of all that? My engineering self wants to suggest that you use a sliding average window of a fixed size, say, 10, but it could be anything reasonable considering the rate of change, and any noise that you would otherwise want to average out. Then, if you pick that number, say, N=10, then you can only start reporting after you've had at least 10 samples. And that would answer your original question.
-
Windows 11 File Explore Update BrokenThat's line 2 in Microsoft policy - if something is useful, remove it. If you can't remove it, hide it into oblivion. Your opinion doesn't matter, I tell you what you want. (the poor man's Messiah complex)
-
I thought it was a cardinal sin to force a server to reboot...?First they came for the socialists, and I did not speak out — because I was not a socialist. Then they came for the trade unionists, and I did not speak out — because I was not a trade unionist. Then they came for the Jews, and I did not speak out — because I was not a Jew. Then they came for me — and there was no one left to speak for me.
-
C++ integer arithmetic overflowWhether an ounce is more than a pound depends on foreign imperial units, and scales that might overflow. Having said that, the method is properly defined in C(++) for unsigned all integers, using each their respective maximums, and easier than what I proposed.
-
C++ integer arithmetic overflowAs mentioned above, specifically undefined behavior might turn out in such a way that the "signed"ness does not necessarily flip as you would expect. Having said that, I don't know of a CPU/compiler that doesn't simply let the integers wrap around because that is still the easiest to implement. I was almost trying to propose some right-shift logic trick to check, but, the right-shift is, in fact, undefined for signed integers as well and may give invalid results. In assembly it's plain simple, you typically check the carry or overflow flag for unsigned or signed integers, respectively. Finally, a watertight solution would be to cut every integer in two halves using masks and shifts, then craft your own carry- and overflow logic. I'm too lazy to work it out in detail but I'm positive that all the information you need to detect overflow is in the high bits of the upper sum. Something like, upper half, or upper half + 1 bits must turn out equal, and if not, there is overflow.
-
I just realized I got scammed all those years ago...The real meaning of that came to me, when I was working in Windows 3.0 and tried to save a bitmap as CON.BMP
-
A good mouseI know a mouse, and he hasn't got a house I don't know why I call him Gerald He's getting rather old, but he's a good mouse
-
Microsoft, please - get your act together.I have learned the same with this as I have learned with partners, or employers, or other individuals who are under the delusion they have some magical "better than you" decisive judgement. Their head is in a dark place, and they have no intention of taking it out. You warn them once. You warn them twice. And at some point after, you don't warn them anymore. If you're good enough to get the subtlety of what I am saying, you can also "predict" what I did after I purchased a new computer 2 years back. BTW I don't mind tabs. But I don't care enough either.
-
Why do so many "developers" not understand 'null'?Depends on the definition of "young" ;P But, seriously, I see so many powers that be in a high tech company internalize their fears of mistakes by programmers who simply don't get the deeper meaning of a sort-of tri-state logic, so that when when you apply it correctly, you're going to get smacked by individuals who wallow in this fearmongering mindset. Thinking, "if I can't comprehend this to treat the information properly and make a mess, I'm going to force you into that same fear, so that I won't look incompetent and alone". The real issue though, is the hiring policy. Like, who the ***k hired you, and worse, who made you the boss around here? Do you have more skeletons in the closet regarding your pretend-strong, feeble character? Ok I digress. But if you lack the technical grid to understand what your responsibility is towards the state of a variable, you should really be looking for another job. No wonder IT systems have so many vulnerabilities.
-
LanguagesDutch, English, C#
-
Do you actually read the "use agreements" of websites?I check them, every time, absolutely! not
-
DeathI was just thinking of a message I saw the other day "Mary had a little lamb" (between a sandwich). I am not sure where this fits in.
-
tyops?Especially if you work at home with a keyboard that has a different horizontal pitch than the one st ypur pffice
-
You can hate on Elon Musk all day long if you wantWhatever ...
-
You can hate on Elon Musk all day long if you want"to hold him in any kind of special high regard" I wrote. Don't leave that out.
-
You can hate on Elon Musk all day long if you wantI have seen this discussion trick already. Just don't put words in my mouth, ok? And, now that we're at it, don't pretend that you didn't try it ..
-
You can hate on Elon Musk all day long if you wantGreg Utas wrote:
Wealth is not a sign of lack of humanity.
No, not directly a sign, but the latter is often used to drive the former, so that should not be denied either. There is enough of a correlation for me that I want to see proof of humanity first before I will find the subject worthy of praise. In order to make it to the top without being a snake in a suit, you really have to be clever and quick, and I won't deny Musk has both in some fields, but that still does not prove he isn't a snake also. The truth is, I just don't know. There is no need for me to hold him in any kind of special high regard. I still have "don't look up" echoing somewhere on my retina.
-
Engineering questionI've been trying to explain this like 3, 4, 5 times and I am not willing to do it again. I have been polite enough and made it perfectly clear that you are frivolously skipping parts of the question just so that you can make up your own story, and I am done with that. I'm sorry.