- 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
It's still better to normalize and then validate. And this table doesn't appear to be part of validation, based on the fact that the ALL_MODS table doesn't have a field for which maintenance procedure is being performed.
Admin
[quote user="Jay] What a great idea! Just have a list of common comments that users can select from. Think how much time it would save.
First!
The real WTF is using VB.
Irish Girl!
Wooden table!
This story is obviously fake because no rational human being would do any such thing.
If we make a few additional assumptions what the programmer did here is completely valid.
... and maybe a dozen or so more.[/quote]
Reminds me of a joke:
A guy is sitting in a bar, having a drink or two. Every once in a while, someone will call out a number, and the patrons will laugh. He gets more and more confused, until someone calls out "37", and the patrons go absolutely nuts - rolling on the floor with laughter. So he grabs one of the waiters.
Guy: "Uh, excuse me, I'm confused. Every once in a while, someone calls out a number and the crowd laughs. What's going on?"
Waiter: "Oh, those are the regulars. They've told the same jokes and stories so many times, they decided to give them all numbers. So now instead of telling the joke, they just call out the number."
Guy: "Cool! But what about the last one? Someone called out 37 and everyone laughed much, much harder than usual."
Waiter: "Oh, that's because they'd never heard that one before."
Admin
Waiter: "Sure, go ahead. 103 is a funny one."
Guy: "103!" (room gets very quiet)
Guy: "What happened? Nobody laughed."
Waiter: "Some people just don't know how to tell a joke."
Admin
Wait! What's the rest of the iceberg this guy hit? Sadistic minds want to know! j/k...
Admin
Yes, it looks like the story is incomplete. WTF! I want to know what is the rest of the iceberg too!
Admin
wild guess...
sum(k = 1 .. n, choose(n, k)) * sum(i = 1 .. n, sum(j = 0 .. i-1, choose(i,j)))
n = maximum number of steps
First line is number of possible non-shorthand step combinations Second line is number of ways to insert commas in each set of steps.
yes? no?
x anon
Admin
So the puzzle about how many possible mods had to be answered, I made a quick python program:
The result is 101302819786919522
Admin
There's requirements, there's (wretched) design, there's (brain-dead) implementation, there's (predictably unhappy) day-to-day service delivery, and finally there's Supremely Cretinous Silver Bullet.
Similarly, there's math(s) and then there's counting.
Counting is inelegant. Symbols suffice.
Admin
Of course you are right. The story presented the table as the WTF, not the requirement. TRWTF is some unholy combination of the two.
ingenium?
Admin
Nice! Here's another variant I've heard. After the original conversation, we get:
Some Patron: "52!"
Crowd: jeers and catcalls
Guy: "What was that all about?"
Waiter: "Oh, that's Smith. He really ought to give up on that one - he can never quite handle the Swedish accent."
Admin
What I shown you was math translated to a python program, it was not 'counting'.
Want symbols? The result for N=45 is f(45, 0,0) where: { f(0, x, 0) = 1 f(0, x, 1) = 0
f(i, 1, 1) = f(i-1, 1,1) + f(i-1, 1,0) f(i, 1, 0) = f(i-1, 0,0) + f(i-1, 1,0) f(i, 0, 0) = f(i-1, 1,0) + f(i-1, 0,0) }
regards.
Admin
Think about it... it just make sense.
The only entries that exist in the table are that entries that actually be used... that means if somehow certain technicans skipped one of the steps that's actually be required, he would not be able to enter it here.
Only that it there should be function that used to check the missing steps...... :P
Admin
The fact that anybody working on that system can see it as 'workable' makes me feel nauseous
Admin
Actually, all calculation methods so far are wrong.
If anybody wants the real result, in a symbolic way then take this matrix:
[ 2 0 1 ] [ 1 1 0 ] [ 1 1 0 ]
Raise the matrix to the 45th power (K=45) and the count will be in the top left of the result matrix.
I.E: If K=1 Then there are two results: 1 and [empty] . Do the above procedure and you get 2.
For K=2 the result is 5: (empty); 1 ; 2; 1,2 ; 1-2; And the thing works.
For K=3, the result is 13:
(empty) 1 1,2 1-2 1,2,3 1-2,3 1,2-3 1-3 1,3 2 2,3 2-3 3
The math behind is a long story and I don't think you guys are too interested in it.
Admin
Also what about "diaphragm pumps screw arranged marriage"?
Admin
3 692 890 883 188 542 000 000
Admin
...and a turkey baster
Admin
Ah, I think I can help out there. What we need is an extra table to map the bad combinations to their correct versions.
Admin
Parsing those strings was part of the job of the first C++ class I ever wrote back in 1993
Admin