r/code • u/bbtta85 • Jul 29 '16
Help Please Please help! Need code to announce our pregnancy to my programmer boyfriend... <3
Hi all, my boyfriend is a Senior Software Engineer... I just found out that we are expecting, and I'd love to break the news to him with a block of code! Trouble is, I don't code... Would you all help me write a small block of code to let him know he's going to be a daddy? TIA!
1.3k
Upvotes
3.3k
u/gonzopancho Jul 30 '16
Interpretation (since you asked /u/super_hewcy)
'fork()' is a system call on linux/unix that spawns a new process. yes, I'm being a wee bit 'dirty' here.
setTImer(9 * 30 * 24 * 60 * 60); <--- basically set a timer for 9 months.
wait4(t); <--- while 'wait4()' is a system call, I'm not using it correctly here, still the implication is "wait for 9 months' (wait for the time to expire)
p.cry("Hello, world\n");
"Hello, world" is the simplest program in many languages. Typically the first program you are shown how to write in a given programming language.
So this is the baby crying (just after birth), "Hello, world"
He'll get it.
(my son is 18 now. enjoy every moment, because one day, you'll realize you have an adult on your hands.)
464
u/[deleted] Jul 29 '16
Congratulations! I made this for you, let me know if you need text or if you want me to change something. http://imgur.com/IoIe1sk
84
u/softwaregav Jul 30 '16
First - Congratulations! I would love to help. What exactly are your expectations? To just show him a block of code? Or have a program run that will tell him?
193
u/Poromenos Sep 04 '16
Write one in Brainfuck, if you're lucky he'll figure it out before the baby arrives.
45
u/wReckLesss_ Sep 04 '16
51
u/_Ned Sep 04 '16
Here is the one my wife did for me.
http://imgur.com/a/dz0u2
50
u/TotesMessenger Sep 04 '16
I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:
If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)
40
u/infeststation Sep 04 '16
// I'm pregnant
19
u/hesapmakinesi Sep 04 '16
Please after the code, deliver him also the baby manual page. The first part of this document: http://www.sjacob.org/home/humour/UNIXbabyCommand.html
30
u/asfhwqiughwkljeghlkw Sep 04 '16
Console.WriteLine("I'm pregnant");
7
u/PBandJames Sep 04 '16
Test coverage of all this code is abysmal.
12
u/[deleted] Sep 04 '16
:(){ :|:& };:
6
u/warpfield Sep 04 '16
Person baby = new Person;
3
u/[deleted] Sep 04 '16
Sooo late to the party, but for the sake of simplicity:
Use this link, and simply run the following snippet:
1
u/warpfield Sep 05 '16
switch(babyType) { case boy: print "I can play sports with him!"; break; case girl: print "awwwwwwwwww so cute awwwww!"; break; }
0
u/bottomofleith Sep 04 '16
10 Let baby = 1
20 Print "We are having ";baby;" baby, honey!"
30 Goto 10 if baby>9 months
(I do not make my living coding, in case you're wondering....)
-97
u/trouvej Sep 04 '16 edited Sep 04 '16
LMAO good luck with your fuck trophy :))))
im just gonna sit here and not waste money on a screaming pile of shit, but use it to enjoy myself and better myself as a person :)
/r/childfree represent!
0
u/[deleted] Sep 04 '16
[deleted] — view deleted comment