I apologize in advance for any condescending words i may utter.
1) Belief in God is not necessarily a lie or a myth. However, a theory that states "X happens because God made it that way." is of no scientific benefit for at least two reasons: One, it cannot be disproven. Two, such a theory could be used to explain absolutely anything: It has infinite explanatory powers, which means it has no predictive abilities. Such a theory is not a lie, a half-truth, or a myth, it is just scientifically useless.
2) If you google "Superstition in the pigeon" you may find it a fascinating read. In a famous study by B.F. Skinner, hungry pigeons were shown to develop "superstitious" and "ritulistic" behaviors simply by being fed small morsels of food at completely random intervals. In my humble opinion it is an enlightening perspective on human behavior, and although it may be a bit of a stretch, that study tells me that humans are naturally superstituous and ritulistic. I'd be genuinely surprised if we were able to let go of our religious beliefs.
3) To a believing Christian, using the words "magical sky wizards" to refer to God and calling their beliefs lies and myths only advertises deliberate irreverence. Furthermore, calling people that believe in God nut jobs is extremely rude and disrespectful. If you'd like to be thought of as an arrogant, ignorant, militant athiest or you'd like to start a fight, those are great ways to do it.
4) Indoctrinating children with religious beliefs does not necessarily mean that they will believe them. I can only give you my word i'm living proof of that.
If you've ever worked at a music shop, there are some songs that you will not be interested in anymore, like Stairway to Heaven, Nothing Else Matters, (ahem)Smoke On The Water, and Iron Man. It's like anyone who has ever picked up a guitar can play the intro riffs--and only the intro riffs--to these songs, so we've heard them a million times and have no desire to hear them yet again.
Yeah, there's totally a reason why there's a "NO Stairway to Heaven" sign in Wayne's World.
Actually... to me, your fputs() and printf() didn't give it away nearly so much as printf( string_var );. I've taught C and assembly language courses before, and every time there would be one of my students (usually top of the class) who would come up with a clever shortcut of just using "printf( string_var );" instead of "printf( "%s", string_var );". I'd show him/her why it was a bad idea, and at the same time encourage him/her to keep thinking outside the box. =)
You are right, though: The subtlty described on the site is really clever! I don't think i'll be attempting a contest like this, for lack of mental horsepower...
Your code is dangerous, but it has to be exploited by a knowledgable user. I think what they're looking for in the Underhanded C Contest is code that exploits itself. But for the purpose of being pendantic, i'll bite... =)
You're using gets(), which is notorious for buffer overrun problems.
You mix fputs() and printf(), right next to each other. And you use printf() just like fputs(), and that looks suspicious.
printf(stuf); is practically asking for exploitation. If stuf contained the proper combination of "(filler) %junk %junk %n", printf()'s return address would be overwritten.
When i was in high school i did something like that, using sandpaper to excise the markings from all the keys. I was already able to touch-type before, but it still surprised me how much i was looking down at the keyboard for things like function keys and such.
Later i switched to Dvorak. Now all my keys are labeled incorrectly, but it still doesn't keep me from typing 80-100 wpm on a bad day... =)
I apologize in advance for any condescending words i may utter.
1) Belief in God is not necessarily a lie or a myth. However, a theory that states "X happens because God made it that way." is of no scientific benefit for at least two reasons: One, it cannot be disproven. Two, such a theory could be used to explain absolutely anything: It has infinite explanatory powers, which means it has no predictive abilities. Such a theory is not a lie, a half-truth, or a myth, it is just scientifically useless.
2) If you google "Superstition in the pigeon" you may find it a fascinating read. In a famous study by B.F. Skinner, hungry pigeons were shown to develop "superstitious" and "ritulistic" behaviors simply by being fed small morsels of food at completely random intervals. In my humble opinion it is an enlightening perspective on human behavior, and although it may be a bit of a stretch, that study tells me that humans are naturally superstituous and ritulistic. I'd be genuinely surprised if we were able to let go of our religious beliefs.
3) To a believing Christian, using the words "magical sky wizards" to refer to God and calling their beliefs lies and myths only advertises deliberate irreverence. Furthermore, calling people that believe in God nut jobs is extremely rude and disrespectful. If you'd like to be thought of as an arrogant, ignorant, militant athiest or you'd like to start a fight, those are great ways to do it.
4) Indoctrinating children with religious beliefs does not necessarily mean that they will believe them. I can only give you my word i'm living proof of that.
...but how you use it that counts.
If you've ever worked at a music shop, there are some songs that you will not be interested in anymore, like Stairway to Heaven, Nothing Else Matters, (ahem)Smoke On The Water, and Iron Man. It's like anyone who has ever picked up a guitar can play the intro riffs--and only the intro riffs--to these songs, so we've heard them a million times and have no desire to hear them yet again.
Yeah, there's totally a reason why there's a "NO Stairway to Heaven" sign in Wayne's World.
#888888 = rgb( 136, 136, 136 )
#7F7F7F = rgb( 127, 127, 127 )
Actually... to me, your fputs() and printf() didn't give it away nearly so much as printf( string_var );. I've taught C and assembly language courses before, and every time there would be one of my students (usually top of the class) who would come up with a clever shortcut of just using "printf( string_var );" instead of "printf( "%s", string_var );". I'd show him/her why it was a bad idea, and at the same time encourage him/her to keep thinking outside the box. =)
You are right, though: The subtlty described on the site is really clever! I don't think i'll be attempting a contest like this, for lack of mental horsepower...
Your code is dangerous, but it has to be exploited by a knowledgable user. I think what they're looking for in the Underhanded C Contest is code that exploits itself. But for the purpose of being pendantic, i'll bite... =)
When i was in high school i did something like that, using sandpaper to excise the markings from all the keys. I was already able to touch-type before, but it still surprised me how much i was looking down at the keyboard for things like function keys and such.
Later i switched to Dvorak. Now all my keys are labeled incorrectly, but it still doesn't keep me from typing 80-100 wpm on a bad day... =)