share
Stack OverflowSurprise for a programmer on Birthday
[+379] [88] penelope
[2010-03-10 21:20:37]
[ fun ]
[ http://stackoverflow.com/questions/2420689] [DELETED]

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!

alt text

andrew with his cake

alt text

tania (me!) with my creation!

alt text

binary birthday candles!

alt text

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

(275) A programmer with a girlfriend? - Bob Kaufman
This is obviously the place to get this answer. - Joe Koberg
(103) He doesn't read SO? - rsp
(6) Great question! I suggest you make it community-wiki. - Mike Dunlavey
(6) Google for "programmer birthday cake" you'll get plenty of good ideas. - Bob Kaufman
why would someone vote to close this? it's not programming related, but where else would someone ask this? just re-tag it. Anyway to the poster, do you know what technologies/languages he works with? - Rich
(14) @Rich They don't have girlfriends. - ryeguy
(57) The cake is a lie! en.wikipedia.org/wiki/Portal_%28video_game%29 - OMG Ponies
(1) If he's coding for C#, just put while (age == "Your boyfriend's age") { Console.WriteLine("Happy Birthday!"); } - madatanic
(5) Penelope is Peter during the week - Chris S
(6) People closing this lovely question, you do realize that if you get the required votes, this question will be immediately re-opened by hordes of fans? - JSBangs
(6) Pretty sure this is a real question. Voting to reopen. - Chuck
(4) @JS Bangs: On SO and in code, you do what's right, not what is popular. - Daniel Lew
(5) Voting to reopen just cause this question is awesome. - Earlz
(3) Related question: stackoverflow.com/questions/686216/… - Mehrdad Afshari
(1) @Daniel Lew: And what's right is following the SO guidelines, which state that questions related to programming that are of interest to programmers are welcome here. (Read the FAQ.) This question is about programming (on a very noob level) and is obviously interesting enough to get tons of upvotes and answers. - Chuck
(1) ooh, reopened within 30 seconds or so, must be a record - Cruachan
(1) @Chuck: In my opinion, a question having a programming flavor does not make it necessarily relevant for the site. But I honestly don't care that much; people after me can read the SO FAQ as well as this blog post (blog.stackoverflow.com/2010/01/stack-overflow-where-we-hate-fun) and make up their own minds on whether they want to vote to close. - Daniel Lew
(6) My only gripe for this question is it definitely should've been CW, but thats not enough for it to be closed. Surely we can have some fun on here every once in a while :) - Earlz
@Earlz, sure should have been CW, but who would want to deny Penelope the rep? - Cruachan
(4) @haters - this question stays! - pokstad
(1) @Cruachan. I don't care about Penelope cause it's just a temporary account anyway.. What does concern me are the answers.. - Earlz
@Earlz: individual answerers can change their answer into CW too (I did because of the obscene amounts of upvotes I got for an image turned up on a quick google search). - ChristopheD
(12) i'm really sorry for causing all the trouble. i just wanted to do something nice for his birthday, without going to him to find out the answer. i am, very much a noob, but only needed help with this simple question. thank you to all who have helped and shown me support. to those i offended, i'm truly sorry. - penelope
(2) @Daniel: This is explicitly intended to be a community-run site. This means that, within limits, that which is popular is right. Whether this question should be closed or not depends on one's definition of "programming-related" (it meets my definition of programming-related) or perhaps "subjective and argumentative" (and I'm not seeing any arguing), so I think it's reasonable to vote either way. - David Thornley
(2) I call B.S. on this whole question. This so-called "programmer's girlfriend", leading us on with this "penelope" handle, must know more than she's letting on, if she's posting on StackOverflow. - Jeff Meatball Yang
(10) I can't believe there is no cake tag. - Paul R
(3) @jeff - i was inspired by the "coded wedding cake" which i found on google. i figured if you guys helped him out, you'd show me a little love and help me out. - penelope
(3) @Matt - thank you for adding the critical cake tag ! - Paul R
@Paul You do realize how many things will be mistakenly tagged as cake now right? imagine this tag list cake php meh.. those guys at meta will figure it out.. - Earlz
(3) @penelope: Just kidding - this question is awesome. And you are awesome for asking it. - Jeff Meatball Yang
@jeff - thanks!!! i am surprised by how big of a reaction this has gotten! - penelope
If he is a programmer he should already read this question :) - Andrew Bezzub
@andrew - he is, and he does use this site, so i am using a different name :) - penelope
(4) Clearly "penelope" is a gimmick account created to perpetrate the fiction that there is someone who knows about Stack Overflow and still has a girlfriend - rotard
(238) One-twelth of the programmers on this site (approx 12,000 people) have a birthday next month. Now all of them who have girlfriends are going to expect an awesome cake with code. Two of those three programmers are going to be very disappointed. - Jeffrey L Whitledge
(9) Wow, Jeffrey actually made a "programmers don't have girlfriends" joke that I didn't see coming. - Chuck
(4) Your question has brightened everyone's day! Thank you. - Mike Dunlavey
(104) I think Jeffrey's count is wrong. I remember a programmer I used to work with, and she had a girlfriend. - Windows programmer
(3) just wanted to add that i love the "cake" tag. we should upvote this enough to make penelope a "cake" expert. - Epaga
(7) While this is a humorous thread, if a guy asked the same question this would be closed within 5 minutes and voted down a dozen times. - Greg K
(2) Why are you all assuming that "Penelope" is not a guy? - Vicky
(1) @Greg this question has already been closed thrice. @Penelope let me know if you need a "reopen" vote. - Pekka
(9) hello again! thank you all for reopening this. i completely understand if you need to close it, in order to comply with your standards here. a huge, heartfelt thanks to all who responded with an idea. i have so many to choose from and will probably make many "coded" cakes as the years pass. and to those of you who think i'm a guy, i'm not! my boyfriend discovered this thread and i had to fess up, so i included a picture of myself (as my avatar). my real name is tania. he knows he's getting a coded cake, but has no idea which one it'll be. he loves your ideas and is thrilled that i'm doing this - penelope
(1) You should've took away his internet while you asked this or something.. lol.. - Earlz
(6) @ Earlz - yeah, YOU try taking internet away from a geek! haha! - penelope
(1) Well, some have furthered the stereotype of the nerdy, anti social developer with no sense of the larger world. - ElGringoGrande
(2) "my boyfriend discovered this thread and i had to fess up" Yeah, looks like Jeffrey is right. Your boyfriend could safely assume that it had to be him. - ammoQ
Oh come on, Dominic, what's your issue with the "cake" tag? It's as fitting a tag as any... - Epaga
@Epaga - see meta.stackoverflow.com/questions/41890/tag-removal-request. There are no other questions tagged 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
wow, a meta question on the "cake" tag! Thanks for the link. I get the cake <-> cakephp mixup but would agree with the top voted answer that it's not a major problem. And the cake tag certainly has nothing to do with usefulness. In fact usually funny != useful. :) - Epaga
oh and on a different note: on a post with 200(!) upvotes, the closers amuse me to no end. - Epaga
@penelope I guess adding your pic gave it away... - graham.reeds
(18) @penelope. You MUST update your question to show us the cake you made for him when you complete it :) - Earlz
(3) Seconded. Cake pix when it's done, please. - Hugh Brackett
(3) @Earlz and Hugh - i will. PROMISE! @graham - no, i added the pic after he found out, that way everyone would stop saying i was a boy! - penelope
and again, to everyone who has helped me, you guys are THE BEST! i had no idea my question would get this many responses or this kind of reaction. i really appreciate everything! - penelope
(6) There is statistical and conclusive proof she is NOT a programmer and is NOT a guy - she responded to every post (as far as I could find) - Mark Schultheiss
(1) My god! At this rate, she has a gold medal for this question, and is probably going to have 2 more gold medals within a day or two...for a question that was posted YESTERDAY! Someone could get a PhD writing a paper on the reaction here... - Beska
@mark- LOL! i want to make sure that everyone knows i am reading all the "answers" and comments left. i am very appreciative of all of you and told my boyfriend i wished i could bake you all cakes or cookies (another specialty of mine) to say "thanks!" - penelope
(1) @Beska You raise a good point. The rating system of SO is clearly flawed. I've been an periodic poster here, and have both asked and answered a few genuine technical questions. I have 9 badges. One of them is a yearling badge. Now a non-technical female posts a single off topic question and ends up with almost as much rep and more badges literally overnight. I'm not crying about the size of my e-peen here, but it doesn't seem right that penelope ends up looking more valuable to the SO community than many knowledgeable and helpful developers. Is it SO, or do we just need to get out more? - rotard
hey guys - you can totally take away my badges. i just wanted help with the cake! - penelope
(1) If the only questions you see is how to parse an enum SO would get pretty stale. Besides it would be interesting to see what Eric Lippert or Jon Skeet would like to see on the cake - Anthony
(1) @Penelope: no worries. If the badge system isn't ideal (and it's not, but what is?), that's not your fault...though your boyfriend my get jealous that you're accumulating badges more quickly than he is! Honestly, this was an easy question to favorite. - Beska
(2) LIGHTEN UP PEOPLE! This is starting to tick me off. If it bothers you that much that penelope has a few gold stickers more than you...you have some major issues. - Epaga
@Beska and Epaga - thanks for looking out for me! :) - penelope
Either EPIC TROLL or EPIC GF. Regardless, let us know how this turns out; there are many great ideas. - Beau Martínez
It doesn't bother anyone, I was just agreeing/suggesting that the system is flawed - rotard
(6) Most programmers have a fatal flaw: overthinking things. The number of times this has been closed and reopened only confirms that fact. The next time something like this pisses you off: walk away for an hour, drink a beer and come back and see if you're still annoyed. If so, turn off the computer and go find a hobby other than being pissy on programming websites. - MattC
Penelope ? Are you Simone with the new firmware ? - iDevlop
@patrick - nope, i'm the real deal. no digital tania's were needed for the making of this film...oops! i mean cake! - penelope
(1) it's a month already, and no screen shot? - silent
hey everyone! i posted pictures of the cake in the "answers" section. check 'em out! - penelope
glad you posted it, it was great cake! congratulations! - silent
@silent - thank you!!! - penelope
wow that's really a nice cake! - SpawnCxy
@spawncxy - thanks so much! it was hard to write "code" in icing! - penelope
[+312] [2010-03-10 22:58:42] BioGeek

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:

alt text

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+2
[2] http://mathworld.wolfram.com/HeartSurface.html

(6) he IS and that is so cool! thanks! - penelope
nice idea Jeroen! but I think this would be too much of an icing on the cake? (0: - KMan
(13) Brilliant ! :) ... I don't know about the cake .... but the this function will surely go to my blogspot/twitter ! - Arkapravo
That's cool and an excellent idea :) - Daniil
@Kman, you can get edible ink/paper to put on top of the cake. - Greg
That's just brilliant :-) - Mike Kingscott
very cool advice, appreciate it..... :D - erasmus
Actually, in wolfram alpha, you need to enter this: r =(sin(t) √|cos(t)| ) / ( sin(t) + 7/5) - 2 sin(t) + 2 polar plot Mathematica plaintext: PolarPlot[{2 - 2 Sin[t] + (Sqrt[Abs[Cos[t]]] Sin[t])/(7/5 + Sin[t])}, {t, -Pi, Pi}] - Quandary
(1) Too easy. I gave my non-geek ex-girlfriend the equations of a cardioid for Valentine's and... nevermind :) - ianalis
(14) Best of all, the 3D heart is given by a sextic equation - Dancrumb
(13) I'm definitely using this function as a pick-up line - Martin
(8) Oh, yes, because all programmers can resolve a maths equation like that instantly and plot its graph. - Beau Martínez
Don't render it upside down or it starts to look like anatomy. Or maybe yes depending on the situation. - John K
shouldn't t be a theta? - rlbond
Sweet ! Beautiful - Trefex
Love it. That's gold. - WOPR
1
[+181] [2010-03-10 21:24:47] JSBangs

Try:

 I &#9825; U

(The code &#9825; is ♡ when rendered in HTML.)


(4) This is a nice idea :) - Daniil
(3) i love it! thank you! - penelope
Doing a quick check on unicode.org/charts/PDF/U2600.pdf I see that the heart symbol (from card suits) is at code point 0x2665. - David Thornley
@David, there are a few different heart symbols. The one I used is the "open heart", not the one used for the suit of hearts. - JSBangs
@JS Bangs: Sure, just pointing out the Unicode one I found as an additional option. - David Thornley
You can also add U+FDD0 for extra points for a xkcd reference (xkcd.com/380). - Igor Klimer
ok, but not as creative as some of the others - Paul
@Igor I don't get the xkcd comic. Anyone care to explain? - Pekka
Is he going to "get it," though? Just because he's a programmer doesn't mean he knows HTML ASCII codes... - dclowd9901
@Pekka: from Wikipedia: "Basilisk is a legendary reptile reputed to be king of serpents and said to have the power to cause death with a single glance". Make sure to read the alt-text to fully appreciate the strip (as usualy with xkcd). BTW, I checked and IIRC there's no character by that code ;) - Igor Klimer
@Igor aaaaah, cheers! :) - Pekka
not bad, this is so cool - Nicolas Viennot
I just wanted to point out that this answer got me my first gold badge. sniff Thanks, upvoters! - JSBangs
How can you render on the cake? I'd suggest to put in the middle an iPhone with this page opened, so he can see it... - Nava Carmon
I small square U ? - Bratch
One alternate to ensure it explicitly comes across as html is to wrap it in a tag like <div>I &#9825; U</div> - John K
(2) Alt + 3 on keypad = ♥ (should work in most browsers) - Si
I just got a real one :) stackoverflow.com/questions/2420689/… - BalusC
2
[+174] [2010-03-10 21:28:25] PaulG

One of my favorites: "Roses are #FF0000 violets are #0000FF all my base are belong to you."


(3) i love that! i'll do that one for valentines next year! - penelope
(1) isn't it "all my base" little bit erotic :D:D ?? - erasmus
(8) @erasmus not one bit, but 8 bits erotic! - Kugel
+ 1 this is nice - Jojo Sardez
He probably saw that already if he visits slashdot.org. By the way, I suggest asking your question there too. :) - ianalis
Haha, I'm laughig my head off! Great answer, great thread :D - mnemosyn
3
[+168] [2010-03-11 12:20:10] moogs
--yearsLeftToLive;

(29) Wow, morbid. But as I am evil, +1, it made me laugh. - Smalltown2000
(8) this should really be optimized to --yearsLeftToLive; - BarrettJ
(2) What is the value of yearsLeftToLive initialized to? - fastcodejava
(10) @fastcodejava: You don't know until it hits 0. - Mark
(7) The older you are, the longer you're likely to live, statistically speaking. - user151841
Ya but it could wrap if it hits 0 and it's unsigned. Otherwise you have a negative age. Don't know what that means. - George Edison
(1) maybe i'll make that one for him when he hits the big 3-0! - penelope
That is too sad! - Camilo Martin
++yearsYoung; would make me feel better - dotjoe
4
[+117] [2010-03-10 21:27:05] Péter Török [ACCEPTED]

First idea

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!

Another idea

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());
}

he'll be 25, so that would work. thanks! - penelope
(9) You could also put 0x in front of the number (to make it obvious to most programmers). - Michael Todd
@Michael Todd Yeah, but I think it just adds to the fun if it takes more time to realize the trick :-) - Péter Török
(2) For my wife's birthday, I put number candles showing her age in hex, then in front of each digit four small candles that were red for 1 and white for 0. It did take her a minute or so to get it. - David Thornley
I like the hex idea. It would be especially great for older programmers. This year, I'm going to turn 0x25! Yay! - Jeffrey L Whitledge
@Jeffrey - At the moment, my own vague definition for "older" is "above 0x32"... but it might change in the future ;-) - Péter Török
(29) I'm not sure whether Penelope's boyfriend will be happy about being loaded through 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
(14) @Pekka Depends on whether Penelope has a public 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
you guys crack me up! - penelope
We (advisees) gave something like that to our PhD adviser and she liked it. It was my idea of course. :p - ianalis
Or, hey. "Happy 0o31th birthday!" If you feel like making him feel like an 'old man'. - Marc Bollinger
Always a hit. I do this on co-workers' birthday cards. - Tim Scarborough
@peter torok - thank you SO much for this idea. i tweaked it a little, but you deserve recognition for it! he LOVED it and all his friends got a kick out of the translation. i truly appreciate the suggestion. full of win!!! - penelope
(1) If only you and dead people understand hexadecimal, how many people understand hexadecimal? - tanascius
5
[+98] [2010-03-10 23:15:08] Paul Ruane
HAI
CAN HAS CAKE?
KTHXBYE

(1) cute idea! thanks!! - penelope
Want to up vote this more. MOAR. - Kirschstein
haha, best idea. sorry i can upvote only once - Faisal
(7) @Penelope, in case you didn't know, this is a real programming language called LOLCODE: lolcode.com - Vicky
For his birthday, it surely should be CAN HAS CAKE! - peterchen
(76) IM IN YR ANSWER, CLIKING YR UPVOTES - Christian Hayter
OK, this one is the BEST, by far !! But he has to know lolcats - Matthieu
LOL this one is very creative!! - Camilo Martin
6
[+87] [2010-03-10 21:43:39] Cruachan

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>

(1) that is awesome! is second job is teaching a flash design class, to that would work! thanks!!! - penelope
(71) "older model cake". Brilliant. - fbrereto
(3) @Penelope - oh it's not flash as in Flash, it's a joke because back when the web was young you could make text flash on and off like that, but then because it was widely abused the feature was removed and to make text flash on and off you have to do it the second way now - and it doesn't work in all browsers. - Cruachan
@cruachan - see why i need your help??!! d'oh! - penelope
Ahh, blink tag...so many uses :) - Adam Neal
(8) +1 I think this is the only time I will recommend using the blink tag ever :) - Igor Klimer
Downvote because I just haaaate the blink tag xD - Camilo Martin
@Camilo: you cannot be serious. I'll let you into a little secret: if you use HTML on a cake it doesn't actually work ;-) - Cruachan
I know but if I see the blink tag my brain will start parsing it into blinking text lol - Camilo Martin
@Camilo: Of course we're playing on a long tradtion - myfreewallpapers.net/artistic/wallpapers/magritte-pipe.jpg - Cruachan
@Cruachan: link down? - Camilo Martin
@camilio: hmm, well I was simply linking to Magrite's well know surrealist painting of the pipe with the words 'this is not a pipe' underneath it. - Cruachan
7
[+79] [2010-03-11 15:17:08] Josh

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.

 ^  ^        ^
 |  |  |  |  |
 |  |  |  |  |
 |  |  |  |  |

(5) i absolutely LOVE this idea. he will, too! thanks! - penelope
that, and it will baffle him for quite awhile (why didn't you light the other 2?! why are there only 5 candles?!) 'course..he has to look at it from the right side too... it's 19 the other way around :D (10011) - Mark
(11) From the other side, it would look like 19... yet 0x19 is the hexadecimal of 25. Double win! - Jeff Meatball Yang
(don’t forget to indicate which one is the least significant candle!) - Timwi
8
[+52] [2010-03-10 21:25:05] Seth

Spell out "SGFwcHkgYmlydGhkYXkK" in icing and tell him that he'll have to base64 decode it.


this one is cool, too! thanks! - penelope
(3) Here's a handy Base64 Decoder: opinionatedgeek.com/dotnet/tools/Base64Decode/Default.aspx - GaiusSensei
(20) Can I spoil it and say it says "Happy birthday"? - Steven
Unccl Oveguqnl! - Mark
(3) That's cumbersome... - Camilo Martin
9
[+46] [2010-03-11 08:54:10] ammoQ

How about a simple

Happy ++age


(1) So that would be happy 24th, then he would turn 25? :) - RCIX
(7) You'd do better to say Happy ++age; - Sorpigal
I agree with both of you, and have edited my answer accordingly. - ammoQ
thank you for another cool idea! - penelope
(45) Don't let him read it twice! - Strilanc
10
[+38] [2010-03-10 21:28:07] JSBangs
10 PRINT "HAPPY BIRTHDAY"
20 GOTO 10

(17) BASIC -- how tacky - James Anderson
(7) No. - He won't be able to stop staring at the case, you'll need to add a counter and a max count condition to the GOTO. - Danny Varod
thank you for another idea! - penelope
(1) @James: Ya, it's pretty tacky. But how many beginners accidentally created an infinite loop like this? - George Edison
DO UNTIL HAPPY = TRUE - Camilo Martin
11
[+33] [2010-03-10 22:48:54] RenderIn

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.


hahaha! love it! - penelope
(14) Just to clarify, I'm suggesting you put an actual insect inside of the cake as well as some bugs in the code. - RenderIn
@RI - ew. i was hoping a plastic one would work ;) - penelope
(8) gummy bugs, maybe? - Mark
12
[+31] [2010-03-10 21:30:10] fastcodejava
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.


(30) Shouldn't that be while (!dead) { ;-} - Bevan
(1) thanks so much! - penelope
(6) @Bevan, I think while (alive) would make more sense. - Wallacoloo
(12) Yeah, while (alive) ... is less depressing. ;-) - Bevan
@Bevan - All programmers are immortals, see edit. - fastcodejava
(10) sleep(60 * 60 * 24 * 365); - Arthur Kalliokoski
(10) Arthur Kalliokoski: Careful - you miss one day every 4 years unless the year is divisible by 100 and not 400. - Maciej Piechotka
(1) +1 Maciej; all of us with birthdays on Feb 29 say "Thank you". - Bevan
(1) @Arthur Kalliokoski: leap year fail lol PS: while(alive) or if(dead) break; - Quandary
(1) @Arthur: This assumes the sleep function doesn't accept milliseconds, or you're dead pretty quick! - George Edison
(1) @fastcodejava -- all programmers are immortal; fastcodejava is immortal; therefore, all programmers are fastcodejava. - JXG
Wait, I think I have a bug somewhere. - JXG
13
[+22] [2010-03-11 17:01:01] Greg

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.


LOL! i bet he would get a kick out of that! - penelope
(3) Or you could ice the sides but "miss" the top. In programming missing the end by 1 is called fencepost error. For a better-looking cake you could "miss" the bottom half inch. - Hugh Brackett
(1) what a rad idea! thanks, hugh! - penelope
@Hugh: Or ice the plate as well, #@!#@!# icing overflow! (The fencepost error, on the other side: one too many.) - derobert
lol, I wish my programs threw icing overflows. But then I'd probably end up looking (more) like this guy: fuzzybuzz.wordpress.com/2009/06/25 - Greg
14
[+21] [2010-03-10 22:03:07] harpo

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).


very, very cute idea! thank you! - penelope
(5) whoa! the birthday OS :D - N 1.1
15
[+21] [2010-03-17 08:05:11] Tim Post

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.


(6) as hilarious as that would be, it would make me feel terrible! - penelope
@penelope: Well, you have an entire evening :) Thanks for a chance to express a little humor and have some fun. - Tim Post
(1) @penelope: The ingredients could come before the real cake, too :) - Tim Post
(2) that's true! i could do that and then whip out a fully exeucted cake later on in the night and say that i put in some overtime. and, you're welcome! i'm glad the majority of you guys are having fun with this. but more to the point, thank YOU for your suggestion! - penelope
What would be the best configure options? --enable-shared --enable-cocoa --enable-peanut-butter.jar? He'll definitely want --disable-dependency-tracking which "speeds up one-time build" :) - Daniel Trebbien
16
[+16] [2010-03-11 02:44:55] mobibob

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.


(3) You have seen this, right? flickr.com/photos/janetmck/sets/72157617783414773 Recursive QR Code Cake! - Vicky
that is so cool! thank you! - penelope
Hi Vicky, No, I have not seen that flickr posting for recursive QR code cake -- that is hilarious. I am just interested in the application of QRCodes and my suggestion was completely off the top of my head. - mobibob
17
[+15] [2010-03-10 21:57:11] BlueMalc
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!");
}

(8) i'm assuming this alludes to what the lucky birthday boy may or may not get (from me) on his birthday? cheeky. i love it! - penelope
18
[+14] [2010-03-10 21:26:00] Gordon

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).


awesome! thank you! - penelope
You're welcome :) - Gordon
19
[+11] [2010-03-11 19:52:08] Joe Majewski

You should put a Unix timestamp on the cake with seconds passed since he was born. That's all my creative mind has got. :(


it's definitely something to think about! thanks! - penelope
(3) Something like "Happy time_t = xxxxxx !" - Graphics Noob
20
[+11] [2010-05-11 18:34:37] penelope

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:

alt text
The cake!

alt text
Andrew with his cake!

alt text
Tania (me!) with my creation!

alt text
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


(1) win!! you should update the original question with this, otherwise no one's going to see it - user146147
(1) just did it! thank you for the suggestion! - penelope
nice one an a good idea for me.. - kc rajput
21
[+10] [2010-03-27 03:43:01] BalusC

Today was my b'day and guess what?

alt text


Happy Birthday! mmmm. moist, delicious cake... - Hugh Brackett
happy birthday! awesome surprise! - penelope
(2) Thank you :) My wife saw your topic here, ordered it at Baskin Robbins (cake with Hokey Pokey ice cream). They failed for 2 times though. First they didn't get the characters right, the ampersand became an 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
22
[+9] [2010-03-10 21:45:32] Earlz
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
}

i LOVE It! thank you! - penelope
(24) Wait...so the first example has the Cake eating You? :) - Jonathan Sampson
@Jon Well, it would be defined as public void Eat(Person consumer,string soundfx) - Earlz
Is that not what cakes normally do :S - Thqr
(29) In Soviet Russia, cake eats you! - fudgey
@fudgey: perfect! - Paul
@Jon -- you know programmers eat way too much regular cake to be any good at eating that kind -- computers are easy, but that meal is just too complicated... makes lobster look easy ;) - Hardryv
23
[+8] [2010-03-11 02:59:27] Jeff Meatball Yang

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)

alt text


Lol would be complicated but awesome idea! - (around the base of the cake that is) - Thqr
how neat! i am so glad i came to this site - you guys all rock! thanks! - penelope
This one's definitely a job for that transfer-paper stuff they use to put pictures on cakes. - Hugh Brackett
24
[+8] [2010-03-11 09:53:48] KarlP

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);}

Ah, good ol' K&R where everything is an int unless declared otherwise. - Earlz
(1) thank you for the idea and the explanation! - penelope
25
[+8] [2010-03-11 06:10:39] Anantha Kumaran
|   |_ () \/ [-   `/ () |_|

simple and cool! thanks! - penelope
26
[+8] [2010-03-12 19:10:27] walpolea

If he's a fan of best practices you could serve up a more modular cake:

Cake Best Practices


this is another great idea! thanks! - penelope
just so long as it's not "half-baked" in. - San Jacinto
previousAge, newAge, birthYear, so redundant :P - Wallacoloo
27
[+7] [2010-03-11 12:37:25] gewuerzwiesel

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


ha ha! great show! - penelope
(4) Better yet..... give him a big cupcake or pie and write on it, "The cake was a lie" - Mark
28
[+6] [2010-03-11 14:34:41] Paul D. Waite

If he likes lolcats, forget the cake and just give him a note saying “I MADE YOU A CAKE BUT I EATED IT :(”


ha ha! maybe another year! i can haz cake nows? - penelope
very good jokes - indiana jones
29
[+5] [2010-03-12 08:06:37] YogoZuno

If he's also a gamer, just have a plate with the note 'There is no cake' - he'll get it.


this seems to be a favorite here. thanks! - penelope
30
[+5] [2010-03-10 21:23:46] Rich Bradshaw

The problem you'll find is that generally Happy Birthday isn't very exciting. It will generally look like this:

print ("Happy Birthday");

Many languages will not even need the parentheses or the semicolon, making this code statement even more dull in cake icing context... - Jørn Schou-Rode
i'm open to other suggestions. thanks! - penelope
+1 or print "Hello Birthday!" - kenny
31
[+5] [2010-03-25 01:03:00] Mike Howard

xkcd birthday cake


i saw this one online! cool! - penelope
You...must do this. I force you to do this. - Martín Fixman
32
[+4] [2010-03-17 07:51:17] NAVEED
Happy Initialized Day !

i like it! thanks! - penelope
33
[+4] [2010-03-10 21:32:52] Clueless

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_world

(12) C# boilerplate is not "good programmer gunk" - Joe Koberg
i don't, but i'm sure i could find out. thanks! - penelope
(3) +1 for "good programmer gunk" - mcrumley
Heh! Reminds me of the Boo language manifesto, "The guys who came up with “public static void main” were probably kidding, the problem is that most people didn't get it was a joke. " - kenny
Well. If you mean that to explain meaning of every keyword in the example takes several chapters (Objects, Static methods etc.) in most programming books (at least it did when I learned Java in Junior High School)... - Maciej Piechotka
Heh, by "good programmer gunk" I mean the stuff that no one wants but everyone recognizes and deals with. Lines like "protected override IEnumerable<HappyBirthdayMessage> greetings() { ... };" should make any programmer groan. - Clueless
34
[+4] [2010-03-10 22:22:28] Serdel
this.Cake.Label = "Happy Birthday!";
foreach(var Candle in Cake.GetCandles())
   Penelope.Kiss(Mike);

(2) but wait...who am i kissing? ;) - penelope
35
[+4] [2010-03-12 14:50:28] user292213

What about <blink>Happy Birthday!</blink> ?


thank you for the idea! - penelope
36
[+4] [2010-03-12 15:10:08] Everyone

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


that is a cute idea, too! it would be great for a party. thank you for the idea and the compliment! - penelope
37
[+4] [2010-03-11 11:45:13] ChrisV

The cake is a Pi! :-)

http://www.instructables.com/id/Pi-Cake/


Pi are squared? Pi are not squared, pi are round. Cornbread are squared. - mpez0
HARHARHAR. +1 HAR. - Mark
cute! thanks!!! - penelope
38
[+3] [2010-03-11 16:23:40] n002213f
sudo shout 'Happy Birthday!'

but why do we need sudo? - Mark
you need privileged access to do this, they are an item. - n002213f
If the relationship lasts, there's going to be a lot more sudoing for him.. ;) - Marcus Lindblom
LOL, isn't this the norm rather the exception. - n002213f
oh goodness - now sudo stands for something dirty these days? thanks for another cute idea! - penelope
Is this a reference to xkcd.com/149 ? - Andrew Grimm
39
[+3] [2010-03-11 08:57:49] Luuk van Rens

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 for voting down my first post :< Would you like to share what's wrong with it? - Luuk van Rens
he does like macs. thanks! - penelope
(2) objective-c haters? don't take it personally :p +1 from me, even if that does look like a hideous language :D - Mark
40
[+3] [2010-03-10 21:33:04] penelope

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!

:)


(6) If he comes here I'm curious to know if he finds this question. Tell him to respond so we can hear the reaction =) It'd be hilarious if he got upvoted a lot for his own cake! - The Jug
i'll make sure to do so! - penelope
But you did use your picture... - JustSmith
(3) Of course she did :) I still skeptic it's a she. I think it's a student trying to prove that programmers are lonely geeks that react like horny hounds to the concept of a girl paying them attention :) - Shaihi
(3) Who cares if it is a guy? This is a question plenty of people would probably want to know an answer to. It could easily go the other way of the guy is getting his girlfriend/fiancee/wife a geeky cake. I'd understand the angle if he was faking a girl just to get a bigger reaction. Truth be told, more people are willing to help out women then men, regardless of the social group. I'm sure there's some study out there about that. - The Jug
Could you also mark the suggestion you finally use as the accepted answer (click the tick under the up/down vote counter). Also, a picture of the cake would be brilliant. - Grant Peters
41
[+3] [2010-03-17 08:18:28] James Brooks

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


i don't think he plays portal, but he knows what it is and as funny as that would be, he'd miss out on one of my delicious cakes! - penelope
That is very true! If your cakes are as delicious as you say they are, send me a nom nom please :D? - James Brooks
42
[+3] [2010-03-20 00:39:19] Matt S.

What about BrainF-ck?

[-]>[-]<>++++++++[<++++++++>-]<++++++++.>+++++[<+++++>-]<.>++++[<++++>-]<-..>+++[<+++>-]<.>+++++++++[<--------->-]<--------.>++++++[<++++++>-]<--.>++++++[<++++++>-]<+++.>+++[<+++>-]<.++.>+++[<--->-]<---.----.---.>+++++[<+++++>-]<-.

you can run it in here koti.mbnet.fi/villes/php/bf.php - Moak
well, it's certainly different! - penelope
43
[+3] [2010-03-21 04:26:12] ram

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"


i like it! thanks! - penelope
44
[+2] [2010-03-17 01:16:58] Winston C. Yang

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.")


ingenious! thanks! - penelope
45
[+2] [2010-03-11 06:02:23] raaz

Simply take him to one Good Restaurant for candle light dinner and say "Happy Birthday Sweetheart".


(2) i don't get it... - echo
(1) i want to say human emotion do not need any programing language to express your love.Be simple and be honest to express your emotion and love. - raaz
(1) raaz - it's a great idea! i plan on doing that, too. but wanted to make him an awesome cake as well! - penelope
If money is no problem, and he doesn't mind time travel, you should have your dinner at Milliways. That's guaranteed to impress him! - Jørn Schou-Rode
46
[+2] [2010-03-10 22:49:42] Maister
if ( u_has_birthday_and_u_know_it() )
{
  while ( !is_full() )
    aquire_cake();
}

these keep getting more and more awesome! thank you! - penelope
LOL, this is refering to multithreading, especially mutexes. - the_drow
47
[+2] [2010-03-11 17:07:58] William McVey

Happy Birthday


i'm going to assume that that is something awesome and thank you! - penelope
(3) That is a special type of 2d barcode. It can encode a lot more info than the standard type. I'm sure there are decoders somewhere. William McVey could have included an explanation. - TRiG
QR codes are awesome! - James Brooks
48
[+2] [2010-03-12 19:19:30] Nnp

Or you can write this:

Wising your code always remain bug free


another cute idea. thanks! - penelope
49
[+2] [2010-03-12 11:36:58] user292313

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


happy birthday! - penelope
50
[+2] [2010-03-12 14:18:59] jaderanderson

Try

while(happy) { ++kissme; }


cute stuff! thanks! - penelope
(3) Be careful. Realize that once you enter this loop, there's no escaping, as nothing inside the loop will ever change "happy" to a non-true value. - Wallacoloo
51
[+2] [2010-03-12 03:06:21] markdorison

Chocolate frosting with green icing. Unix prompt for extra points!


i love these added touches you guys keep sending me. thanks! - penelope
52
[+2] [2010-03-12 06:50:22] Quicksilver

I would suggest:

void Person::birthday()
{
    if( ++age == LIFE_EXPECTANCY)
        death();
    else
        party_on();
}

(4) pff... I plan on outliving my expectancy thank you very much. - Mark
"party on" is my favorite part! thanks! - penelope
53
[+2] [2010-03-12 06:52:53] Adeel
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));

and what does it say? - penelope
it reverse the string. For Example if string is 123 initially it convert into 321. so it will reverse the string yadhtribyppah to happybirthday. The same thing is happening in my other answer but with different reverse logic. - Adeel
that is so cool! thanks! - penelope
54
[+1] [2010-03-11 22:03:19] John Isaacks

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.


clever idea! thank you! - penelope
55
[+1] [2010-03-12 02:47:25] azamsharp

Just type the following on the cake:

010010000110000101110000011100000111100100100000 010000100110100101110010011101000110100001100100 0110000101111001

It means Happy Birthday!


binary birthday. love it! thanks! - penelope
How do you type on a cake? - Tim Post
56
[+1] [2010-03-12 13:52:47] Brian Scott

How about you just send him a virtual cake?

code cake


i could, but they don't taste nearly as good as the cakes i bake from scratch! - penelope
Why using an anonymous function? - M28
Because the message generator would only take so many characters :-) - Brian Scott
57
[+1] [2010-03-11 11:06:26] RCIX

How about some scripting language code?

do
    me.eatSlice(cakeLib.getBirthdayCake())
while not full and (me.CanSee(codeOnCake))

thank you for the idea! - penelope
comes with a free 'do me' at the front! - Hardryv
58
[+1] [2010-03-11 14:22:49] F.Aquino

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-------]

ok, now THAT Is really sweet! - penelope
59
[+1] [2010-03-10 22:31:56] Wonde

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);
        }      
  }

another great idea. thank you! - penelope
(1) That wouldn't fix on a cake? - Shervin
(4) @Shervin Just means you need a bigger cake. Everyone wins! - Smalltown2000
@Shervin.How about now. - Wonde
60
[+1] [2010-03-10 22:42:10] ChristopheD

Adapted from here [1]:

The following (when executed in a Linux shell)

echo pTaalqbirtARTlqtoqloyhqATaalqbirtARTlqtoqloy\
hqATaalqbirtARTlqRXTrqbolurieVRhqATaalqbir\
tARTlqtoqloy\!|tr fTaplbiqMthRtoyhDAmXsInxzurV RapHybi\ rthdtou,zhDeAmcsnfrn

prints out:

Happy birthday to you, happy birthday to you, happy birthday dear boyfriend, happy birthday to you!

[1] http://hinca.net/2008/12/geeks-birthday.html

i love it!!!! thank you so much! - penelope
Can i ask how this works? echo simply prints what is fed as an arg right? I'm not too familiar with the Linux shell. - Quicksilver
(2) 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
61
[+1] [2010-03-10 21:24:27] Mike Dunlavey

Black & white frosting?

You could put his age in binary, or hex. Just a dumb thought.

Or maybe a smiley.


cool idea! thanks! - penelope
62
[+1] [2010-03-10 21:23:08] David Makogon

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!!!


(6) Or, make things simpler and put his age in binary, using candles. - David Makogon
(3) I like the age in binary idea. I think most programmers would not be able to read binary-encoded ASCII character codes, but 11001 for "25" is pretty clear. - Chuck
those are all great ones! thank you! - penelope
You could make an 8-bit number out of candles and only light the appropriate candles to signify his age... haha... awesome suggestion, @David. - San Jacinto
63
[+1] [2010-03-17 07:47:44] benPearce
<cake text="Happy Birthday">
    <ingredients.../>
</cake>

awesome idea! thank you! - penelope
64
[0] [2010-03-17 07:11:14] neverend

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?


another great idea! thank you! - penelope
65
[0] [2010-03-20 00:13:46] Helper Method

It's more of a Math thing but I would like it ^^

Baring my Heart [1]

[1] http://xkcd.com/112/

that's hilarious!!! - penelope
66
[0] [2010-03-10 21:25:17] Mark Schultheiss

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/

thank you for the link! - penelope
67
[0] [2010-03-10 21:24:30] Mike Cialowicz

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.asp

thank you for the suggestion! - penelope
68
[0] [2010-03-10 21:24:37] Ryan ONeill

I'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.


very cool. thank you! i'll post pics when i make it and let you know how it went! - penelope
69
[0] [2010-03-10 21:23:59] Daniil

There you go - 011010000110000101110000011100000111100100100000 011000100110100101110010011101000110100001100100 0110000101111001 (binary)

or a shorter version: 6861707079206400000000000000 (hex)

You're sweet for doing this in my opinion :)


rad! and, thank you! - penelope
70
[0] [2010-03-10 21:35:54] scrapdog

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%20schematic

that's rad! thanks! - penelope
71
[0] [2010-03-10 21:28:43] Mike Blandford

Is 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


he is, but i'd really like to "wow" him with a coded cake. thank you! - penelope
72
[0] [2010-03-11 05:28:46] Pavel Shved

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.


another good one. thanks! - penelope
73
[0] [2010-03-11 13:15:17] Varun Kumar
 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);
    }      
}

i am going to need a HUGE cake for this one! - penelope
74
[0] [2010-03-11 19:48:57] Wallbasher

Boyfriend.Age++;


thank you for your suggestion :) - penelope
75
[0] [2010-03-11 20:44:04] Max E.

You might get a good answer here:
http://www.perlmonks.org/


thanks for the suggestion :) - penelope
76
[0] [2010-03-11 16:49:50] Hugh Brackett

I see a couple of people have had the lolcat [1] idea. I was thinking of something a little different:

[1] http://en.wikipedia.org/wiki/Lolcat

very cute idea! thank you! - penelope
77
[0] [2010-03-11 16:57:28] Liam
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.


i love how "the cake is a lie" seems to be a recurring theme! thanks! - penelope
(1) @penelope: “the cake is a lie” is a plot detail from a popular video game called “Portal” (the player character is promised cake if she solves the puzzles in the game). If your boyfriend doesn’t know it then this joke is going to be lost on him. - Konrad Rudolph
78
[0] [2010-03-11 15:27:48] frbry

Why not to write something shorter in Assembly? It is classier to me :)


thank you for the suggestion :) - penelope
(1) methinks that'd be quite a feat for her to learn assembly just to make a cake out of it ;) - Mark
79
[0] [2010-03-12 13:22:58] M.H

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!");}
           }
       }
    }  

awesome idea. thank you! - penelope
80
[0] [2010-03-16 14:39:14] JXG

'(HAPPY BIRTHDAY!)

(works best if you have a lisp, maybe?)


short and sweet! thanks! - penelope
81
[0] [2010-03-12 03:02:39] hallie

Try something like this [1]

[1] http://blog.nj.com/digitallife/2008/04/geek_romance_proposing_via_vid.html

i'm proposing now? oh geez! i thought i was just making a cake! ;) - penelope
82
[0] [2010-03-12 01:26:29] apis17

If 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!");


that is quite a lot to put on a cake, but a great suggestion, nonetheless. thanks! - penelope
:) maybe can base64_encode. - apis17
83
[0] [2010-03-12 03:19:06] Maggie

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.html

i heart cakewrecks! one of my favorite sites! - penelope
84
[0] [2010-03-12 06:43:26] Adeel

what 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));

thank you - would you mind explaining to the noob just what it says? - penelope
what if he hates hungarian naming? - Behrooz
85
[-2] [2010-03-24 06:02:49] CheeseConQueso
my $birthday="04/26/1984";
if(now()==$birthday)
{print "Happy Birthday!";}
else
{print "hello world";}
exit;

very cool! thanks! - penelope
Assuming that the 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
@daniel - if i got really, really, really serious about it, yes i might need eq - CheeseConQueso
86
[-4] [2010-03-17 08:25:35] ibrahimyilmaz

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=)


lol - yeah, he has a gf and i just so happen to be human! - penelope
87
[-4] [2010-03-25 01:12:07] ohho

alt text


he actually doesn't want one - penelope
did he say why? ;-) - ohho
he said it doesn't do all the things he'd like it to - penelope
be warned, he's not ready into marriage ;-) - ohho
It doesn't do a lot of things it should - Jeff Davis
88