Code Birthday Cake [pic]

Just when I think I couldn’t possibly find any geekier cakes than what I normally post, I came across this awesome code cake.  Any programmer is likely to love this cake, especially if they like to write code in C/C++.  While I may not be fluent in C/C++, I have enough programming experience to know exactly what is happening here.  For those who aren’t fluent in code, this code is basically taking the birthdate of somebody named Tim and figuring out how old he has turned and it prints out a Happy Birthday message for him.  If it isn’t his birthday, it prints out a message saying it isn’t his birthday.

Pass this along to all of your programmer friends!  Better yet, if you have any programmer friends, make an awesome code cake like this for them!


Code Birthday Cake
Code Birthday Cake

[via ForeverGeek]



, ,



3 responses to “Code Birthday Cake [pic]”

  1. Stephen Avatar

    Obviously the programmer failed to consider edge cases. It’ll be hilarious when this code gets used on the kid’s “111st, 112nd, and 113rd” birthday.

  2. pcnerd37 Avatar

    This is why you should always test your code for bugs before putting it on a birthday cake.

  3. varmfskii Avatar

    Wouldn’t it be far more serious that he never allocates the space that *timeinfo points at.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.