• Frist (unregistered)

    Cannot find the comment resource file (comment12.txt)

    Captcha: eros - something to do with love or so, but how should a proper nerd know?

  • (cs)

    Dear Alex,

    Is there a reason you didn't file a bug report like a normal person?

  • (cs)

    Thanks to reflection, you can modify their code and add said function call in!

    Of course such is dangerous if their stuff gets updated... so do some exact version sniffing and don't inject code if it changes.

  • by (unregistered) in reply to Markp
    Markp:
    Dear Alex,

    Is there a reason you didn't file a bug report like a normal person?

    ... says the developer of the aforementioned "code"... :)

    captcha: wisi - don't be a wiki, but more wussy...

  • by (unregistered) in reply to by
    by:
    captcha: wisi - don't be a wiki, but more wussy...

    need more coffee...

    wisi - like a wiki, but more wussy...

    There we go, with the magic of the internets, I'm able to undo history...

  • Jasper (unregistered)

    OH MY GOD! This guy has our SOURCE CODE! Call the police! He's a hacker who broke into our systems and stole our source code!

  • (cs)

    Dear Alex,

    Corporate code is a POS unless you were the one that developed it (or can tweak it yourself). Accept it and move on to more useful WTFs.

    A Reader

  • Dave (unregistered)

    Shouldn't you use Environment.NewLine instead of "\r\n"?

    I do and it just seems better that way.

  • (cs) in reply to Dave
    Dave:
    Shouldn't you use Environment.NewLine instead of "\r\n"?

    I do and it just seems better that way.

    Yes, one should, but more importantly, one shouldn't be concatenating literals like that, just to put them on separate lines. And assuming this is how Reflector output the code, that means the compiler didn't optimize it away.

  • Brian Hudell (unregistered)

    I once asked a programmer why he would not use exceptions in his projects, and he said: "They must not have errors".

  • Márton Balassa (unregistered)

    I feel this urge to write an open letter to "Borlando" (guess what) about their load-of-crap Delphi, but it might happen to be a little longer than just a letter - maybe an anthology...

  • Bob (unregistered) in reply to Márton Balassa

    No need, Verity Stob did it for you.

  • (cs)
    // GUID generated 2009-08-24; could not find anyone else using it "{16AA8FB8-4A98-4757-B7A5-0FF22C0A6E33}");

    Hilarious! I see this all the time. Is it really so costly to generate GUIDs in your program?

  • no name (unregistered) in reply to frits
    frits:
    // GUID generated 2009-08-24; could not find anyone else using it "{16AA8FB8-4A98-4757-B7A5-0FF22C0A6E33}");

    Hilarious! I see this all the time. Is it really so costly to generate GUIDs in your program?

    Er - why would it be any better to generate a fresh one at runtime? The probability of collision is pretty much the same (actually, possibly higher as there is an tiny, tiny, tiny chance you might generate one that someone else is using).

  • (cs) in reply to no name
    no name:
    Er - why would it be any better to generate a fresh one at runtime? The probability of collision is pretty much the same (actually, possibly higher as there is an tiny, tiny, tiny chance you might generate one that someone else *is* using).
    Ah, but someone else randomly generating GUIDs might hit the one you're using, and then you're in trouble!

    Or not. I don't plan to lose sleep over it.

  • no name (unregistered) in reply to dkf
    dkf:
    Ah, but someone else randomly generating GUIDs might hit the one you're using, and then you're in trouble!

    Or not. I don't plan to lose sleep over it.

    If your source of entropy is good enough (and my calculations are correct), the chances of two GUIDs colliding are 1 in 340 billion billion billion billion. Or 1 / (the Irish national debt) ;-)

  • (cs) in reply to no name
    no name:
    Er - why would it be any better to generate a fresh one at runtime? The probability of collision is pretty much the same (actually, possibly higher as there is an tiny, tiny, tiny chance you might generate one that someone else *is* using).
    No, because now I've decided that I'll be using this GUID from now on. Just to piss you off!

    OK, maybe not.

  • Anonymous (unregistered)

    This is a great change to the usual WTFs, both in content and writing style. I like it a lot. I especially liked your use of a GUID that you "could not find anyone else using". Genius, pure genius. This actually hints at a WTF I've been expecting for years but have never actually witnessed (note to DBAs: if you generate GUIDs sequentially they're not GUIDs anymore).

    FYI, I have now used this GUID in my current application so it is no longer globally unique. Sorry.

  • (cs) in reply to Anonymous
    Anonymous:
    (note to DBAs: if you generate GUIDs sequentially they're not GUIDs anymore).
    So long as they all start from 1, that'll be OK…
  • Beau (unregistered) in reply to no name
    no name:
    dkf:
    Ah, but someone else randomly generating GUIDs might hit the one you're using, and then you're in trouble!

    Or not. I don't plan to lose sleep over it.

    If your source of entropy is good enough (and my calculations are correct), the chances of two GUIDs colliding are 1 in 340 billion billion billion billion. Or 1 / (the Irish national debt) ;-)

    So you're saying there IS a chance...

  • (cs)

    Windows 7 (probably other versions as well) actually has a thing already built into it to stop dialog boxes from popping up. It's called the Dialog Filter. You should be able to set it up to block that specific box if need be.

    Here's a link to the Embedded Standard 2011 one: http://blogs.msdn.com/b/embedded/archive/2009/11/24/dialog-box-filter-a-new-feature-in-windows-embedded-standard-2011.aspx?wa=wsignin1.0

    From how I remember the other ones work just like this one as well.

  • Anonymous (unregistered)

    I seen a GUID collision once, simulating a system with millions of objects for a while, maybe i should buy more loto tickets...

  • no name (unregistered) in reply to Anonymous

    [quote user="Beau"]If your source of entropy is good enough (and my calculations are correct), the chances of two GUIDs colliding are 1 in 340 billion billion billion billion. Or 1 / (the Irish national debt) ;-)[/quote]

    So you're saying there IS a chance...[/quote]

    Of course!

    [quote user="Anonymous"]I seen a GUID collision once, simulating a system with millions of objects for a while, maybe i should buy more loto tickets...[/quote]

    I would guess that your entropy wasn't that great. According to this calculator, you would need to generate over 2 billion billion objects to see a 1% chance of a collision.

  • (cs) in reply to Anonymous
    Anonymous:
    This is a great change to the usual WTFs, both in content and writing style. I like it a lot. I especially liked your use of a GUID that you "could not find anyone else using". Genius, pure genius. This actually hints at a WTF I've been expecting for years but have never actually witnessed (note to DBAs: if you generate GUIDs sequentially they're not GUIDs anymore).

    FYI, I have now used this GUID in my current application so it is no longer globally unique. Sorry.

    huh? what difference does it make if you are generating them sequentially? they still have the same chance of being unique as if you were generating them non-sequentially

  • (cs) in reply to Brian Hudell

    I've just started learning myself some Erlang, and I have to say that it clearly demonstrates that exceptions and exception handling are for the weak.

    Real men just let the process crash and let one of the other thousand processes in his application worry about it.

  • European (unregistered)

    Wow. Open Letters are pompous.

    Captcha: Penis.

  • airdrik (unregistered)

    TRWTF is that he added the comment next to the first place where CreateDLL is called but not the second.

  • Dirge (unregistered) in reply to apaq11
    apaq11:
    Windows 7 (probably other versions as well) actually has a thing already built into it to stop dialog boxes from popping up. It's called the Dialog Filter. You should be able to set it up to block that specific box if need be.

    There's a registry value that can be added in Windows at least as far back as Windows 2000 that prevents dialog boxes from being shown. IIRC, the effect is as if the user immediately clicked "OK".

    We used it at work in a situation very much like this one. The downside is that when you go to do some interactive troubleshooting on the systems with it enabled, you need to remember that you're not going to see any dialogs either (unless you disable the feature, of course).

  • Anonymous (unregistered) in reply to A Nonny Mouse
    A Nonny Mouse:
    Anonymous:
    This is a great change to the usual WTFs, both in content and writing style. I like it a lot. I especially liked your use of a GUID that you "could not find anyone else using". Genius, pure genius. This actually hints at a WTF I've been expecting for years but have never actually witnessed (note to DBAs: if you generate GUIDs sequentially they're not GUIDs anymore).

    FYI, I have now used this GUID in my current application so it is no longer globally unique. Sorry.

    huh? what difference does it make if you are generating them sequentially? they still have the same chance of being unique as if you were generating them non-sequentially
    That's exactly what my DBA said, right before I fired the incompetant moron. I'm not going into this now because it's only going to get deleted for being off-topic - you'll just have to wait until we get a real sequential GUID WTF.

  • RCS (unregistered)

    Alex,

    Shouldn't this be in the "Soapbox" category?

  • Lazlo (unregistered) in reply to Dirge
    Dirge:
    There's a registry value that can be added in Windows at least as far back as Windows 2000 that prevents dialog boxes from being shown. IIRC, the effect is as if the user immediately clicked "OK".

    I'm assuming that, using this feature, if the dialog asks "Abort, Retry, Fail" the effect is as if the user immediately clicked "File Not Found"?

  • Anonymous (unregistered) in reply to Anonymous

    Well, we had this particuliar asset editor which ended up with a sequential guid solution involving a guid server allocating guid chunk to clients. Worked pretty well with multiple people working on it at a time.

  • TheCPUWizard (unregistered) in reply to no name

    Actually the odds become measurable when you start generating a few billion and need them all to be unique against each other. Over the past 5 years, I have 2 confirmed cases of database "corruption" caused by using GUIDS as keeys, and the foolish developers believing that they were guaranteed unique...

    IMHO, it is unfortunate that "privacy concerns" forced the abandonment of the original algorithm(s) and degraded GUIDS into simply bery big random numbers. [SoKoUUID - Sort of, Kind of, Usually Unique Identifiers]

  • Anonymous (unregistered) in reply to Anonymous
    Anonymous:
    Well, we had this particuliar asset editor which ended up with a sequential guid solution involving a guid server allocating guid chunk to clients. Worked pretty well with multiple people working on it at a time.
    I'm sure it did. Most systems work perfectly well before they break. See the comment from CPUWizard above.
  • jger (unregistered)

    "appreciate the device"? What device? The famous world-destruction-by-one-push-on-a-button-device?

    Yeah yeah, I know... it´s probably meant to be "advice".

    __ Note from Alex: I actually used the word I meant to use this time. "Device" as in "story-telling" device of an open letter.

  • PS (unregistered) in reply to TheCPUWizard
    TheCPUWizard:
    Actually the odds become measurable when you start generating a few billion and need them all to be unique against each other. Over the past 5 years, I have 2 confirmed cases of database "corruption" caused by using GUIDS as keeys, and the foolish developers believing that they were guaranteed unique...

    Which, actually, isn't that surprising: http://en.wikipedia.org/wiki/Birthday_paradox

  • Anonymous (unregistered) in reply to TheCPUWizard
    TheCPUWizard:
    IMHO, it is unfortunate that "privacy concerns" forced the abandonment of the original algorithm(s) and degraded GUIDS into simply bery big random numbers. [SoKoUUID - Sort of, Kind of, Usually Unique Identifiers]
    I sort of agree but at the same time I think that encoding the computer's MAC address into the GUID is a major privacy concern. It is also very easy to subvert since you can manually set the MAC address of a virtual machine to anything you want and start creating GUIDs, which might be good for framing some poor slob. If this sounds unlikely I would direct you towards the author of the Mellisa virus, who served hard time because the GUIDs in his virus code identified his machine's MAC address (he was also a bit of a moron but that's beside the point).
  • no name (unregistered) in reply to PS
    PS:
    TheCPUWizard:
    Actually the odds become measurable when you start generating a few billion and need them all to be unique against each other. Over the past 5 years, I have 2 confirmed cases of database "corruption" caused by using GUIDS as keeys, and the foolish developers believing that they were guaranteed unique...

    Which, actually, isn't that surprising: http://en.wikipedia.org/wiki/Birthday_paradox

    In fact, it is quite surprising, as you would know if you read the article you linked to in detail. If you look at the probability table halfway through the article, you can see that you need 2.6E16 elements just to get a one-in-a-million chance of a collision. That's an awful lot of elements for a very very small chance.

  • no name (unregistered) in reply to no name
    no name:
    PS:
    TheCPUWizard:
    Actually the odds become measurable when you start generating a few billion and need them all to be unique against each other. Over the past 5 years, I have 2 confirmed cases of database "corruption" caused by using GUIDS as keeys, and the foolish developers believing that they were guaranteed unique...

    Which, actually, isn't that surprising: http://en.wikipedia.org/wiki/Birthday_paradox

    In fact, it is quite surprising, as you would know if you read the article you linked to in detail. If you look at the probability table halfway through the article, you can see that you need 2.6E16 elements just to get a one-in-a-million chance of a collision. That's an awful lot of elements for a very very small chance.

    PS: If you have a few billion (let's say 26 billion) the odds are one in 1,000,000,000,000,000,000.

    Unless your entropy is poor.

  • Anonymous (unregistered) in reply to PS
    PS:
    TheCPUWizard:
    Actually the odds become measurable when you start generating a few billion and need them all to be unique against each other. Over the past 5 years, I have 2 confirmed cases of database "corruption" caused by using GUIDS as keeys, and the foolish developers believing that they were guaranteed unique...

    Which, actually, isn't that surprising: http://en.wikipedia.org/wiki/Birthday_paradox

    I was going to break out the birthday "paradox" (quoted because it is not actually a paradox) but as I said to the last guy, I'm not getting into this discussion because it is completely off-topic and almost impossible to explain to someone in a forum like this. This is exactly what the birthday "paradox" highlights - the fact that human intuition is very often misguided when it comes to probability (I have a keen interest in quantum physics so probability is something I've fought with for years).

  • (cs)

    A message box that no user can click? Nothing that a userbot suck as ClickYes can't fix.

    There, problem solved (and in case you wonder, I've seen this "solution" being used in practice to "automate" modal dialog closing in a production environment).

  • Sean (unregistered) in reply to Brian Hudell
    Brian Hudell:
    I once asked a programmer why he would not use exceptions in his projects, and he said: "They must not have errors".

    If this was C++, that pretty much sums it up: exceptions tend to cause more errors than they help you resolve. Writing exception-safe code is a nightmare, and even the standard library gets it wrong in places. :)

    (Yes, I understood that the guy you were referencing meant something completely different and much dumber.)

  • Jay (unregistered) in reply to C4I_Officer
    C4I_Officer:
    A message box that no user can click? Nothing that a userbot suck as ClickYes can't fix.

    There, problem solved (and in case you wonder, I've seen this "solution" being used in practice to "automate" modal dialog closing in a production environment).

    How do you intend to do this when there is no user session for the bot to run in? Remember this is a back-end server with no user sessions save for the ASP.NET account. Good luck running a bot under that.

  • f0dder (unregistered)

    Ugh, embedding DLLs as resources? Bloats up the main assembly for no good reason. And they delete-if-existing-and-always-rewrite the DLL? Christ. Somebody should be dragged out back and receive a thorough beating.

  • Matt (unregistered)

    The Ral WTF is loading a dll from the current working directory. http://support.microsoft.com/kb/2389418

    Stop doing this!

  • ThingGuy McGuyThing (unregistered) in reply to Anonymous
    Anonymous:
    A Nonny Mouse:
    Anonymous:
    This is a great change to the usual WTFs, both in content and writing style. I like it a lot. I especially liked your use of a GUID that you "could not find anyone else using". Genius, pure genius. This actually hints at a WTF I've been expecting for years but have never actually witnessed (note to DBAs: if you generate GUIDs sequentially they're not GUIDs anymore).

    FYI, I have now used this GUID in my current application so it is no longer globally unique. Sorry.

    huh? what difference does it make if you are generating them sequentially? they still have the same chance of being unique as if you were generating them non-sequentially
    That's exactly what my DBA said, right before I fired the incompetant moron. I'm not going into this now because it's only going to get deleted for being off-topic - you'll just have to wait until we get a real sequential GUID WTF.

    I wish you would go into this. I did a quick Google search and couldn't find any reason why sequential GUIDs are any more likely to collide than non-sequential. Perhaps you could enlighten me?

    (captcha: ludus - it's never ludus.

  • Anon (unregistered) in reply to no name
    no name:
    dkf:
    Ah, but someone else randomly generating GUIDs might hit the one you're using, and then you're in trouble!

    Or not. I don't plan to lose sleep over it.

    If your source of entropy is good enough (and my calculations are correct), the chances of two GUIDs colliding are 1 in 340 billion billion billion billion. Or 1 / (the Irish national debt) ;-)

    The chances of a proper randomly-generated GUID colliding with a MAC-address-and-time GUID is zero. Not "nearly zero", but actually zero. A randomly-generated GUID isn't completely random - there are a few fixed bits that identify the GUID type. So randomly-generated GUIDs can only collide with other randomly-generated GUIDs.

    Of course, this assumes that the randomly-generated GUID is generated by following the RFC and actually setting those few bits to the right fixed values.

  • wtf (unregistered) in reply to ThingGuy McGuyThing
    ThingGuy McGuyThing:
    I wish you would go into this. I did a quick Google search and couldn't find any reason why sequential GUIDs are any more likely to collide than non-sequential. Perhaps you could enlighten me?

    I'm curious about this as well - not that I doubt the statement, I just don't see where it comes from. (an actual, sincere, non-snarky question? on this site? Oh, come on!)

  • Anon (unregistered)

    Of course, the worst thing you can do with a GUID is put it on the internet. Now some moron is bound to copy it and put it in their code without understanding that they are supposed to generate their own. Pretty much guarantees a collision.

    See: just about any tutorial on the web that includes a GUID.

  • Pixa (unregistered)

    On the plus side, at least it's not PowerBuilder...

Leave a comment on “Dear Sybase: MessageBoxes Don’t Belong In Drivers”

Log In or post as a guest

Replying to comment #:

« Return to Article