Automating Birthday Wishes
Creating an Automatic Happy Birthday wisher was actually not my first or most beloved project. But in most ways it has become my flag endeavor in creating a self contained, small, fun and efficient automatic little program.
Like most of my programs, the code came out of a necessity, and then I made it into a social experiment, and then I got used to it and just wanted to see it alive and growing.
So Here is the thing. On my Facebook account, which I have more then 600 friends in, I noticed that when my birthday date comes, I get less and less birthday wishes posted to it, year after year. Perhaps today I might blame it on some inner Facebook algorithm, but back then I blamed it on my lack of popularity and engagement.
I don’t really stay in touch with all the 600 friends, and come their birthday do I bother to write anything? hardly.
Also, as the years passed by, and each of us got settled with jobs, life mates and perhaps kids, those college or high school friends that you don’t actively check up on – simply drift away. And they don’t bother or remember to write you a happy birthday wish.
So I decided I would start typing a happy birthday wish to my estranged Facebook friends in hopes of turning this around. I do like getting lots of birthday wishes, why don’t I make people happy when it’s my turn?
But… after a while I grew bored and my reservoir of original birthday wishes was depleted. How many times can you write “Happy Birthday” and I thought why don’t I assign this task to well written program, and relieve myself of this hassle.
Fortunate for me, I already had a working program which helps me keeping track of my Facebook friends list, so most of the POC needed for this is already done. I could dive right into the design.
At first I needed to decide, what is it that I want this program to do exactly?
Well, I want it to login to my Facebook account on my behalf, locate the individuals who have a birthday on that day, write some sort of a birthday wish for each of them, and then go to sleep for 24 hours and do it again.
Which translate to a simple pseudo code:
1. Login to Facebook.
2. Locate the celebrators.
3. Wish each of the a birthday wish.
4. Go to sleep for 24 hour.
5. return to 1.
Now I need to choose the the programming language and drill down the design.