Comment On Back to Hotel Hell

Alex is off vacationing in Detroit today (who goes there on vacation?), so let's take a look back at a WTF classic. I know this one was a favorite around our office, so if you missed out the first time, I'm sure you will enjoy.  On top of that, today you get a two for one, lets take a look at a summary from The Hotel (reservation system) From Hell and the The Hotel (reservation system) From Hell, Continued. [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Back to Hotel Hell

2005-11-08 13:43 • by rogthefrog
What in the name of all that is sweet and cuddly is THAT?

Re: Back to Hotel Hell

2005-11-08 13:44 • by Kodi
Where the hell is this Hotel..... I wonder how many reservations go to "hell in a hand basket" with this system? Angry [:@]

Re: Back to Hotel Hell

2005-11-08 13:44 • by BigFatCoward
W O W

Re: Back to Hotel Hell

2005-11-08 13:46 • by Manni
49956 in reply to 49953

rogthefrog:
What in the name of all that is sweet and cuddly is THAT?


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.

Re: Back to Hotel Hell

2005-11-08 13:46 • by rogthefrog
This might be the WTF of the year.

Re: Back to Hotel Hell

2005-11-08 13:47 • by rogthefrog
49958 in reply to 49957
Oh, and I have seen snippets of this beast before. I think this just takes the cake.

Re: Back to Hotel Hell

2005-11-08 13:47 • by Dave
Is it possible that using this system is more complicated than the code behind it?

Re: Back to Hotel Hell

2005-11-08 13:50 • by Tarq
49960 in reply to 49959

The German adds a nice touch.[H]

Re: Back to Hotel Hell

2005-11-08 13:53 • by Ralph Wiggum
This tastes like burning.

Re: Back to Hotel Hell

2005-11-08 13:54 • by frosty
49962 in reply to 49960
Anonymous:

The German adds a nice touch.[H]





Maybe the Germans shouldn't be allowed to develope anything computer related.

Beautiful

2005-11-08 13:58 • by The system says I have to put my name here.
Imagine it works: Isn't it beautiful?

Re: Back to Hotel Hell

2005-11-08 14:05 • by wtfboy
My seven year old did that just yesterday using MS Paint! [:|]

Re: Beautiful

2005-11-08 14:07 • by dabocla
49965 in reply to 49963
Anonymous:
Imagine it works: Isn't it beautiful?




This is a baby that only a mother could love.

.jc

Re: Back to Hotel Hell

2005-11-08 14:09 • by dabocla
49967 in reply to 49960
Anonymous:

The German adds a nice touch.[H]





was das bumsen.



(Hint:  German)



.jc

Re: Back to Hotel Hell

2005-11-08 14:23 • by German Guy
49968 in reply to 49967
More correctly:

WAS ZUM FICKEN?

Re: Back to Hotel Hell

2005-11-08 14:25 • by dabocla
49969 in reply to 49968
Anonymous:
More correctly:

WAS ZUM FICKEN?




Google translate is only 'so' good.  :)  Thanks for your correction.



.jc

Re: Back to Hotel Hell

2005-11-08 14:27 • by ammoQ
49970 in reply to 49962
frosty:
Anonymous:

The German adds a nice touch.[H]





Maybe the Germans shouldn't be allowed to develope anything computer related.




http://en.wikipedia.org/wiki/Zuse

Re: Back to Hotel Hell

2005-11-08 14:28 • by A Wizard A True Star
mohlsen:

SELECT DISTINCTROW [f z tgab 0101 2 1 4 1].MAINKAT, IIf([Dauer]=5,"-------------------------",IIf([Dauer]=6,"Summe Kat. " & [MAINKAT],IIf([Dauer]=7,"=========================",""))) AS KAT, IIf([Dauer]=5,"-------------",IIf([Dauer]=6,Format([f z tgab 0101 2 1 4 1].[BR],"Standard"),IIf([Dauer]=7,"=============",""))) AS BR, 4 AS SORT, [Z Tage].Dauer AS SORT2, Recipient FROM [Z Tage], [f z tgab 0101 2 1 4 1] WHERE ((([Z Tage].Dauer)=5 Or ([Z Tage].Dauer)=6 Or ([Z Tage].Dauer)=7 Or ([Z Tage].Dauer)=8));



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.


 

Re: Back to Hotel Hell

2005-11-08 14:30 • by German Guy
49972 in reply to 49969
dabocla:
Anonymous:
More correctly:

WAS ZUM FICKEN?




Google translate is only 'so' good.  :)  Thanks for your correction.



.jc


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? (?))

Re: Back to Hotel Hell

2005-11-08 14:31 • by tmountjr
49973 in reply to 49968
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:

Re: Back to Hotel Hell

2005-11-08 14:40 • by Dave Markle
Ah, german engineering.  Strangely enough, no fahrvergnugen.

-D

Re: Back to Hotel Hell

2005-11-08 14:50 • by kipthegreat
49976 in reply to 49971
A Wizard A True Star:
mohlsen:

SELECT DISTINCTROW [f z tgab 0101 2 1 4 1].MAINKAT,
IIf([Dauer]=5,"-------------------------",IIf([Dauer]=6,"Summe Kat. "
& [MAINKAT],IIf([Dauer]=7,"=========================",""))) AS KAT,
IIf([Dauer]=5,"-------------",IIf([Dauer]=6,Format([f z tgab 0101 2 1 4
1].[BR],"Standard"),IIf([Dauer]=7,"=============",""))) AS BR, 4 AS
SORT, [Z Tage].Dauer AS SORT2, Recipient FROM [Z Tage], [f z tgab 0101
2 1 4 1] WHERE ((([Z Tage].Dauer)=5 Or ([Z Tage].Dauer)=6 Or ([Z
Tage].Dauer)=7 Or ([Z Tage].Dauer)=8));



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.


 





IIf  !=   ?:

Re: Back to Hotel Hell

2005-11-08 14:54 • by thedarkknight
49977 in reply to 49970

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...

Re: Back to Hotel Hell

2005-11-08 14:55 • by Pug Majere
49978 in reply to 49971
A Wizard A True Star:
mohlsen:

SELECT DISTINCTROW [f z tgab 0101 2 1 4 1].MAINKAT,
IIf([Dauer]=5,"-------------------------",IIf([Dauer]=6,"Summe Kat. "
& [MAINKAT],IIf([Dauer]=7,"=========================",""))) AS KAT,
IIf([Dauer]=5,"-------------",IIf([Dauer]=6,Format([f z tgab 0101 2 1 4
1].[BR],"Standard"),IIf([Dauer]=7,"=============",""))) AS BR, 4 AS
SORT, [Z Tage].Dauer AS SORT2, Recipient FROM [Z Tage], [f z tgab 0101
2 1 4 1] WHERE ((([Z Tage].Dauer)=5 Or ([Z Tage].Dauer)=6 Or ([Z
Tage].Dauer)=7 Or ([Z Tage].Dauer)=8));



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.





There's a ternary operator in there?


Re: Back to Hotel Hell

2005-11-08 14:57 • by boy from germany (no, really!)
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"

Re: Back to Hotel Hell

2005-11-08 15:04 • by nobody
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!

Re: Back to Hotel Hell

2005-11-08 15:04 • by Otto
49981 in reply to 49978

Anonymous:
There's a ternary operator in there?


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.

Re: Back to Hotel Hell

2005-11-08 15:04 • by Manni
49982 in reply to 49976
kipthegreat:
A Wizard A True Star:
mohlsen:

SELECT DISTINCTROW [f z tgab 0101 2 1 4 1].MAINKAT, IIf([Dauer]=5,"-------------------------",IIf([Dauer]=6,"Summe Kat. " & [MAINKAT],IIf([Dauer]=7,"=========================",""))) AS KAT, IIf([Dauer]=5,"-------------",IIf([Dauer]=6,Format([f z tgab 0101 2 1 4 1].[BR],"Standard"),IIf([Dauer]=7,"=============",""))) AS BR, 4 AS SORT, [Z Tage].Dauer AS SORT2, Recipient FROM [Z Tage], [f z tgab 0101 2 1 4 1] WHERE ((([Z Tage].Dauer)=5 Or ([Z Tage].Dauer)=6 Or ([Z Tage].Dauer)=7 Or ([Z Tage].Dauer)=8));



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.


 



Exactly, the IIf function is VB's attempt at a ternary operator. Poorly implemented, as well. To anyone who wishes to argue, think about the terminology: ternary operator, IIf function. Apples and oranges.




IIf  !=   ?:

Re: Back to Hotel Hell

2005-11-08 15:05 • by Disgruntled DBA
49983 in reply to 49979
Anonymous:
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"




What school is that?  Kindergarten? ;-)

Re: Back to Hotel Hell

2005-11-08 15:06 • by Manni
49984 in reply to 49982
What the hell?? I don't recall my message looking like that when I was mashing my feet on the keyboard....

Re: Back to Hotel Hell

2005-11-08 15:09 • by Otto
49985 in reply to 49984
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. [:'(]

Re: Back to Hotel Hell

2005-11-08 15:15 • by Manni
49986 in reply to 49985

Otto:
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.

Re: Back to Hotel Hell

2005-11-08 15:17 • by WTFer
49987 in reply to 49985
Otto:
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. [:'(]


I really don't think speed was a consideration while designing this beast.

Re: Back to Hotel Hell

2005-11-08 15:19 • by Mike (German)
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.

Re: Back to Hotel Hell

2005-11-08 15:20 • by WTFer
49989 in reply to 49971
A Wizard A True Star:

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.




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.

Re: Back to Hotel Hell

2005-11-08 15:43 • by Dejan
49991 in reply to 49989
IIF() is a *function*, :? is a *operator*.

There is a difference, you know.



LP,

Dejan



Re: Back to Hotel Hell

2005-11-08 15:48 • by Jeff S
49993 in reply to 49991

Anonymous:
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.  

Re: Back to Hotel Hell

2005-11-08 15:54 • by Jeff S
49994 in reply to 49986
Manni:

Otto:
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.



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. 

Re: Back to Hotel Hell

2005-11-08 16:03 • by Richard Nixon
49997 in reply to 49979
Anonymous:
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"




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

Re: Back to Hotel Hell

2005-11-08 16:05 • by Ytram
49999 in reply to 49994
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.

Re: Back to Hotel Hell

2005-11-08 16:09 • by Jeff S
50000 in reply to 49999

Ytram:
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?


 

Re: Back to Hotel Hell

2005-11-08 16:10 • by Just Another WTF
50001 in reply to 49991

Anonymous:
IIF() is a *function*, :? is a *operator*.
There is a difference, you know.

LP,
Dejan


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. 

Re: Back to Hotel Hell

2005-11-08 16:14 • by Jeff S
50003 in reply to 50001
Anonymous:

Anonymous:
IIF() is a *function*, :? is a *operator*.
There is a difference, you know.

LP,
Dejan


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? 

Re: Back to Hotel Hell

2005-11-08 16:25 • by Ytram
50010 in reply to 50000
Jeff S:

Ytram:
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?


 




C# is a neat language, but that's not my point.  I'm just
saying that for all practical purposes, an operator is not so different
than a function.


"Greater than" takes two parameters, evaluates the expression
according to the rules in comparison for the two parameters, and
returns a boolean value indicating the truth value of  x > y.


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
a function called JeffS(expression, value1, value2) that returned
value1 if expression is true, value2 otherwise.  Now suppose a
programmer new to language X asked if it had a ternary operator, would
you say:

1) "LOL OMFG NO!!!"

2) "Kinda, it has this function called JeffS, and it works essentially the same way."


Re: Back to Hotel Hell

2005-11-08 16:29 • by Dark Trooper
50013 in reply to 49999

That's how you define the operator, but you invoke it like this:


if (x == y){
   // yada, yada
};


not


if ==(x, y){
   // yada, yada
};


[H]


 

Re: Back to Hotel Hell

2005-11-08 16:33 • by Dark Trooper
50014 in reply to 50000

You can create operator overloads in VB.Net, too. (VS2005, that is)


Public Class test


Public 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

Re: Back to Hotel Hell

2005-11-08 16:38 • by dabocla
50015 in reply to 50010
Ytram:
Jeff S:

Ytram:
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?


 




C# is a neat language, but that's not my point.  I'm just
saying that for all practical purposes, an operator is not so different
than a function.


"Greater than" takes two parameters, evaluates the expression
according to the rules in comparison for the two parameters, and
returns a boolean value indicating the truth value of  x > y.


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
a function called JeffS(expression, value1, value2) that returned
value1 if expression is true, value2 otherwise.  Now suppose a
programmer new to language X asked if it had a ternary operator, would
you say:

1) "LOL OMFG NO!!!"

2) "Kinda, it has this function called JeffS, and it works essentially the same way."





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

Re: Back to Hotel Hell

2005-11-08 16:57 • by Anonymoose
50018 in reply to 50003
Jeff S:
Anonymous:

Anonymous:
IIF() is a *function*, :? is a *operator*.
There is a difference, you know.

LP,
Dejan


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? 





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!";





  

Re: Back to Hotel Hell

2005-11-08 16:59 • by Ytram
50020 in reply to 50015
diablo:

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.




Congratulations, you just chose option 2!  You just rephrased it to fit your particular speaking/writing style!

Re: Back to Hotel Hell

2005-11-08 17:00 • by Anonymoose
50021 in reply to 50018
Awww crap, I called a 'function' an 'operator'!



There goes my credibility.

« PrevPage 1 | Page 2 | Page 3Next »

Add Comment