• LCrawford (unregistered)

    All the commenters have been silent all day because the title was the frist to use the word "frist".

    The TestingTime studies has a variable phoneWearable = {yes, no, FILE_NOT_FOUND, yes_and_no}

  • (author)

    I think they were silent all day because I published a few hours late due to a blog software WTF: apparently if you "publish" a post but don't specify the date and time, it's not actually published.

  • BWill (unregistered)

    Columbus day is October 10th and not 1st or are you trying to confuse us?

  • (nodebb) in reply to LCrawford

    You forgot: yes_implies_no

  • (nodebb)

    Alas excpected exceptions are far too common.... Meaning that the underlying condition is not really exceptional - it is readily predictible as a possibility....

    Consider opening a file for write ... Before attempting:

    1. Make sure file exists
    2. Make sure you have permissions to write
    3. Make sure there is sufficient anticipated free space...

    Now even after all these checks (which do not involve even first-change exceptions), there is a possibility that things will change in the mS before the write occurs.... but that would be exceptionally rare (for most systems)

  • (nodebb) in reply to TheCPUWizard

    Now even after all these checks (which do not involve even first-change exceptions), there is a possibility that things will change in the mS before the write occurs.... but that would be exceptionally rare (for most systems)

    So rare that it never appears in static analysis tools under the bug category "ToCToU", Time of Check/Time of Use...

    By "never", of course, I mean "always".

  • jd (unregistered)

    Well, yes and no...

  • JGH (unregistered)

    AARRFGGH!!! The real WTF in that doctor's appointment is displaying unformatted telephone numbers. WTF can parse a random stream of random digits?

  • holy shit now I'm actually commenting here... (unregistered) in reply to TheCPUWizard

    Aren't exceptions always to be expected (when using a language/API than can actually throw exceptions of course)? If you didn't expect them you would not use try in the first place.

    As for your example, it is decidedly NOT possible to predict that an/no exception WILL be thrown (on most systems). It IS however possible to predict the possibility (I'm not using the statistics term here), as in "yeah its possible that a file operation throws", that's why you always catch and handle that exception. It might not throw most times (e.g. because the user cleverly selects a "good" file name), but no amount of checks can guarantee it, so why even bother?

Leave a comment on “Oneth things frist”

Log In or post as a guest

Replying to comment #581944:

« Return to Article