Navigation

Search

Categories

On this page

If assignment happened, then execute code

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 120
This Year: 1
This Month: 0
This Week: 0
Comments: 40

Sign In
Pick a theme:

# Thursday, September 29, 2005
Thursday, September 29, 2005 7:40:14 PM (Mountain Daylight Time, UTC-06:00) ( )

Um... Yeah. This is somehow extremely funny to me.

Can anyone else tell me what is drastically wrong with this code?

First off, the condition is an assignment statement. If we assign the 'threshold' variable the value of the 'salary_sucks' variable, then execute the code inside the braces. Since assignment is going to happen 99.999% of the time when we're not dealing with pointers or something more complex, this is just silly. Maybe if(foo == bar) or better yet if(foo === bar) [thats, is equal to the value of and is the same type as kids]

Second, now we're assigning the variable 'goto' the return value of the 'com()' function which is the member of the dice object. Then we for no reason at all, make the program retrieve the value of the 'up' property from the 'it' member of the suck object, but do nothing with it.

Then, because we know that all languages with the use of curly brackets and semi-colons also use keywords, we gratuitiously use an 'end' keyword.

Lets invent a new language called Dice++

Call me crazy, but when I reach the ranks of HR or Management, I'm not hiring ANYONE from Dice.com. Odds are, they clicked on this banner ad. Thats just plain scary and demeaning to the rest of us who write code.

Comments [0] | | #