UPDATE:
hey everyone! sorry it has taken me so long to post pics. the cake was a HUGE success and he enjoyed every bite. but most of all, he loved the "actionscript birthday message" that graced the top of it! i wanted to thank you all for your suggestions. i have printed them and will make many more "coded" cakes as the holidays go by. i really want to do the heart "equation" for valentines day! i took peter toroks idea and tailored it for andrew's birthday cake (i asked a programmer to help me make it fit on the cake!). needless to say, andrew and all of his programmer buddies got a kick out of it and gobbled up the dark chocolate, peanut butter cake that was underneath all that nerdy icing-y goodness! here is proof:
the cake!
andrew with his cake
tania (me!) with my creation!
binary birthday candles!
so thank you ALL again! i had a lot of fun making the cake and thanks to all of you, he'll never forget it, or this birthday! -tania
cake
tag. - Paul R
cake
tag ! - Paul R
cake php
meh.. those guys at meta will figure it out.. - Earlz
cake
, how useful a tag can you see that being? It doesn't really bother me that much, but it didn't really seem like the most useful thing to me. - Dominic Rodger
If he is somewhat mathematically inclined, write the following in icing on the cake.
sin(t) √|cos(t)|
r = __________________ - 2 sin(t) + 2
sin(t) + 7/5
If he doesn't get it at first, tease him with saying that it is obvious that he should take the polar plot of it. If he still doesn't get it, tell him to enter it in WolframAlpha [1], that should yield the result:
You can also do the 3D version [2].
[1] http://www.wolframalpha.com/input/?i=polar+r%3D%28sin%28t%29%2asqrt%28abs%28cos%28t%29%29%29%29/%28sin%28t%29+%2B+7/5%29+-2%2asin%28t%29+%2B+2t
be a theta? - rlbond
Try:
I ♡ U
(The code ♡
is ♡ when rendered in HTML.)
U+FDD0
for extra points for a xkcd reference (xkcd.com/380). - Igor Klimer
<div>I ♡ U</div>
- John K
One of my favorites: "Roses are #FF0000 violets are #0000FF all my base are belong to you."
--yearsLeftToLive;
yearsLeftToLive
initialized to? - fastcodejava
++yearsYoung;
would make me feel better - dotjoe
How about writing his age in hexadecimal? E.g. for a 25 year old,
Happy 19th Birthday!
which looks wrong of course at first - it may take him a while to figure out the trick.
Update: A more obvious version:
Happy 0x19th Birthday!
I like it even better (although it is probably too long to fit on a cake... even with shortened getter names):
for (i = 0; i < 4; i++) {
if (i != 2)
penelope.sing("Happy Birthday to You");
else
penelope.sing("Happy Birthday Dear " + penelope.boyfriend().name());
}
penelope.boyfriend()
though. I mean, that makes him pretty replaceable - not very romantic, is it? But if he's a real pro, he will understand that this is the only architecturally correct way to go. - Pekka
setBoyfriend()
method or not (provided her 'boyfriend' is private, that is - but I am fairly sure she wants to control access to him by external parties ;-) - Péter Török
HAI
CAN HAS CAKE?
KTHXBYE
How about making the icing flash on the top of the cake?
<blink>Happy Birthday!</blink>
should do it for an older model cake. Otherwise you'll need to use this
<style type="text/css">
<!--
p#blinking {text-decoration: blink;}
-->
</style>
with
<p id="blinking">Happy Birthday!</p>
In combination with these any of these answers, you could put just five candles on the cake. Light the first two, leave the next two unlit, and then light the last one. This is the binary representation of 25. Besides being geeky, it will leave more space on the cake for your writing/drawing too.
^ ^ ^
| | | | |
| | | | |
| | | | |
Spell out "SGFwcHkgYmlydGhkYXkK" in icing and tell him that he'll have to base64 decode it.
How about a simple
Happy ++age
10 PRINT "HAPPY BIRTHDAY"
20 GOTO 10
Put a bug inside of the cake to make it more realistic. That, or in the writing you can mangle the code of your choice so that it doesn't compile correctly. To be very devious you can make it compile but throw runtime errors or even -- gasp -- no apparent compile or runtime errors at all but flawed logic that will force him wake up in the middle of the night to "debug" the cake.
while (true) {
print "Happy Birthday!";
wait(1yr); // or work/sleep/run
age++;
}
EDIT : All programmers are immortal but eventually somebody will interrupt with Ctrl-C
or throw
some kind of OutofLifeException
.
while (alive)
would make more sense. - Wallacoloo
while (alive) ...
is less depressing. ;-) - Bevan
Give him an un-iced cake and tell him that, due to a last minute critical bug, you had to pull the icing feature to make your deadline.
Just applying the cake metaphor to the programming domain:
candles ! ! ! ! ! IDE? bugs? decorative icing ~~~~~~~~~~~~~~~~~~~~~~~ source code top cake layer ||||||||||||||||||||||| compiled source filler icing ----------------------- runtime bottom cake layer ||||||||||||||||||||||| machine code platter ========================= hardware
May include exterior coating (GUI).
Give him flour, eggs, sugar, etc .. a recipe and tell him its open source, sorry ... he has to configure and build it himself.
Then ask for patches.
--enable-shared --enable-cocoa --enable-peanut-butter.jar
? He'll definitely want --disable-dependency-tracking
which "speeds up one-time build" :) - Daniel Trebbien
Use a QRCode -- then you can encode any message, website, etc. He should already have the application to read it in his smartphone with camera.
if(isBirthday()){
if(age > 16)
{
ALL_NIGHT = true;
}else{
PECK_ON_CHEEK = true;
}
System.out.println("Happy " + age + ", Birthday boy!");
}else{
System.out.println("Nice try!");
}
Awww! That's adorable. There is no code for Happy Birthday, But you could write his age in binary and put a goto before it. It's not real code together, but it gets the message across, e.g.
GOTO
011001
You can use the windows calculator in expert mode for getting the age into binary with a single click. The above is binary for 25 (since you mentioned he'd turn that in a comment).
You should put a Unix timestamp on the cake with seconds passed since he was born. That's all my creative mind has got. :(
The cake was a HUGE success and he enjoyed every bite. But most of all, he loved the "actionscript birthday message" that graced the top of it! I wanted to thank you all for your suggestions. I have printed them and will make many more "coded" cakes as the holidays go by. I really want to do the heart "equation" for valentines day! I took Péter Török's idea and tailored it for Andrew's birthday cake (I asked a programmer to help me make it fit on the cake!). Needless to say, Andrew and all of his programmer buddies got a kick out of it and gobbled up the dark chocolate, peanut butter cake that was underneath all that nerdy icing-y goodness! Here is proof:
The cake!
Andrew with his cake!
Tania (me!) with my creation!
Binary candles!
So thank you ALL again! I had a lot of fun making the cake and thanks to all of you, he'll never forget it, or this birthday! -Tania
Today was my b'day and guess what?
e
and the semicolon became a j
. In a second attempt they put the semicolon at the wrong line (which has been corrected as you can see at the picture). So, be warned whenever you order a cake with "weird" characters! ;) - BalusC
while(DateTime.Today()==You.Birthday){
Cake.Eat(You,"nom nom nom");
}
or...
Person You=World.People["boyfriend's name"];
while(DateTime.Today()==You.Birthday){
You.Eat(Cake); //Nom nom nom
}
Cake
eating You
? :) - Jonathan Sampson
public void Eat(Person consumer,string soundfx)
- Earlz
Since I saw your guy does stuff with Flash, he might appreciate decorations around the side of your "layer cake" with this familiar interface (the layers and timeline panels):
There's a few cheeky things you could do, like name the layers for yourselves or make as many layers as there are in the actual cake, or putting the "keyframe" (the red line and dot) at his age. (instead of frame 1)
This is a variant of the "iconic" hello world program, that is more or less the first program anyone would write when learning a new programming langague. When compiled and the executed, it would print the string "Happy birthday."
Well, far from awesome but I think I would appreciate it. Bonus for texting with a typewriter-like style and the coloring :-)
Old school C (original K&R )
main( )
{
printf("happy birthday!\n");
}
Standard-conforming, maybe not as iconic, and perhaps too long on a cake.
#include <stdio.h>
int main(void)
{
printf("Happy birthday!\n");
return 0;
}
Or in the style of the famous anonymous ioccc entry:
int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"Happ\
y Birthday\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);}
| |_ () \/ [- `/ () |_|
If he's a fan of best practices you could serve up a more modular cake:
The Cake is a lie The Cake is a lie The Cake is a lie
A nice reference to the game "Portal" and the UK-Series "The IT-Crowd" :D
Example: http://u.nu/6m9n7
If he likes lolcats, forget the cake and just give him a note saying “I MADE YOU A CAKE BUT I EATED IT :(”
If he's also a gamer, just have a plate with the note 'There is no cake' - he'll get it.
The problem you'll find is that generally Happy Birthday isn't very exciting. It will generally look like this:
print ("Happy Birthday");
Happy Initialized Day !
Do you know what language he uses at work? If you do, you could adapt any of the fantastic examples on this page [1] to write a little program to print out "Happy Birthday!"
If you don't know what programming language he likes best, the C# example below is a pretty solid fallback choice since it has a lot of good programmer gunk in it but it is still very clear what will happen.
public class HelloWorld
{
static int Main()
{
System.Console.WriteLine("Happy Birthday!");
}
}
[1] http://en.wikibooks.org/wiki/Computer_programming/Hello_worldthis.Cake.Label = "Happy Birthday!";
foreach(var Candle in Cake.GetCandles())
Penelope.Kiss(Mike);
What about <blink>Happy Birthday!</blink>
?
Mmmm ... make cup-cakes with alternate black/white icing such that black represents 1, and white represents 0. Then arrange them to represent the binary equivalent of 'Happy Birthday'
01001000011000010111000001110000011110010010000001000010011010010111001001110100
01101000011001000110000101111001
Would be one bunch of cup-cakes to bake though ... or you might even use empty cups to represent the 0s
For what it's worth, it's thoughtful of you
sudo shout 'Happy Birthday!'
Or do it in Objective-C if he likes Macs and stuff ;p
- (Party)birthday:(Person)person age:(NSInteger *)age {
Party *yours = [Party initWithPerson:person];
[yours celebrate];
return yours;
}
/* call party */
[[self birthday:john age:25] eatCake];
Thanks everyone! There are some great ideas so far. I did google ideas for the cake, but wanted to come straight to the source and see if you guys had anything fresh. Keep them coming! I love the binary ideas - thank you for the link to the text creator.
Oh, and I am not using my real name here, in case he checks this! Shhhhhh!
:)
As to the other Portal references, promise him a cake, send him through many tasks to get this cake, then only show him a picture.
He'll cherish the thought more than the cake that way :D
What about BrainF-ck?
[-]>[-]<>++++++++[<++++++++>-]<++++++++.>+++++[<+++++>-]<.>++++[<++++>-]<-..>+++[<+++>-]<.>+++++++++[<--------->-]<--------.>++++++[<++++++>-]<--.>++++++[<++++++>-]<+++.>+++[<+++>-]<.++.>+++[<--->-]<---.----.---.>+++++[<+++++>-]<-.
Well, programmers are almost always constrained by deadlines. More often than not it is not met ;).
So your cake could say "Congrats - Milestone 25 reached on time"
Model the Tower of Hanoi problem: Have three small cakes of various heights, and stick a gingerbread stick through the center of each cake.
(I knew a computer science grad student named Adam who did something like this at a party for a prospective grad students. He called it "Hanoi Surprise.")
Simply take him to one Good Restaurant for candle light dinner and say "Happy Birthday Sweetheart".
if ( u_has_birthday_and_u_know_it() )
{
while ( !is_full() )
aquire_cake();
}
Or you can write this:
Wising your code always remain bug free
Thanks guys. I'm turning 30 today, and I got THIS cake from my colleagues at work (not my girlfriend though)! It's my best cake ever (huge fan of LOLCODE!) http://www.salomonsson.se/LOLCAKE.jpg
/Tommy
Try
while(happy) { ++kissme; }
Chocolate frosting with green icing. Unix prompt for extra points!
I would suggest:
void Person::birthday()
{
if( ++age == LIFE_EXPECTANCY)
death();
else
party_on();
}
string str = "yadhtribyppah";
char[] charArray = new char[str.Length];
int len = str.Length - 1;
for (int i = 0; i <= len; i++)
charArray[i] = str[len - i];
Console.WriteLine(new string(charArray));
I saw you said he teaches Flash
..
maybe something like this:
gotoAndPlay("bedroom");
in Flash gotoAndPlay() used to be a way to send the play head to a particular frame in the timeline where "bedroom" would be the frame label.
Just type the following on the cake:
010010000110000101110000011100000111100100100000 010000100110100101110010011101000110100001100100 0110000101111001
It means Happy Birthday!
How about you just send him a virtual cake?
How about some scripting language code?
do
me.eatSlice(cakeLib.getBirthdayCake())
while not full and (me.CanSee(codeOnCake))
Animated!
<Marquee>Happy <b/>day
With proper wrong markup to test his standards skills.
Or in Enterprise application Tiers written on the sides!
i i i i i i
[----Presentation----]
[---Infrastructure---]
[----Persistence-----]
[-------Domain-------]
How about writing a blinking ' Happy birth day' like this
class Program
{
static void Main(string[] args)
{
makeTextBlink("************* Happy Birth Day ***************!", 500);
Console.Clear();
Console.WriteLine("Here is you birth day cake.Enjoy");
Thread.Sleep(2000);
}
static void makeTextBlink(string text, int delay)
{
for (int i = 0; i < 10; i++)
{
writeBlinkingText(text, delay, true);
writeBlinkingText(text, 500, false);
}
}
private static void writeBlinkingText(string text, int delay, bool visible)
{
if (visible)
Console.Write(text);
else
for (int i = 0; i < text.Length; i++)
Console.Write(" ");
Console.CursorLeft -= text.Length;
Thread.Sleep(delay);
}
}
Adapted from here [1]:
The following (when executed in a Linux shell)
echo pTaalqbirtARTlqtoqloyhqATaalqbirtARTlqtoqloy\ hqATaalqbirtARTlqRXTrqbolurieVRhqATaalqbir\ tARTlqtoqloy\!|tr fTaplbiqMthRtoyhDAmXsInxzurV RapHybi\ rthdtou,zhDeAmcsnfrn
prints out:
[1] http://hinca.net/2008/12/geeks-birthday.htmlHappy birthday to you, happy birthday to you, happy birthday dear boyfriend, happy birthday to you!
echo
indeed simply prints the string, but note that after the exclamation mark !
this is piped (|
) into tr
which is a tool which takes two strings (like a 'translation table' if you will)... - ChristopheD
Black & white frosting?
You could put his age in binary, or hex. Just a dumb thought.
Or maybe a smiley.
How about spelling "geek" in binary: 01100111 01100101 01100101 01101011
Not sure if you can easily do that with icing, but if you can, I want to see the pic!!!
11001
for "25" is pretty clear. - Chuck
<cake text="Happy Birthday">
<ingredients.../>
</cake>
Every programmer, while he/she is a beginner, almost always write a program that just prints "Hello World".
Just like:
int main()
{
printf("Hello World");
return 0;
}
Why not write Hello World
on the cake?
Here is a table where you can get all the Decimal (or Octal or Hex) values for the letters: link text [1]
[1] http://www.asciitable.com/Doing something in binary might be fun, and more interesting than some programming code which gives the answer outright in a string.
Here's a text (ASCII)-to-binary converter [1] which you can use to get the code for whatever you enter.
Good luck!
[1] http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.aspI'd recommend 'Happy Birthday' in binary, which is;
01001000011000010111000001110000011110010010000001000010011010010111001001110100
01101000011001000110000101111001
You can create more binary text using http://www.theskull.com/javascript/ascii-binary.html
Let us know how it goes.
There you go - 011010000110000101110000011100000111100100100000 011000100110100101110010011101000110100001100100 0110000101111001 (binary)
or a shorter version: 6861707079206400000000000000 (hex)
You're sweet for doing this in my opinion :)
Draw a schematic for a "flip flop" on the cake.
See http://images.google.com/images?source=ig&hl=en&rlz=&=&q=flip%20flop%20schematic [1] or http://en.wikipedia.org/wiki/Flip-flop_%28electronics%29
It's not code, but it is the electronic circuit that stores 1 bit of memory. A programmer might appreciate it, and it would look cool on a cake.
That, and if he doesn't recognize it you can feel smart when you explain it to him >:)
[1] http://images.google.com/images?source=ig&hl=en&rlz=&=&q=flip%20flop%20schematicIs he interested in any video games? Get an image from one of them. You can make a picture cake at most cake shops:
http://www.caketoppers.co.uk/graphics/44056338-item-photo_cake_picture_cake.jpg
Assuming his name is John, and it's his 25th birthday:
john.age++;
assert(john.
age == 25);
Short enough for a cake, and it depicts the event.
static void Main(string[] args)
{
Console.ForegroundColor = ConsoleColor.Yellow;
makeTextBlink("Happy Birth Day !", 500);
}
static void makeTextBlink(string text, int delay)
{
for (int i = 0; i < 10; i++)
{
writeBlinkingText(text, delay, true);
writeBlinkingText(text, 500, false);
}
}
private static void writeBlinkingText(string text, int delay, bool visible)
{
if (visible)
Console.Write(text);
else
for (int i = 0; i < text.Length; i++)
Console.Write(" ");
Console.CursorLeft -= text.Length;
Thread.Sleep(delay);
}
}
Boyfriend.Age++;
You might get a good answer here:
http://www.perlmonks.org/
I see a couple of people have had the lolcat [1] idea. I was thinking of something a little different:
Cat face and paws posessively across the top
I cn haz cake???
If My.Birthday > lastBirthday Then
Response.Write("Happy Birthday")
Else
Response.Write("The cake is a lie")
End if
Simple and probably wrong, but combines Portal and programming.
Why not to write something shorter in Assembly? It is classier to me :)
What about the following?
using System.Love;
using System.Birthday;
namespace YourCake
{
public class HappyBirthday : ILoveable
{
void SayMillionTimes()
{
for (int i=0;i<1000000;i++)
{System.Console.WriteLine("Happy Birthday!");}
}
}
}
'(HAPPY BIRTHDAY!)
(works best if you have a lisp, maybe?)
Try something like this [1]
[1] http://blog.nj.com/digitallife/2008/04/geek_romance_proposing_via_vid.htmlIf he's familiar with JavaScript, maybe packer will be some alternative
eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\b'+e(c)+'\b','g'),k[c]);return p}('4("0 3 1 2!");',5,5,'Happy|to|you|birthday|alert'.split('|'),0,{}))
That's packed JavaScript code that will return:
alert("Happy birthday to you!");
The comments on Flash made me think of this flash drive USB cake [1]
[1] http://cakewrecks.blogspot.com/2009/01/problem-with-phone-orders.htmlwhat about this.
string str = "yadhtribyppah";
char[] charArray = str.ToCharArray();
int len = str.Length - 1;
for (int i = 0; i < len; i++, len--)
{
charArray[i] ^= charArray[len];
charArray[len] ^= charArray[i];
charArray[i] ^= charArray[len];
}
Console.WriteLine(new string(charArray));
my $birthday="04/26/1984";
if(now()==$birthday)
{print "Happy Birthday!";}
else
{print "hello world";}
exit;
now
subroutine always returns the current date in "mm/dd/yyyy" format, wouldn't you need to use the string equality operator eq
instead of the numeric equality operator ==
? - Daniel Trebbien
eq
- CheeseConQueso
Does he still remember his birtday? If I were you I made a cake which like a computer. And I wrote its screen "today is your birtday still remember this?":P But I'm surprising not the only programmer that has a girlfriend but also his girlfriend loves him=) And also his girlfriend is a human being =). You should be sure you love enough to make him happy=)