Coffeehouse Post

Single Post Permalink

View Thread: Just a thought: EnsureBlah isn't an appropriate naming scheme when the thing can't be ensured
  • User profile image
    wkempf

    , Sathyaish Chakravarthy wrote

    > so tell me which one of those throws and which returns a Boolean without looking it up in the MSDN

    That's a tough answer to guess. I would guess that the check one doesn't throw any exception because it is only meant to check and report; and verify seems a bit assertive. But then if the answer turned out to be the opposite, I might find that I find no difficulty convincing myself of it.

    What's naming things off and on by one?

    I think threading is difficult, too. There's too much to learn there.

    I think you read that wrong. It's a famous quote. I'll write it different to clarify.

    There are only two hard things in computer science:

    1. cache invalidation

    2. naming things

    3. off by one errors