- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Cannot find the comment resource file (comment12.txt)
Captcha: eros - something to do with love or so, but how should a proper nerd know?
Admin
Dear Alex,
Is there a reason you didn't file a bug report like a normal person?
Admin
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.
Admin
... says the developer of the aforementioned "code"... :)
captcha: wisi - don't be a wiki, but more wussy...
Admin
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...
Admin
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!
Admin
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
Admin
Shouldn't you use Environment.NewLine instead of "\r\n"?
I do and it just seems better that way.
Admin
Admin
I once asked a programmer why he would not use exceptions in his projects, and he said: "They must not have errors".
Admin
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...
Admin
No need, Verity Stob did it for you.
Admin
Hilarious! I see this all the time. Is it really so costly to generate GUIDs in your program?
Admin
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).
Admin
Or not. I don't plan to lose sleep over it.
Admin
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) ;-)
Admin
OK, maybe not.
Admin
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.
Admin
Admin
So you're saying there IS a chance...
Admin
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.
Admin
I seen a GUID collision once, simulating a system with millions of objects for a while, maybe i should buy more loto tickets...
Admin
[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.
Admin
Admin
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.
Admin
Wow. Open Letters are pompous.
Captcha: Penis.
Admin
TRWTF is that he added the comment next to the first place where CreateDLL is called but not the second.
Admin
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).
Admin
Admin
Alex,
Shouldn't this be in the "Soapbox" category?
Admin
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"?
Admin
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.
Admin
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]
Admin
Admin
"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.
Admin
Which, actually, isn't that surprising: http://en.wikipedia.org/wiki/Birthday_paradox
Admin
Admin
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.
Admin
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.
Admin
Admin
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).
Admin
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.)
Admin
Admin
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.
Admin
The Ral WTF is loading a dll from the current working directory. http://support.microsoft.com/kb/2389418
Stop doing this!
Admin
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.
Admin
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.
Admin
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!)
Admin
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.
Admin
On the plus side, at least it's not PowerBuilder...