Code Minimaraton: Facebook Dislike Button
So here I am, sitting by my computer at 2:30 AM and I’m wondering if I should go to bed, or just keep on working. Of course I’m going to finish the Facebook Dislike Button tonight…
I’ve been thinking of doing a couple Code Marathons before school starts, and that time is quickly approaching, so I figured I’d just ease into it with the Facebook Dislike Button. The idea is simple, just stay up and work on a project until it’s done. Drink lots of coffee and listen to only the most energetic music you can find. Every now and again, stop for a coffee break, and blog about your progress. Here goes nothing.
2:40 am (t+6:40): Listening to The MixTape About Nothing by Wale.
I’ve been working on the Facebook Dislike Button since about 8:00 pm. It’s my first ever Firefox addon, so there was a pretty solid learning curve for that, but I think I’ve got everything down. This whole project is, at this point, evidently doable.
So far, I’ve researched the Facebook DOM enough to know how to play with it and add the dislike buttons/notices. The immediate next step is to learn how to use the Google App Engine and code the backend database.
The soothing sounds of Wale are pushing me slowly through the night as I sip my first cup of coffee. Let’s rock and roll.
4:20 am (t+8:20): Listening to The Black Album by The Dandy Warhols
One of the things I really enjoy about programming is that there are always entirely new technologies to learn. I’ve been wanting to learn a new way to program website backends for a long time now; php just isn’t doing it for me. It’s a messy, disgusting language, and I want out.
I’ve always loved Java, ever since I first learned it. When I recently discovered that there is a serious following for creating web apps in Java, I got excited. I figured, I’d learn some day. Well then just the other day, I learned that the Google App Engine has Java support, I nearly creamed my jeans.
So I created a Google App, which can be found at dislikebutton.appspot.com. There’s nothing there at this point, but I made the account for it. Eventually, this can be linked to a domain name, which I will do when I get $10, but for now, I’m piss-broke and can’t even afford to register it. This will be the temporary home of this application.
Well anyways, over the past almost 2 hours, I’ve been hacking away, trying to figure out all this JSP, Java EE, blah blah blah nonsense, and I think I’ve finally got a grip on it.
I had to install the new version of Eclipse (I was two behind!) and the Google App Engine developer kit. Then I went ahead and got a new JDK. I’m not sure if that was necessary, but it felt right, because I couldn’t run javac.exe for some reason. Even after installing the new JDK, there was no luck. I finally caught a break when I adjusted my environment path variable to reflect the new JDK.
And now I’m in business, making JSP’s and integrating them with a solid Java backend. Now I just have to learn a little more about the Google Datastore, and I can start working on the actual app.
6:00 am (t+10:00): Listening to Vaudeville Villain by Viktor Vaughn
Wow! I love Java, and I love programming web-application backends with Java. I can’t believe I’ve been using PHP and mySQL all this time. Though I suppose a scalable solution like the Google App Engine wasn’t available until just recently…
I haven’t made much progress since last time, in terms of actually coding the application, but I’ve learned how to use the DataStore and I have to say, I’m extremely impressed. This stuff is all so easy. I feel like from this point on in my life, my ability to be a prolific web-app developer has significantly increased.
Combined with the State Model, rapidly producing web apps is becoming more and more possible. This is quite big. I love where the internet and application development, in general, is heading.
Thank you Google for being so awesome!
My big issue up to this point was learning how to persist Java objects in the Google data store. I ran into some errors trying to persist TreeMap’s, but after a lengthy, ugly dive into custom marshalling, I came out alive when I realized you can store any serializable object as a blob!
6:35 am (t+10:35): Listening to Wolfmother by Wolfmother
Man I love wolfmother. Man I love Java. Man I love Google.
Java web development is amazing, because suddenly, the entire internet can be put into Java code. I don’t care what other people say, Java is, by far, the most elegant language I’ve run into. I mean, I don’t have that much wide-ranging experience, but I’ve learned several languages, and quite frankly, nothing compares.
People have been trying to get me to learn Python, but I just don’t want to. It seems like a waste of time, when I have Java. I associate Python with Nisarg Kothari, so I have a prejudice.
What’s all the fuss about Java anyways? Remind me to look that up later.
I’ve now mastered the Google datastore, and have completely implemented all interfacing to the database that I will need for the dislike button. It’s rather simple, but now for the easy part: the communication object. It’s go-time.
8:00 am (t+12:00): Listening to Absolution by Muse
Well it’s officially been half a day since I began this project, and I’m certainly making progress. It was yet another battle, but I was able to get the application uploaded to Google’s server.
Strange thing was, I had to create this weird module thing, which I completely did not understand. My solution was hacky at best, but it seems to be working. Hopefully I will be better able to formalize that aspect of app creation in the future, because right now, it’s just weird!
Also, problems with Eclipse pointing at an older version of Java…
So the app is up online and now it’s just a matter of making it work… Back to it!
11:00 am (t+15:00): Listening to This Is It And I Am It And You Are It by Marnie Stern
I can feel the exhaustion setting it. It is now full-on daytime and I have still not slept. Part of me wants to sleep, but I’m making so much progress.
I’ve overcome some incredible hurdles in the past three hours. The biggest, most annoying issue had to do with getting the user’s facebook id and name. You see, it’s in a variable that’s accessible to the DOM, but for some reason, I couldn’t figure out how to access it after about an hour of trying. My end solution was to get the fbid from the cookie and the name from the link at the top of the page.
I also had some trouble with JSON syntax, and server responses in general, but there is now officially an interface between the server and the toolbar. I have also coded what is necessary to display the dislike buttons and responses and blah blah blah.
2:30 pm (t+18:30): Listening to Censored Colors by Portugal. The Man
It’s 2:30 and I have finally completed coding the addon. Oh what an epic journey it was, and oh how much I learned. A lot of the things I did were rather HACK-ish, so I don’t know how well this extension will stand the test of time, but I will continue to test it over the next couple days before releasing it to the public.
Let me know if you want in on the beta-run.
My end-conclusion: It’s just as awesome, if not more awesome, that I expected it was going to be.




Why Sleep? Eat Sheep!
“baaaaah” .. Approved!
super tits man!
why eat sheep? beep meep!
APPROVE
does it work? i’d like to try it!
i’d love to try the beta version of a facebook dislike button
the dislike button appears on facebook but you cant use it or the like or comment buttons..
help!!
id love to try this out aswell