February 26, 2010

Facebook Friends Graph v0.2 — Deb and RPM packages for Ubuntu and Fedora

Filed under: Blog — krkhan @ 2:36 am

Thanks to Christoph Korn, Ubuntu users can now install the package with a single click from the GetDeb repository. The Deb file itself is available on the release page here, along with an RPM for Fedora users.

The looks:

Facebook Friends Graph v0.2 Screenshot

And the hooks:


  • Fixed:
    • Bug #522735: Facebook: Application Request Limit Reached
    • Bug #523378: Connection reset by peer
    • Bug #522487: Facebook Friends Graph fails when friends have a dash in their name [patch by Little Jawa]
Tags: , , , , , , , , , , , , , , ,

February 19, 2010

Facebook Friends Graph on Ubuntu

Filed under: Blog — krkhan @ 12:04 am

I never really thought anyone other than me would be interested in seeing gargantuan graphs of their friends’ connections until I found out through this post on the OMG! Ubuntu! blog that my application was included in the GetDeb repository for Ubuntu users. I have not used Ubuntu myself since about never, but apparently you can now install the application on Karmic Koala with just a few clicks.

Edit: I have now tested the installation on Karmic myself and can guarantee that it indeed works without any fuss. Gotta love Launchpad/Ubuntu.

The application itself was in a pretty much skeletal state of being so I was a little taken aback by the exposure. Nevertheless, I was reminded of the famous aphorism apropos of open source development:

“Release early, release often.” — Linus Torvalds

And indeed, the bug reports that came from users were a valuable byproduct of the Ubuntu push as I had stopped development on the script after it started working fine for me.

Tags: , , , , , , , , , , , , , , ,

November 21, 2009

Facebook Friends Graph v0.1

Filed under: Blog — krkhan @ 12:01 am

The motivation behind obsession with these manically large graphs is explained in this previous post of mine. The current post’s purpose is to instead link to the (finally) working code for generating the graphs. I have created a project page at Launchpad for this little application. The trunk contains the most recent code, which is still in its nascent form but works pretty well given an installation of PyGTK, Python GtkMozembed and pydot. I might port the application to Windoze in future provided I get the time for it.

Starting with the tradition of linking to Inspirated Code subsection, latest updates about the application shall be posted on this page.

And as is the custom, the image itself:

Facebook Friends Graph
(Click on the thumbnail for larger version.)
(Warning: The larger version is a gigantic 32 MB PNG image with a resolution of 16517x13808 (even larger than the last time). If you want to view it, I recommend downloading it to your hard-disk first and then opening it outside your web browser.)

Tags: , , , , , , , , , , , , ,

September 26, 2009

Facebook Friends Graph — Plotting your social network together

Filed under: Blog — krkhan @ 3:58 pm

Update: New version

While visiting profile of a friend, I noticed that he and I had about 70 mutual friends. Immediately it gave me the idea to plot the common friend connections and see what interesting patterns emerge in the larger picture. Something like this:

Facebook Friends' Graph Sample

In the sample above, the names in circles (“nodes”) happen to be in my friend list. The connecting lines represent their own friendship status. For example, Saad Jasra and Hassan Ahmad are friends among themselves apart from being my friends on their own. Similarly, Ali Zeeshan Ijaz is a friend of both Saad Jasra and Abdullah Afaq Ali.

Luckily, Facebook API had Python bindings available which considerably simplified my task. Those, coupled with pydot, resulted in a dot file with all the required connections. Graphviz did the remaining work:

Facebook Friends' Graph
(Click on the thumbnail for larger version.)
(Warning: The larger version is a 7329x5953 PNG image with a humongous file size of 13 MB. If your hardware specs are squeamish, don’t blame me if it brings your machine on its knees — this is not a DoS attack.)

Now came the intriguing part. The resulting graph was visibly split in two large portions. This resulted from the fact that I had spent a major portion of my life (15 years to be exact) in Saudi Arabia before moving to Pakistan. More interestingly, an old friend of mine from Saudi Arabia — Atif Sheikh — was also enrolled at my university in Pakistan. When I zoomed into the graph, I spotted him at the nexus of two networks. Similarly, the names in the middle of a network were the most connected people in that network. That is, the names congested in the middle of Pakistan network were friends from university and the names at the edges of that network were friends outside the university who didn’t share my academic connections.

I haven’t polished the code for a stable release yet as I doubt that other people would be interested in having gigantic plots of their social lives. Nevertheless, I’ll try to package it in form of a proper Facebook application in near future. After all, as I quoted in a previous post of mine:

“Statistics are like a bikini. What they reveal is suggestive, but what they conceal is vital.”

Tags: , , , , , , , , , , , ,

August 29, 2009

TweetMeme and XHTML

Filed under: Blog — krkhan @ 1:47 pm

The last tweet on my Twitter account is dated around 2 years ago. I stopped using the service in late 2007 because I didn’t see a point in “microblogging” anymore. Somehow though, I found myself doing something similar on my Facebook status messages for over an year now. Accordingly, I thought it wouldn’t be a bad idea to go back and take a look at the current state of tweeting affairs. Meanwhile, I searched for a plugin to link Twitter with WordPress and found TweetMeme. The nifty little code places “Tweet” buttons on the blog posts. Unfortunately, after I activated it my site broke down on account of invalid XHTML (since the pages get delivered to FF as application/xhtml+xml, that was expected too). A quick look at the code resulted in the following fix:

diff -Naur tweetmeme/tweetmeme.php tweetmeme.xhtml/tweetmeme.php
--- tweetmeme/tweetmeme.php	2009-07-17 20:52:11.000000000 +0600
+++ tweetmeme.xhtml/tweetmeme.php	2009-08-29 03:03:00.000000000 +0600
@@ -26,21 +26,21 @@
     $button .= '<iframe src="' . urlencode($url);
     if (get_option('tm_source')) {
-        $button .= '&source=' . urlencode(get_option('tm_source'));
+        $button .= '&amp;source=' . urlencode(get_option('tm_source'));
     if (get_option('tm_version') == 'compact') {
-        $button .= '&style=compact';
+        $button .= '&amp;style=compact';
     } else {
-		$button .= '&style=normal';
+		$button .= '&amp;style=normal';
 	if (get_option('tm_url_shortner')) {
-    	$button .= '&service=' . urlencode(get_option('tm_url_shortner')) . '';
+    	$button .= '&amp;service=' . urlencode(get_option('tm_url_shortner')) . '';
 	if (get_option('tm_api_key')) {
-		$button .= '&service_api=' . urlencode(get_option('tm_api_key'));
+		$button .= '&amp;service_api=' . urlencode(get_option('tm_api_key'));
 	$button .= '" ';

At the same time, I also encourage people to take a look at “Wordr” — the nanoblogging startup that’s going to make Twitter totally obsolete within months to come.

Tags: , , , , ,

August 20, 2009

Web 2.5

Filed under: Blog — krkhan @ 11:58 pm

Ladies and gentlemen, let’s bring our hands together for a clamorous round of applause. The greatest browser plugin since the invention of, well… browsers, has been unveiled. Welcome to Quake Live.

An year ago, anyone proposing the idea of running Quake III in a browser would have been sent to the local psych ward. Heck, even a week ago I would’ve been skeptical about practicality of any such development. But sometimes, it just feels wonderful to be proven wrong. This is one of those times and while I shoot railguns aimlessly in the other Firefox tab, I just can’t help staring at the screen in awe. In fact, I can even — for the time being — totally overlook any security concerns related to the plugin. If you own a decent browser, QL’s worth at least a try. I’m not a FPS fan either but this was just too good to be overlooked because of gaming preferences.

Tags: , , , , , , , ,

September 12, 2008

Facebook’s contemporary face

Filed under: Blog — krkhan @ 12:43 am

Facebook Design War

Here are the facts:

  • Facebook introduced a complete makeover of its website design some seven weeks ago. The new design relies heavily on AJAX. Which is the technology that makes webpages “dynamic”, i.e., information on these pages changes without requiring a complete reload, just like in Gmail.
  • Currently, users are being given a choice to choose between the old and the new designs. But this liberty is set to be scrapped soon.
  • Inertia of the masses, desire to preserve status quo, confusion over the new interface; for whatever possible reason, quite a lot of people (close to a million according to BBC — 1% of the entire user base — even though I couldn’t find any such group myself) are really pissed off about the new design.
  • The new design itself can be summed up in two words: buggy & promising.

When Orkut did something similar a few months back, I was visibly annoyed. This time, I actually think the change can be for good as Facebook actually improved their experience with AJAX. Orkut’s redesign was merely the old one loading dynamically. To the end user, the difference was largely unnoticeable (evident from the fact that no one even bothered to complain about it). Facebook’s redesign, on the other hand, is a complete revamp of the end-user experience. Here’s a list of stuff that was refined as I see it:

  • The profiles are less bloated now because of the clutter being divided into separate tabs now. I unreservedly despise profiles which contain 200 applications. Obtuse folks like this … :

    Facebook Apps

    “I have so many applications I can make you feel like you’re living in the 90′s despite being on broadband. If you’re on dialup, go kill yourself. And oh, by the way, I need to get a life.”

    … are properly taken care of in the new interface. On a side note, it is entirely plausible that decent profiles is exactly what makes some people react against the new Facebook.

  • The comments on Wall posts appear instantaneously when you click the Post button. This is in contrast with Orkut’s AJAX-ified interface where you still have to wait for the whole page to reload.
  • And if you are so insistent on checking all the tabs of a profile, again, it won’t require a full reload of the page.

The interface is still buggy, yesterday night I couldn’t navigate as all the links started mysteriously appending to my current address in the address bar. In preliminary days of the new design, even basic stuff like tabs didn’t work properly. Nevertheless, the initial premises are, as I said before, promising. The bugs are getting fixed and at least they got the basic idea of an AJAX-ified interface right.

“Everything is in a state of flux, including the status quo.” — Robert Byrne

Tags: , , , , , , ,