- 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
F-t,p,o,s,t
Admin
We need a full list of every single aviation company that uses Gary's company for its maintenance, so we know who not to fly with.
(except of course I'm sure all the others have similar WTFs too)
Admin
I dare say that you'd have to have an IQ in the single digits to come up with such an braindead idea...
Admin
Wait, that table contains every possible permutation of mods? facepalm
Admin
ALL mods? I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45? Better order some more disks.
Admin
Every problem can be solved with a lookup table. Or so some developers seem to think...
Admin
W,T,F|W,T,F W,F,T|W,T,F T,F,W|W,T,F T,W,F|W,T,F F,W,T|W,T,F F,T,W|W,T,F
Admin
it contains every combination used thus far.
if someone trys to enter a combo that hasn't been used before- it gets rejected.. and then a request was made to one of 3 people to add a permutation to the list
Admin
Hey Mark, would you mind adding a mod for the comment I'm about to write? Oh, and try not to botch the spelling.
Admin
This is genius. If you get paid by the hour to enter those rows you would have several decades of work ahead of you.
Admin
'What a great first assignment!'
Famous last words
Admin
If not, you'd be looking at 45!, which is somewhere along the 10^56 range (454443*42 etc).
If it's inclusive, you just do 45^45, which is along the 10^74 range. Thats combinations, not even data for all those possible combinations, or combinations with less then 45 things.
Admin
You know, in many articles I just try to find some excuse for a fellow developer coming with the article's WTF. But some are just inexcusable. Not many times I do whisper and facepalm at the same time, but today, right now... my goooooooogles!!! where are they?!?
Admin
This is the first time I've actually said "oh my god" out loud to one of these stories.
And it was completely involuntary.
Admin
So in practice, it's not nearly as bad as in theory. Still, this ranks pretty high on the "how loud I actually shouted WTF" scale.
Admin
I think you can file this one under "Should have realized"
As in, when the original developer was priming the system with a few hundred rows of mods, didn't he stop and realize "There's got to be a better way.... nah!"
FACEPALM
Admin
Oh. My. Mod.
Admin
2^ 45 = 35,184,372,088,832 45! = 1.1962222086548019456196316149566e+56 45 ^ 45 = 2.4806364445134114549464918239541e+74
I hope they never try and do select * from all_mods.
Admin
This one actually made me say "No!" out loud.
What's missing, however, is the second tard who usually comes in and thinks "I could write a spiffy little PL/SQL function that would finish out the table."
Admin
Given that:
"Because the company specialized in a fairly specific type of components (multimedia), the steps to perform the work were fairly consistent"
There is probably only a small subset that are considered 'valid' sequences of steps. Exceptions would be required to be approved by someone who knows that this won't result in the fiery death of hundreds of airline travelers.
Admin
What the previous poster was trying to say, in its mechanical way, is that it is time for Alex to move to recaptcha.
Admin
After the crap I've been dealing with this morning, it's nice to read something and say, "Wow, it's not that bad here."
Of course I was reading this at lunch and nearly lost my appetite.
Admin
As we deal with mods, so we must frame those mods.
(What?)
Admin
So what happens when someone tries to enter an en-dash instead of a hyphen for a range?
Admin
Bob is correct, there are 2^45 possible combinations of 45 things here. If you look at the example, the steps are entered in increasing numeric order; for example, you can have 1,2 but not 2,1. Therefore, either step 1 is in the combination or it isn't, either step 2 is in the combination or it isn't, either step 3 is in the combination or it isn't, etc. Thus each possible step doubles the number of combinations, giving us 2^45 - 1 possible combinations. (The - 1 is because the combination of no steps isn't valid.)
Admin
Admin
Ok...wtf is a shade sail?
Admin
What we need on TDWTF is a similar method of selecting from a table of all possible comments. We could just enter a number and it would select the comment and insert it for us.
Of course, we all know what the first entry in the table would be...
Admin
As someone who used to work with aircraft maintenance logs, I can vouch for the fact that just because some technician LOGS that he did steps 1-10 doesn't mean he didn't SKIP some of them. Sadly, a routine occurrence.
Admin
Ditto. I did the same exact thing.
This is... unbelievable.
Admin
It's still ridiculous to put together a 30 BILLION row* table instead of parsing input and writing a validating function to make sure that mandatory steps are always present.
*give or take a couple hundred million or so
Admin
My lord, I felt physically weak after seeing that. That's the most horrendous thing I've ever seen. It would take, what, 10 lines of code? Instead it's how many thousands of table entries? That's not a WTF, that's a OMG-WTF-Friendly-Fire-Cluster-Bomb. Someone needs to take away the degrees those 3 have so that they will never be able to work in the industry again.
Admin
OMFG.
No. No. NO. No. No!
Admin
Guys like you make the baby Jesus cry, and planes fall burning from the sky. (Which the baby Jesus is mysteriously unable or unwilling to prevent. Hmmm...)
Admin
Ah, but then we can use the following, much smaller table:
Admin
Actually, this isn't totally right. Because a user is entering this manually, you have to be able to accept input in ANY legal format. Thus: 1-4,6 = 1-3,4,6 = 1,2,3-4,6 and so on. With a proc they'd all map to 1,2,3,4,6, but with ALL_MODS you need a seperate entry for each
Admin
P: Left inside main tire almost needs replacement. S: Almost replaced left inside main tire.
P: Test flight OK, except auto-land very rough. S: Auto-land not installed on this aircraft.
P: Something loose in cockpit. S: Something tightened in cockpit.
P: Dead bugs on windshield. S: Live bugs on back-order.
P: Autopilot in altitude-hold mode produces a 200 feet per minute descent. S: Cannot reproduce problem on ground.
P: Evidence of leak on right main landing gear. S: Evidence removed.
P: DME volume unbelievably loud. S: DME volume set to more believable level.
P: Friction locks cause throttle levers to stick. S: That's what they're for.
P: IFF inoperative. S: IFF always inoperative in OFF mode.
P: Suspected crack in windshield. S: Suspect you're right.
P: Number 3 engine missing. S: Engine found on right wing after brief search.
P: Aircraft handles funny. S: Aircraft warned to straighten up, fly right, and be serious.
P: Target radar hums. S: Reprogrammed target radar with lyrics.
P: Mouse in cockpit. S: Cat installed.
P: Noise coming from under instrument panel. Sounds like a midget pounding on something with a hammer. S: Took hammer away from midget
Admin
So here I was, eating my Caesar salad, innocently reading the article until I got to the table. At the sight of which, I let out a chuckle and made a piece of crouton shoot out of my nose.
I never thought bread could be so painful.
CAPTHCA: iusto From the immortal words: At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis ...
Admin
[quote user="Code Dependent"][quote user="snoofle"] P: Noise coming from under instrument panel. Sounds like a midget pounding on something with a hammer. S: Took hammer away from midget [/quote]
This last one made me LOL. I hadn't laughed like that in awhile.
Admin
So out of all that, you choose to question Shade sail? I am more curious about "Dr. diaphragm self-priming pump centrifugal chemical pumps."
Admin
Admin
I see
Admin
I've seen those before but they are always good for a laugh :)
Admin
Admin
Admin
Admin
Admin
OH MY GOD!
Back in my younger programmer days, I wrote exactly this (WTF) type of function, but for golf clubs!
3-9 (a set of 3,4,5,6,7,8,9 Irons) 3-9P (set of 3,4,5,6,7,8,9,Pitching wedge) 3-9PS (set of 3,4,5,6,7,8,9,Pitching wedge, Sand wedge) : etc.
These table entries were like a low-level design for a bill of materials.
Admin
That would be closer to a (potentially) 35+ TRILLION row* table.
*give or take a couple hundred BILLION or so
Admin
Loved how he used the SQL wildcard to get them all too. I use that a lot for websites.