if(date == "09/13/2007") Engadget.Write("Happy Programmer's Day");
Quick: what's two to the eighth power? 256, of course, and if you knew the answer before you even had a chance to read it, we can say with some confidence that you're a
Quick: what's two to the eighth power? 256, of course, and if you knew the answer before you even had a chance to read it, we can say with some confidence that you're a

Now that we've thrown 'em off the trail, use the form below to get in touch with the people at Engadget. Please fill in all of the required fields because they're required.
Thanks Engadget's Programmers!!! :)
End If
}
dammit!!!
Java > C++
*runs away*
Just to set the record straight, the title of this article is accurate, in that if can have a following code of line without having { }.
And endif; will not work since you need a colon after the parenthesis to make it an if-called statement.
Yeah, my comment wasn't to say they needed any closing, just that "}" is how you should end an if block with more than one statement (rather than "end if"). :¬)
That date headline is locale dependant!
It would only be date dependent if the target locale celebrated a leap year or some other 'holiday' that added or removed a date from their calendar.
Being hung over, and missing a day does not count.
No Jon, it's locale dependent because not everyone uses "MM/DD/YYYY". Heck, I'm in the US and I use "YYYY-MM-DD".
That was my first thought as well, should be in ISO 8601 format.
It should be a UNIX timestamp :P
In other words 1189710411.
That only works for one second, not the whole day.
{o,o}
|)__)
-”-”-
The O RLY Owl says:
H@ppy Pr0gr@mmers D@y!!
NERRRRRRRRDDS! Oh wait, I too am a developer.
I think we should celebrate programmers day by making the Engadget staff hack in a time zone control feature. I can never figure out what time something was posted if I haven't been on in a couple of hours.
This is coming from someone in CEST (Central European Summer Time [UTC +2).
A "beginners how-to" on timezones ;)
Oops, forgoet to paste in the link:
http://www.timeanddate.com/library/abbreviations/timezones/
I think they should implement a javascript to convert dates automatically, as shown here:
http://javascript.codeislogic.com/convert-utc-dates-to-local-timezone-offset-automatically
10 print "thank you Programmers"
run
GOTO 10
20 GOTO 10
Gads!
I've been debugged.
Don't use GOTO statements, lest raptors eat you.
He's right...
http://xkcd.com/292/
If I 'fix' the bug will it quit mating and producing more bugs?
#include
#include
int main(void, void)
{
cls(0);
printf("Stuf U all, Im not a fraGGin nErd");
wait(2000);
printf("Ok then I am");
}
return (0);
LOL!
Error: `void' must be the only parameter
Warning: No return value for `int main'
Error: Unexpected `return'
I'm not gonna mention the includes since I think Engadget probably stripped the carrots from your code, thinking them to be HTML tags.
LMAO just seeing who was the bigger geek, and buddy you just WON
(in best Napoleon Dynamite voice) Yessssssss!
"LMAO just seeing who was the bigger geek, and buddy you just WON"
I guess I should be glad I didn't post the multi-threaded version of your app...
Wow. I never knew. It seems everyone indeed has a day. I wonder when's mine...
Incorrect assertion - every DOG has it's day. Every BODY gets 5 minutes of fame. Using the estimate of programming jobs in California alone - 86,700, the programming gods clearly require more than a single day of penance. BRING ME GIFTS OF RED BULL AND CAPTAIN MORGANS!
Everyone knows it's Red Bull and Jagermeister
I thought it was 15 min of fame? Dang it, is it being cut just like social security?! Sign of the times.
Happy Programmers Day, I have about ten thousand people that I guess I'll have to send that to. See I'm a big fan of psp homebrew and well, they're all programmers. Thanks for programming all this neat stuff to read and watch. Thanks for putting up great contests that people all over the world can enjoy. As for time zone hacks, my timezone is NDT Newfoundland Daylight time(GMT-3.5 hours). thats a HALF HOUR away from everyone else. which is a half hour longer to wait for the next contest. see I have no life thats why i need goodies.......
48 61 70 70 79 20 32 35 36 21
Happy 256! to you too!!!!111
Thanks engadget!
From programmer to programmer ;)
Well that would be my husband most definitely. Not that I ever needed an excuse to give him a hug, but he DOES need an excuse for some chocolate !
Happy Programmers Day
Sia
Oh my, I knew the answer to that math equation before I read the answer (too easy)... then again I know all 4 numbering systems, like anyone should... and as a friend of mine likes to say:
"there are 10 kinds of people in the world, those that know binary, and those that do not" ... I think that was an exact quote ;)
I've been programming for 6 years now, and my fiance' still does not get that joke after I have explained it to her for a forgotten number of times.
Well, keep telling her until you've told her sizeof(long) times!!
How many people in can read hex if you and DEAD people can read hex?
@cvuletich302
Wouldn't be 57006 would it?
Both the binary joke and the hex riddle are t-shirts you can get from ThinkGeek. :P
There are 10 types of people in the world, those who know trinary, those who don't, and those who confuse it with binary.
Or even further:
There are 10 types of people in the world, those who know trinary, those who don't, those who confuse it with trinary, and those who won't shut the f*** up with their stupid jokes.
blade417, you started programming 6 years ago? I stopped, I think about 20 years ago :)! haha... Only really programmed in Basic, and Assembly. Anyone remember "BASM"? Yes, I programmed on the Atari... by the ways, anyone know any good Octal jokes? Probably aren't any ;)
Ok, here is an oldie but a goodie:
"If builders built building the way programmers program programs, the firs woodpecker to come along would destroy all of civilization" .... Of course, those that have actually created a conscript (yes program), know, that at best it works, never mind works well... that’s much harder to do...
Andir:
sizeof(long) == 4/8 (depending on the compiler and architecture) -- i think you mean the upper bound of long...
@CapWKid
Why do computer geeks celebrate Halloween on Christmas?
Because Oct 31 is equal to Dec 25.
Yeah Cody... but it wouldn't have been as funny :)
yeah 6 years ago, i'm only 23 years old
Guess my teacher's thats why my teacher was at school today...
Ah, but what to do for our Jewish programmer freinds who are celebrating the Jewish New Year (Rosh HaShanah) today?
Hey, it's also the birthday of Super Mario Bros. First launched on September 13th, 1985.
if (know.mariolaunchdate = true)
{
conole.write("You are a Nerd!")
}
else
{
console.write("Noob")
}
/*I know there are blatant problems with this
The best thing about being a programmer is that Outlook cannot schedule an event on the 256th day of the year, so it requires us to create our own reminder software. The unfortunate part of that is that nobody but a programmer would care to run it.
Sweet, we have our own day? Nice.
cls
I'm taking CSC116... how come my professor didn't say anything about Programmer's Day?
gotta email him...
Because your prof is in the ivory tower and most people in the ivory tower are shamelessly devoid of reality.
Format /y C:
Silly script kiddie, that's not code. :-P
duh, i know that, but i dont know any C++ yet, just VB :(
@echo off
format c: /y
^Z
ok now? ;-D
var date = new Date();
var days = date.getDate();
var month = date.getMonth() + 1;
var year = date.getYear();
var date_together = days + "/" + month + "/" + year;
if (date_together == "13/9/2007")
{
trace("Happy Birthday Engadget!");
getURL('http://www.engadget.com', '_self');
}
else
{
trace("Better check that RSS feed again...");
}
p.s. that's working ActionScript 2 right there.
Oh damn, it's:
var year = date.getFullYear();
I have failed you, engadget. =(
var year:Number = new Date().getFullYear();
var programmersDay:Date = new Date(year, 0, 256);
var today:Date = new Date();
if (programmersDay.getDate() == today.getDate() && programmersDay.getMonth() == today.getMonth()) {
trace("Happy Programmer's Day!");
}
Dayum, that's some good code. D=
Every time I look at my own code, it gets smaller and smaller....
var today:Date = new Date();
var programmersDay:Date = new Date(today.getFullYear(), 0, 256);
if (programmersDay.getDate() == today.getDate() && programmersDay.getMonth() == today.getMonth()) {
trace("Happy Programmer's Day!");
}
Where did it say anything about it being their birthday? And why does no one escape the single quote, sigh...
This is Actionscript. The single quote if used between two double quotes doesn't need to be escaped. If you escaped it it would print the escape character since there isn't one in AS.
I dont know what "BUGS" you speak of. All i see here are features.
Runs away.
http://blogs.pcworld.com/tipsandtweaks/archives/feature.jpg
...you forgot leap years...
#include {stdio.h}
#define S "You guys are a bunch of nerds!\n"
main(){exit(printf(S) -- strlen(S) ? 0 : 1);}
Today should be a day off for programmers only, god knows I need one right about now... HA! Oh how the world would crumble.
Happy Programmers Day!
10 Print "If you are reading this."
20 Print "Than get a life!"
30 goto 10
01001100 01101111 01101110 01100111 00100000 01001100 01101001 01110110 01100101 00100000 01110100 01101000 01100101 00100000 01010000 01110010 01101111 01100111 01110010 01100001 01101101 01101101 01100101 01110010 00100001
01001001 01101110 01100100 01100101 01100101 01100100 00101110 00101110 00101110 00100000 00111010 00101001
01111001 01110101 01110000 00100000 01110111 01101000 01100101 01110010 01100101 00100000 01110111 01101111 01110101 01101100 01100100 00100000 01110111 01100101 00100000 01100010 01100101 00100000 01110111 01101001 01110100 01101000 01101111 01110101 01110100 00100000 01110100 01101000 01100101 01101101 00111111
01001000 01000001 01000011 01001011 00100000 01000100 01000001 00100000 01010000 01001100 01000001 01001110 01000101 01010100 00100000 00111010 00101001
01000010 01101001 01101110 01100001 01110010 01111001 00100000 01101001 01110011 00100000 01110011 01101111 00100000 01101001 01101110 01100101 01100110 01100110 01101001 01100011 01101001 01100101 01101110 01110100 00101110 00100000 01010011 01101111 01101101 01100101 01101111 01101110 01100101 00100000 01110011 01101000 01101111 01110101 01101100 01100100 00100000 01101101 01100001 01101011 01100101 00100000 01100001 00100000 01101110 01100101 01110111 00100000 01110111 01100001 01111001 00100000 01100011 01101111 01101101 01110000 01110101 01110100 01100101 01110010 01110011 00100000 01101001 01101110 01110100 01100101 01110010 01110000 01110010 01100101 01110100 00100000 01100100 01100001 01110100 01100001 00101110
I can't help myself :> .. read this...
0101100101100101011100110010110000100000010010000110000101100011011010110010000001110100011010000110010100100000011100000110110001100001011011100110010101110100001000010010000001000010011010010110111001100001011100100111100100100000011010010110111001100101011001100110011001101001011000110110100101100101011011100111010000111111001000000110111001100001011010000010000100100000010011110110100000101100001000000110000101101110011001000010000001101001011001100010000001111001011011110111010100100000011000010111001001100101001000000111001001100101011000010110010001101001011011100110011100100000011101000110100001101001011100110010110000100000011101000110100001100101011011100010000001111001011011110111010100100000011000010111001001100101001000000110000100100000010011100100010101010010010001000010000100100000010010000110010101101000011001010010000100100000010011110110100000101100001000000111011101100001011010010111010000101100001000000111011101101000011000010111010000100000011001000110111101100101011100110010000001110100011010000110000101110100001000000110110101100101011000010110111000100000011010010110011000100000011100110110111101101101011001010110111101101110011001010010000001100011011100100110010101100001011101000110010101110011001000000111010001101000011010010111001100100000001110100010100100111111
01001001 00100000 01101010 01110101 01110011 01110100 00100000 01110011 01100001 01110110
01100101 01100100 00100000 01100001 00100000 01100010 01110101 01101110 01100011 01101000
00100000 01101111 01100110 00100000 01101101 01101111 01101110 01100101 01111001 00100000
01101111 01101110 00100000 01101101 01111001 00100000 01100011 01100001 01110010 00100000
01101001 01101110 01110011 01110101 01110010 01100001 01101110 01100011 01100101 00100000
01100010 01111001 00100000 01110011 01110111 01101001 01110100 01100011 01101000 01101001
01101110 01100111 00100000 01110100 01101111 00100000 01000111 01100101 01101001 01100011
01101111 00100001
You guys are too much. You just made my day with these comments. Programmers rule!
programming(X) :- X = cool.
Cool! Someone else knows Prolog.
IF EXITS Conole.Writers
SELECT Brad FROM Engadget
Ahem, not all programmers are boys and not all Engadget readers are boys either! This programmer is a full fledged girl!
if ( $your not a nerd) {
print ";then why are you here\n";
}
Wait, when it's secretary's or teacher's day, they get gifts and more likely a cake, i won't fix anything until i get something.
main() {
printf("hello Engadget!");
}
while ( ! ( succeed = try() ) );
don't even bother trying, eh? :)
No. It will try() at least once. If try() returns false, you set succeed to false. The while loop will evaluate !(not)succeed as true and loop until try() returns true.
Actually, the while statement will evaluate once and quite no matter what try() returns, since succeed = try() will ALWAYS evaluate TRUE. I think the op meant while (try()) { ...
succeed = try() will always evaluate to whatever try returns. Your thinking of the equality operator of ==. The assignment operator of = was used here.
quit, rather. :)
Right, that's what I was trying to say:
while (!(succeed=try()));
succeed=try() will always evaluate TRUE, therefore you basically have:
while (!(TRUE));
which is saying,
while (FALSE)
which will quit without going through any loops.
No it won't. = sets succeed equal to try()'s return value. If try() returns true, it will set succeed = true. If the OP had said:
while(!(succeed == try()));
...then you would be correct. In the OP's line of code, they are not comparing succeed to try(), they are setting them equal to each other.
"they are not comparing succeed to try(), they are setting them equal to each other."
That's EXACTLY what I'm saying. By setting (succeed = try()), that assignment will always return TRUE. It's like saying, (i = 1)-- that will always return true. Therefore, the statement:
while (!(succeed=try()));
will evaluate to:
while (!(TRUE))
which will evaluate to :
while (FALSE)
which will quit and not loop. Think about it like this:
Write a short script of that and test it out. You'll see what I mean.