- 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
I took it into account. When generating a thousand billion 128 bit UIDs, the probability of getting a duplicate UID is lower than 3e-13
Admin
What do I do when I can't reproduce a problem? Take a look at the code the same as Dan did and see if I can spot the error...
Surely any reasonable dev should be able to do that?
If you can't spot the error, and can't reproduce that's something else to simply not being able to reproduce it.
Admin
Admin
Do you know what scope_identity()/SELECT @@IDENTITY does or what an outparameter is? That takes more time than using GUIDs?
My favorite WTF with GUIDs is when I ordered something online got a nice confirmation page with a bolded GUID as the confirmation number but after waiting a few weeks with no response I emailed them with my confirmation html page that I saved and got the response, "Oh that's weird, we don't have anything on record." I have a feeling they were generating the guid on the web server and not caring if it actually got into the database.
GUIDs are nice for distributed applications but you still have to (ok I guess, you don't have to, but you should) return something from the database that says the records actually got there, IMHO.
Admin
You can safely use HTTP standard authentication mechanisms over SSL, obviating the need to use cookies.
I don't know what language you are talking about. There is no rand() in Visual Basic, and rand() in PHP or Perl will not do it fine since they both produce a sequence of pseudo-random numbers which by default is based on a weak seed with way too little entropy.
RTFM if you don't believe me, e.g. the documentation for Perl's srand function says:
"For cryptographic purposes, however, you need something much more random than the default seed."
and
"If you're particularly concerned with this, see the Math::TrulyRandom module in CPAN."
Admin
Go with what works. Use the database if necessary. Do not piss around with random numbers for no reason.
Res ipsa loquitor.
Admin
Sounds like you aren't doing your job and need to be fired. I also would have fired that coder. You need to step up and be a man, if something is tell them do not beat around the bush.
Admin
Wrong (insert after something)
Second solving the problem for them and then having a talk about randomness isn't helping anything or anyone. Your the manager and you need to manage. Not do two jobs. maybe you should be a coder and not a manager. Might save you getting fired in the end.
Admin
I think thats the key. If a developer says that this is only going to happen once in every ten thousand times, someone has to make the decision as to whether it makes 'economic' sense to persue a fix to something that may not happen again.
Second time out though, invite the developer to explain why that would be the case and why it has happened twice in a week.
Admin
How about... Don't close a damn bug that hasn't been proven to be fixed?!!
Admin
If a manager is ahead of the developers in an area he should share his knowledge , if they are ahead of him in an area they should their knowledge.
Admin
I've seen worse. Much worse. Though it did not make it to production, we took over the project from that team in time.
The indiot
But everything worked fine when he presented the app ...
Captcha: kungfu - yeah, that's what should have been used against those Vinods, Kumars and the rest of those indiots.
Admin
Nice Microsoft ad there.
Admin
Yes, there is always a reason: The first instance, if I understood it correctly, was that the two were booked on the same flight (the double-booking was explicitly a consequence of this; that, of course, is unexcusable). There is no law of physics excluding two people booking the same flight within one tick of each other, as long as the tick is considerably larger than the processor clock rate. Suppose, conservatively, that there are 1000 flights per day (the US airliner count alone is reputedly over sixteen thousand, many of which (cf Aloha Airlines) make more than a dozen flights a day) that are booked uniformly over 2 days, each of which holds 201 passengers, and that there are 1000 possible equally popular booking agencies to choose from, and that the tick is one millisecond. What is the minimum period in which the probability is one half or greater that such a coincidence occurs? This is analogous to the supposed Birthday Paradox. The number of people minus 1, k, is 200, the number of days, n, is 172800000000, and we intend to find the lowest x such that, designating the individual coincidence probability p, (1-p)^(1000x)=<0.5 First, (1-p)=(n-1)(n-2)...(n-k+1)(n-k)/n^k =product(i=0 to ((k/2)-1),((n-1-i)(n-k+i)))/n^k // for even k (n-1-i)*(n-k+i)=n^2-n-nk (1-p)=((n-1-k)/n)^(k/2) (1-p)=(172799999799/172800000000)^100, or about 0.999999884, and a little trial and error shows that x = 5959 days. As an aside, since (1-p)^365.2425 is roughly 0.958405025, my calculation predicts a chance of greater than one in 25 that such a "data fluke" happens, somewhere, in a year. Assuming 16000 airliners and one flight per day, x = 373 days, and it is more likely than not that it happens at least once, somewhere, in any given year.
Admin
I seek help from a more senior developer. You know, one of those who make double my wage.