- 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
Sure it does... when the preprocessor runs, the first function toggles whether the macro is defined, and then the second function is defined to return whether the macro is defined.
So at runtime, it becomes:
Toggle() {//do nothing//} IsEnabled() {return the opposite of whether the macro was defined at the start of execution}
Admin
IMAX is shot at 24fps....Just saying.
Admin
This is great! I'm going to incorporate it into our recruiting test.
Admin
I'm glad you caugh that, man. We can't let this guy make a brilliant joke at the expense of being partly technically incorrect regarding minor details like that.
Let's not even cut him some slack and say that the toggle at least doesn't do anything when called at runtime, which is what the main article was all about anyways.
No, let's call him on it and ruin the joke for the sake of statistical correctness and punditism.
(BTW, what he said was a pun on "The goggles, they do nothing". I guess I have let you off the hook if you didn't catch that)
Admin
I'm glad you caugh that, man. We can't let this guy make a brilliant joke at the expense of being partly technically incorrect regarding minor details like that.
Let's not even cut him some slack and say that the toggle at least doesn't do anything when called at runtime, which is what the main article was all about anyways.
No, let's call him on it and ruin the joke for the sake of statistical correctness and punditism.
(BTW, what he said was a pun on "The goggles, they do nothing". I guess I have let you off the hook if you didn't catch that)
Admin
pseudocode for MONEY MAKING PROCESS
if STOCKS WENT UP YESTERDAY then TRANSFER MONEY TO STOCKS else SELL STOCKS
Admin
Damn... I don't get this one... It might be because I'm not familiar with the language, but it might also be that I just don't get... Could someone explain it?
Admin
Also, if there's a merciful god then you're about to be banned from the internet for failure to read the three pages of comments, most of which are explaining the problem.
Admin
Ok, ok, sorry. When I finished reading, all I could see below was a ingle comment. I haven't noticed 3 pages of comments existed before I posted.
Admin
That's class!
For those staring at it in wonder who are perhaps not familiar with the joy of C/C++, yes, they are using compiler directives, and yes, the compiler has usually moved on to bigger and better things by the time the user runs an application...
(And no, it never stood in hell of working!)
Admin
change the caption (to toggle, please edit header file and recompile) and she'll be right mate.
Admin
Magic :)
Admin
To abx: Jake understood that it did nothing. In fact, that was the entire point of his story!
Admin
This should be the BEST brainless code I have seen for years. I just couldn't believe my eyes when I read it.
Admin
Admin
Applied steadily and repeatedly to the forehead? Or perhaps vice-versa?
Admin
This is perfectly understandable once you understand that the guy made no difference bw static and dynamic computations: just remove the dashes, and /voila/!
Admin
#if(agree) return AGREE #else return NOT_AGREE