Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Martijn Smitshoek

@Martijn Smitshoek
About
Posts
51
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • .NET's Sometimes Nonsensical Logic
    M Martijn Smitshoek

    .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.

    The Lounge csharp visual-studio question

  • I have no idea how anyone keeps up
    M Martijn Smitshoek

    Wow - I was gonna give the same type of answer but you and XKCD beat me to it.

    The Lounge design com graphics hardware iot

  • Strange questions from a nitpicker ... ;p
    M Martijn Smitshoek

    I 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.

    The Lounge question discussion

  • Windows 11 File Explore Update Broken
    M Martijn Smitshoek

    That'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)

    The Lounge help question announcement

  • I thought it was a cardinal sin to force a server to reboot...?
    M Martijn Smitshoek

    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.

    The Lounge sysadmin question

  • C++ integer arithmetic overflow
    M Martijn Smitshoek

    Whether 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.

    The Lounge c++ question

  • C++ integer arithmetic overflow
    M Martijn Smitshoek

    As 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.

    The Lounge c++ question

  • I just realized I got scammed all those years ago...
    M Martijn Smitshoek

    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

    The Lounge c++ question

  • A good mouse
    M Martijn Smitshoek

    I 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

    The Lounge

  • Microsoft, please - get your act together.
    M Martijn Smitshoek

    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.

    The Lounge com tutorial question announcement lounge

  • Why do so many "developers" not understand 'null'?
    M Martijn Smitshoek

    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.

    The Lounge help sharepoint collaboration beta-testing tutorial

  • Languages
    M Martijn Smitshoek

    Dutch, English, C#

    The Lounge question

  • Do you actually read the "use agreements" of websites?
    M Martijn Smitshoek

    I check them, every time, absolutely! not

    The Lounge question

  • Death
    M Martijn Smitshoek

    I 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.

    The Lounge question

  • tyops?
    M Martijn Smitshoek

    Especially if you work at home with a keyboard that has a different horizontal pitch than the one st ypur pffice

    The Lounge question

  • You can hate on Elon Musk all day long if you want
    M Martijn Smitshoek

    Whatever ...

    The Lounge com discussion

  • You can hate on Elon Musk all day long if you want
    M Martijn Smitshoek

    "to hold him in any kind of special high regard" I wrote. Don't leave that out.

    The Lounge com discussion

  • You can hate on Elon Musk all day long if you want
    M Martijn Smitshoek

    I 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 ..

    The Lounge com discussion

  • You can hate on Elon Musk all day long if you want
    M Martijn Smitshoek

    Greg 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.

    The Lounge com discussion

  • Engineering question
    M Martijn Smitshoek

    I'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.

    The Lounge question regex performance
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups