- 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
Money? In the 24th century? WTF.
Admin
rist
Admin
I like it.
An uncharged, massless particle, almost impossible to detect.
Admin
The problems will increase after offshoring! We will make sure of it! The rich infidels will pay!
Admin
Why not have the bank issue replacement cards for the duplicates? If they send more dupes, report them stolen or something and get more replacements. Rinse and repeat until there are no collisions.
Admin
Admin
...and all traces of its existence vanish if it causes an inconsistency with the rest of the universe. Kind of like some theories about the grandfather paradox.
Admin
Hello, bank? Those cards weren't really stolen, the reports were fraudulent. Yes, that's right, it was Adam. Such a shame, he was a subordinate of mine before he turned to evil.
Admin
Does this artcle contain more typos or more bad Star Trek puns? I lost count on both.
Admin
Admin
Glad to know that more than 1 person thought of a non-software method of solving this problem. Especially since the bank said it was "impossible" that the company have multiple cards with the same suffix. Least frequently used duplicate-suffix card is "stolen/lost" until there are no duplicate-suffix cards.
And make that 4-digit suffix the primary key for the pcard table so that new duplicate cards can't even get entered.
Bug fixed.
Admin
[quote user="Don"][quote user="Mariachi"]Why not have the bank issue replacement cards for the duplicates? If they send more dupes, report them stolen or something and get more replacements. Rinse and repeat until there are no collisions.[/quote This all day long... easiest, most meaningful solution.[/quote]
That was my first thought, too.
Except it was more along the lines of "keep ordering new/secondary cards for the all the affected PHBs until they get one with a unique number".
Admin
The real WTF is obviously Adam. If you can't explain this to your boss why it doesn't work your either dumb or should quit.
Admin
I would also think there is a contract violation with the bank, if they insist the suffixes do NOT repeat. So, what do companies with more than 10,000 cards issued do?
Admin
Admin
"If one and only one card had previous transactions with this vendor, assign the transaction to that card."
How do you do this if you dont know what card did what?
Admin
I once worked at a place that had a custom message format for an embedded system. It used 0xFF to mark the start of fields in IPC messages, so 0xFF was not allowed in field data, because then you couldn't find the next field. (The protocol normally passed numbers as BCD.)
They also had a PoS system, with multiple DOS-based terminals (this was back in the '90s) connected via Ethernet. There was a message defined to announce the Ethernet address of the PoS system computers, and the last field in the message was the MAC address.
Except MAC addresses are binary, and may contain an 0xFF. But this was always the last field, always a specific message type, always a specific field ID, and only passed between the PCs, not the embedded system. They could have made it a special case.
Nope. What they did was every time they got a new Ethernet card, they checked its MAC address. If it contained an 0xFF, they threw it in the trash. I left before Ethernet ports started becoming standard on PC motherboards.
Admin
birthday paradox says you only need 118 to have a more than 50% chance to get a dupe
Admin
TRWTF is storing all this dangerously sensitive and confidential data in plaintext in a database file, yeah?
Admin
Also, if you just start dumping and re-issuing numbers to find one that isn't used, instead of intentionally constructing a number, it's going to get harder and harder as you start to fill up your 10,000 number space.
Admin
Admin
"Fix the bug!", they told me. So I grabbed a gun, and went to see the bank manager.
Admin
If my math is correct, you should be able to do it with only 101:
((101 * 100) / 2) / 10000 = 0.505
Incidentally, with 118, I got this;
((118 * 117) / 2) / 10000 ~= 0.69
Now wondering whether this was a very clever and subtle 69 joke...
Admin
Hey! I love this new commenting platform! Can we move the old Discourse comments over here?
Admin
Nice one, this wtf. Reminds me of a creditcard wtf I came across some 15 years back:
I got a new creditcard, this time from bank X.
Next day at work: "Got a fresh new card from bank X." "Oh, so did I, just this month!"
Since we were working on an online payment module at the time, we decided to compare our card's numbers.
Surprise: both cards were identical save the last two digits. Last digit is the check number and for the previous to last, I had a 3 and he had a 2 (he had received his card a day or two earlier than me).
Those days online payments did not involve the suffix number and I was very tempted to see if .....4right_checknumber had been issued as well.
But I didn't do it.
Admin
Admin
Admin
Admin
They just ... changed the link to point to Discourse?!
This is really turning into Worse Than Failure 2.0 ...
Admin
[quote user="Jibble"][quote user="Don"][quote user="Mariachi"]Why not have the bank issue replacement cards for the duplicates? If they send more dupes, report them stolen or something and get more replacements. Rinse and repeat until there are no collisions.[/quote This all day long... easiest, most meaningful solution.[/quote]
That was my first thought, too.
Except it was more along the lines of "keep ordering new/secondary cards for the all the affected PHBs until they get one with a unique number". [/quote]
Mine too. except it was more along the lines of "keep ordering new/secondary cards until you've got at least 10,000 of them and they are all duplicates. Solves nothing, but it's more fun.
Admin
Once I saw an application that were sending out large messages via MQ. It had been decided that those messages must be cut into multiple parts of 32000 characters. They also invented a brilliant solution to mark the last message with appending the character sequence "END" to it. It all worked "fine" until one of the records in one of these messages contained a partner company's name of "VENDING MACHINES Co." or "HAPPY-END Co." or something like that and also that message got cut right after the "END" sequence like "VEND" + "ING MACHINES". The rest of the story is up to your imagination. (Got fixed, nothing interesting)
Admin
This is not how the probability is calculated: given a collision probability p and a sample space d, the number n of samples that has a collision with probabibility p is approached by
sqrt(2dln(1/(1-p)))
For d = 10,000 (4 digits) and p = 0.5, that's ~= 117.74. So, you need 118 samples to have better than even odds.
Admin
Oh look, cross-software quoting, manually done!
I don't think so. Surely he praised Paula Bean's brillant frist post!Admin
And BTW: yes, I meant ♥ :-)
Admin
Admin
All those full card numbers are making my PCI compliance brain cells cry.
Admin
Of course suffixes don't repeat, just like SIM and IMEI numbers don't repeat.
(I had to write a database to track SIM cards being put into mobile phones. This was basically a table of unique SIM and IMEI numbers linked to a batch table. Naturally the complaints started rolling in, and I could say "Run the report to find out which batch the it thinks the IMEI is in", and sure enough they would find a phone with the same IMEI barcode. What I don't know is whether the duplicate IMEI was erroneously issued or whether it was some barcoding issue.)
Admin
Oh god, I just came back to look at comments and it had changed to that bloody awful discorse system.
So glad there is a way to find the real comments here rather than deal with that steaming pile of dog poo.
Admin
Admin
That's why, when I see a natural PK being used for storing some non-trivial amount of data (i.e, not a constants dictionary), my fingers twitch and reach for the developer's throat. Sometimes a simple explanation just doesn't work.
Admin
I'm really loving the meta WTF that Alex is pulling with Discourse. It's a great bit of performance art.
Or is it an early (or late) April fools day joke?
Who can tell.
Admin
Admin
For those of you who read the comments after appr. 10EDT:
The comment system for today's article started out with CS (this system), then was changed to Discourse after an hour or so.
That however turned out to have been accidental and Alex changed the link in the article back to point to CS again.
Admin
As soon as the bank said "but __ should not occur" your immediate reaction should be to pin the blame on them. "But __ DID occur, and it's your fault, so fix it." Do NOT start brainstorming ideas on how they can implement a workaround! That is THEIR problem.
Meanwhile, tell your boss that the bank is sending you incorrect transaction information (which is true) and there's not a damn thing you can do until they fix their problem (which is mostly true).
Admin
What a blissful utopia you must work in.
Admin
But boss, I checked with the bank and they said there is no problem, so there's no problem.
Done.
You're welcome.
Admin
This is not true. The bank is sending incomplete transaction information. Incomplete is distinct from incorrect transaction information. - Further the bank's information is presumably in accordance with the specification.
Admin
As in: we are sufficiently competent that we are in demand, and can easily change jobs if the one we are currently in compromises our sense of aesthetics.
Admin
Hanzo crept through the darkened hallways of WTFU. Somewhere lurking in the shadows was a dark presence, a force that was slashing MQ messages into bits like a fine katana bites through a melon. Hanzo knew that his quest was dangerous, and had driven his predecessor to madness deeper than that of Lorne Kates trapped in a Discourse fourum. Hanzo would have to rely on all of his Ninja training, all the secrets he learned in pubs across Spain, and all of his experience watching The Ring over and over again. Little did he know that the quest would delve into his worst mixed metaphors and tangled quasi martial arts imagery.
To be continued for some inexplicable reason...
Admin
Depending on where you work, I suppose, it could also be in accordance with the law. I've run into that before where if you are going to put the info in any format where it could be read by any unauthorized person that the suffix was ALL that could be sent or shown of the card number. That may have been the case here. Adam's company could have gotten perfect statements directly from the bank like a regular customer but since this transaction info was being transferred as plain text, only the last 4 digits could be legally sent.