- 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
So? Performance is a hardware problem. Just get a bigger server (these days: buy more cloud) and everything will be well.
(At least, that's how our vendors solve performance problems.)
Admin
Believe it or don't. I don't really care. We had a duplicate that was generated. I thought it was absolutely impossible because the time/date was involved. But when I learned that they are essentially long pseudorandom numbers with a couple "version 4" codes.
Let me ask you this: Do you really think that Microsoft's pseudorandom generator algorithm is so good that it could never give a duplicate?
I mean, there's a reason that Google gives 624,000 results when searching for "Duplicate GUID". They can't all have done it wrong...
Admin
I find it remarkable how much support that mindset is gaining as technology improves. Truthfully, I despise the strategy. For example... Entity Framework generating 200 lines of code for every 1 line that actually needs to be there.
I can host 10 web apps on my workstation while playing City of Heroes and downloading animes at 2MB/sec without suffering slow response times. Yes... my system definately has the hardware for it... but it would not work if I was silly enough to think (just do whatever and add hardware if it needs it).
Admin
This is typical Microsoft crap on a stick. The only thing that distinguishes UuidCreate from a bog standard PRNG is the the temporal and spatial components -- so let's break them.
When I first saw UuidCreate I didn't trust it. Not because I think it can't work, not because UUIDs are long and ugly, not because there are better methods, but because it's implemented by Microsoft.
The value of a UUID scheme is the mathematical rigor of its specification. At Microsoft, a developer who admits he can even spell "mathematical rigor" goes immediately to the bottom of the stack.
-Harrow.
Admin
This is even kinda relevant to this article, as the question asked was "can I still steal^Hacquire a t-shirt even if I have no desire, nor in fact any particular ability to test out New Relic's software on any real applications?", and the official answer here seemed to be "yes", so I did. Interestingly enough, New Relic's official answer, according to their faq, would seem to be "no", but I wanted a t-shirt, so I did it anyway. Presumably New Relic wasn't actually reading the comments on their advertisement's thread. :p
Admin
Admin
First of all, an awful lot of events happened in the first second after the BB. Hell, forget the first second, let's just focus on the first thousandth of a second...
Anyway, the point is, the Universe was so small that with the speed of light and all that you could get a hell of a lot done in a very short time. In other words, it was as if time proceeded a lot slower than it does now.
Which means most of those GUIDs would have been calculated before the formation of the first atoms.
Admin
Admin
250k duplicate GUIDs in a set of 3 million, we sure need this DiffeerentGuid method..
Admin
one problem is that the guid generator still depends on random numbers, which are generated by system clock. based on your count, 1 of 6 guids were duplicated. Thread.sleep for 100ms and try it again. I suspect that 10 MS would do it... but just to be sure.
Admin
Admin
Hi Some Jerk :-)
My comments were in reference to the generation of GUIDs in parallel in Oracle. See http://sqlfascination.com/2012/01/22/oracle-duplicate-guid-values-being-returned-from-sys_guid-when-run-in-parallel/
Sleeping would defeat the purpose.
Admin
Hi Some Jerk :-)
My comments were in reference to the generation of GUIDs in parallel in Oracle. See http://sqlfascination.com/2012/01/22/oracle-duplicate-guid-values-being-returned-from-sys_guid-when-run-in-parallel/
Sleeping would defeat the purpose.
Admin
When Guid isn't Guid enough, use DifferentGuid.
Admin
Ahh. I am surprised that Oracle has that problem. I made a blanket comment earlier that ORDBMS servers would be an ideal place to maintain uniqueness among such fields, as it is inherrent in the architecture to deny duplicates (with constraints). It seems that this might be more challenging for Oracle to handle than MS Sql Server. Can you force the insert to retry if it fails? Just curious.
Admin
Admin
Admin
Not really... it was just a subtle suggestion that certain people could maybe produce their own ideas as opposed to using those of others durring the name selection process. I attempted to word it as politely as possible.
Admin
Though I must admit... using my handle exclusively to spout nonsense really is unkind. I suspect (however) that most can tell the difference. You should try to be more subtle... and actually say something intelligent once in a while... and it might pass for me.
Admin
Admin
Admin
:p
see? Someone does care. Now grow an imagination... or failing that, feel free to post as "Some Jerk is a dickhead" or something... if you suddenly found that the most interesting thing to do with your life is to harrass me on a message board.
Anyway... I never said that I thought "SOMEONE" cared... only said that "I" cared.
Admin
Admin
Admin
Admin
You shouldn't leave these things to chance.
Admin
What are the "fancy html comments" I keep reading about? I don't think I've ever seen them. :S And I read the first page of comments on nearly every article.
Admin
I wonder what the test coverage of the body of the
loop is like?Admin
Ah, but if you get a bigger server, you hasten the heat death of the universe, so you are defeated once again!
Admin
Admin
Admin
Admin
There's a reason that Google gives 12,600,000 results when searching for "void main". It can't be wrong then, right?
Admin
Let's get this straight: He counted "velociraptors that are running loose" and you counted "all occurrences of 'WTF' on the web"...and you're using your count as an explanation for why his count doesn't indicate any concern?
All I can say is: +1
Admin
Even if GUIDs aren't used for security themselves, they reveal details about their origin that might be considered secure.
Ignoring the fact that wireless is often sensitive to MAC for example, think about assigning a GUID to an election ballot: The GUID reveals the election machine and the time of creation, which means that the individual that cast the ballot can be identified--a violation of secret ballot.
Of course, UUID is probably equally unusable, really, since I suspect MS carefully buried all that information in the ID anyway. Like NSA, they can't stand it if they don't know exactly where and when the UUID was created, so they probably just used some kind of lame hardcoded encryption to hide the details. I won't be surprised if we hear about someone breaking the UUID protection scheme at some point, so that MAC and time can be extracted.
Admin
Perhaps the guid generator dont generate new guids every time, perhaps it increments stored generated guid and time from time update. Then you have a multthreaded program, th collision can happen once or twice a month.
Admin
Admin
Admin
Admin
Captcha: combover
Admin
Admin
Admin
That comment, my friend, deserves a very high position in the thedailywtf hall of shame.
Admin
This statement suggests that all events must happen around the same time. Let's loosen the simultaneity requirement to be that all these events happen during the same hour, to be very fair.
The probability of being hit by lightning is about 1e-6 per year or 1e-10 per hour.
Let's assume that one person in the US gets hit by by a meteor every year, which internet searches suggest to be a high estimate. Then the probability of being hit by a meteor is about 1e-8 per year or 1e-12 per hour.
If you play a typical lottery once a day, you have about 1e-8 probability of winning per day or about 1e-9 per hour.
There are less than 10 Tuesdays during Lent, giving less than 1e-1 probability that any given day is a Tuesday during Lent.
Ferrari makes about 1e4 Ferraris per year, so there are less than 1e6 Ferraris in the US. Therefore the probability that a random person in the US owns a Ferrari is less than 1e-2.
Finally, let's say you spend 15 minutes every driving to a diner for pancakes. This gives 1e-2 probability that you are driving to a diner for pancakes.
Multiplying everything together, we get 1e-36 probability per hour. Given the roughness of the estimate, that's very close to the 1e-37 probability of collision of two completely random GUIDs. So don't be so confident.
(Of course, a better estimate would also have to account for the fact that people have more than one hour in their lives in which to have this unfortunate accident. But a better estimate would also have to account for the fact that there are usually more than two GUIDs to collide. And because of the birthday paradox, I don't expect these additional details would weigh in favor of the article's statement.)
Admin
It's mostly other vendors. "Tuning" is a dead art, I guess.
Admin
It makes sense to write your code in a way that it gracefully handles a duplicate, just in case a software bug generates one and you don't want to lose data or order $100 million worth of the wrong stuff. Writing clock cycle munching code to prevent duplicates from forming defeats the purpose of using UUIDs and you might as well use a counter in a central repository. Even with locking, it's likely going to be faster than searching your entire backlog of generated ID's for duplicates like this code does...
Admin
Admin
Out of curiosity, are UUIDs more unique than GUIDs? Yes!
Inside curiosity, are UUIDs more unique than GUIDs? No!
Because even if a GUID inside curiosity is duplicated by others, only the one inside curiosity is local to Mars.
Admin
The difference between a GUID and a UUID is that the same GUID can exist somewhere on another planet while a UUID cannot, it is universally unique.
For spaceships therefore, you need UUIDs just to be safe.
Admin
"void main" is correct in C# and Java, incorrect in C and C++.