| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
What in the name of all that is sweet and cuddly is THAT?
|
|
Where the hell is this Hotel..... I wonder how many reservations go to "hell in a hand basket" with this system?
|
That's looking directly into the eye of The Beast, my friend. I like that the worst of the worst are re-run every once in awhile, to treat the new readers who may have missed out on the first fly-by. Then again, there are the archives to search through. |
|
This might be the WTF of the year.
|
|
Oh, and I have seen snippets of this beast before. I think this just takes the cake.
|
|
Is it possible that using this system is more complicated than the code behind it?
|
|
The German adds a nice touch.[H] |
|
This tastes like burning.
|
Maybe the Germans shouldn't be allowed to develope anything computer related. |
|
Imagine it works: Isn't it beautiful?
|
|
My seven year old did that just yesterday using MS Paint! [:|]
|
This is a baby that only a mother could love. .jc |
was das bumsen. (Hint: German) .jc |
|
More correctly:
WAS ZUM FICKEN? |
Google translate is only 'so' good. :) Thanks for your correction. .jc |
http://en.wikipedia.org/wiki/Zuse |
So... where are all those people who were vehemently supporting the ternary operator the other day? Actually, I already know: They're sitting in a dark room right now, all of them curled into the fetal position.
|
Though you wouldn't say that in german. Something more likely to be heard is: "Was zur Hölle?" oder "Was zum Teufel?" (What the hell? / What the devil? (?)) |
|
Today's WZF is brought to you from Deutschland.
I have to maintain an Access form that has two dozen toggle strip buttons on it...and all the tabs have at least three forms with two-level-deep subforms each. The form itself takes almost five minutes to go into design view, and that's on a P4 2.8ghz with 1gb ram. I shudder to think of just how long it takes to design, edit, and save this masterpiece. And trying to track down one bad entry in a query source like that? :shudder: |
|
Ah, german engineering. Strangely enough, no fahrvergnugen.
-D |
IIf != ?: |
|
Zuse would turn in his grave if he saw that. More often than not when I had to deal with German software vendors, their products turned out to be complete crap under the hood. May be coincident, may be not... |
There's a ternary operator in there? |
|
We Germans are good at computing... err... at least sometimes... I think you just should not let any German older than 30 do programming work, they tend to do it the "old school style"
|
|
with hope, no animals died during the testing of this fetid hulk of programatic depravity.
This diabolic incarnation of hatred of mankind is proof that true, distructive and unprovoked evil can exist and live outside the symbios cirkle where an equaly heavy form of 'good' would ease the torment. In other words: this proves that there is no God! |
Yep. Sick, ain't it? IIf is VB's ternary operator. It works like this: IIf(condition, value if true, value if false) The exact ternary operators being nested in that example: IIf([Dauer]=5,"-------------------------",IIf([Dauer]=6,"Summe Kat. " & [MAINKAT],IIf([Dauer]=7,"=========================",""))) Which gives: "-------------------------" when [Dauer] = 5, "Summe Kat: " & [MAINKAT] (string append, basically) when [Dauer]=6, "=========================" when [Dauer]=7, and "" otherwise. and don't forget this one too: IIf([Dauer]=5,"-------------",IIf([Dauer]=6,Format([f z tgab 0101 2 1 4 1].[BR],"Standard"),IIf([Dauer]=7,"=============",""))) Yeesh. |
|
What school is that? Kindergarten? ;-) |
|
What the hell?? I don't recall my message looking like that when I was mashing my feet on the keyboard....
|
|
For even more fun, that ternary function known as IIf in VB doesn't do short circut evaluation. Think about that in terms of speed. [:'(]
|
The speed is a killer, but my favorite part is that if you put functions in the true and false criteria, it will execute both of them before performing the evaluation. a = IIf(0 = 1, RunProcess1, RunProcess2) Since IIf is a function, it will attempt to send the results of the functions to the IIf function as parameters. It's painful to try to explain to other VB folks why IIf is not a good idea. |
I really don't think speed was a consideration while designing this beast. |
|
We should all say "Thank you" to big MS (mess ?) for giving us Access.
It's a nice desktop database but it gave an awful lot of incompetent people (especially suits) the impression that developing with databases is easy and can be handled by hobby programmers. There you have it, a fool with a tool is still a fool. |
If TDWTF has teach of something, is that there is no language, operator or fuction that cannot be use in a WTF. I think only common sense is excluded from the WTFs. |
|
IIF() is a *function*, :? is a *operator*.
There is a difference, you know. LP, Dejan |
he he .. it's funny how many people here are trying to be "clever" and "witty" by making fun of the IIF() "operator" ... It's a function, boys and girls. I know it's fun to bash VB, but let's try something more original. |
Hey Manni, why is IIF() "not a good idea"? Please be patient and explain it to me. When you say "not a good idea" to you mean: * It was not a good idea for the guys who wrote VBA to include an IIF() function ? * It is not a good idea to use this function if you think it's an operator? * It is not a good idea to use *any* functions if you don't understand how arguments must be evaluated before the function can be called? * It is not a good idea to confuse operators and functions? * It is not a good idea to spell something "iif" ? Help clear this up for me. |
Who else would you like to arbitrarily exclude with a crazy rule? Gypsies? Jews? Homosexuals? Did I miss any of your usual targets? Sincerely, Richard Nixon |
|
In my opinion, for all practical purposes, an operator is a function.
When I write an operator overload in C#, it looks like this: public static bool operator ==(ObjectName x,ObjectName y) { // Do whatever to determine equality } Looks like a function to me. |
OK ... boy, do I feel clueless, I am just not getting most of these posts. Is your point A) C# let's you overload operators with functions ! It's a neat language! B) "Using VB is the WTF!" C) Operators and functions are the same thing in all languages ! Can you help me out?
|
Um... Operators are Functions, thats why you can overload them in C. You overload the function that the operator is a weird calling convention for. And like all functions the parameters are generally evaluated before being sent to the function which is why in the 'defense of ternary' thread, even those who support their use made sure to clarify that you should never use parameters that have side effects. If you need a decision tree that has side effects you need to use If structure instead. |
hmmmm ... can you explain to me how short circuiting works? |
C# is a neat language, but that's not my point. I'm just
"Greater than" takes two parameters, evaluates the expression
I'm NOT saying that they are the same thing, just that operators behave similarly to functions. Suppose language X didn't have a built-in ternary operator, but had
|
|
That's how you define the operator, but you invoke it like this: if (x == y){ not if ==(x, y){ [H]
|
|
You can create operator overloads in VB.Net, too. (VS2005, that is) Public Class testPublic Shared Operator =(ByVal ObjectX As test, ByVal ObjextY As test) As Boolean End Operator Public Shared Operator <>(ByVal ObjectX As test, ByVal ObjextY As test) As Boolean End Operator End Class |
I'd say: There is not a ternary operator defined by language x, but somebody wrote a convenient function that resembles the behavior of a ternary operator. .jc |
In C, the following statement will not call function(). bool result = false && function(); Why bother to evaluate the second operator, when the result is already a foregone conclusion? In VB, that function will be called, from what I gather. This is often seen inside an if statement, like so: if (boolean_test && function()) etc... As well, this is sometimes used for pointer checking, like so: if (ptr && ptr->next) ... Without short circuiting, the ptr->next will always be evaluated, even when ptr is NULL. Just as an aside, I am wondering now, if yesterday's WTF, the guy who did not understand boolean logic, was confusing boolean logic and C bitwise operations, such as: if (5) // true if (3 > 4) // true if (5 & (3 > 4)) // not true ... else cout << "I am so confused!"; |
Congratulations, you just chose option 2! You just rephrased it to fit your particular speaking/writing style! |
|
Awww crap, I called a 'function' an 'operator'!
There goes my credibility. |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |