30 June 2007

Facebook downtime, iPhone and my stinkin' exams

Facebook went down today for a couple of hours, citing ‘maintainence’ as the reason. They were down for a couple of ours for ‘me’. I don’t know about the others, since it said ‘your account is not available’.

This is the first time Facebook has gone down since it released the Platform, and I think we can put some blame onto that. Having to roll out fix builds almost everyday while keeping the site up and running like a jet engine. There are tons of new applications already (I have four), and they’re being approved by hundreds in a day. Every application added gets exposure in the directory, and starts getting more users. This adds to Facebook’s server load.

Platform has been hugely successful, and you can begin to see a visionary in Zuckerberg. Even though any data regarding the application itself (users, referrals, how many adds per hour etc.) aren’t availableThere are some applications which scrape this data out of Facebook, but that’s against Facebook TOS (scraping), so I don’t think they’ll be around for too long., the data and integration options make up for it pretty well :)

iPhone!!

We’ve all heard about it, read about it, and know as much about it without having it as the person who does. The iPhone has been the most hyped gizmo in a ‘very’ long time, and little surprise it comes from Apple. People have been flocking to get their hands on one. Twitter saw increased activity thanks to the people waiting in line busy micro–blogging to get their experience out. The iLoser reached celebrity stardom for all the wrong reasons … with people howling for him to thrown out. But he maintained his place.

Now that the iPhone is out, it’s managed to live upto its hype, and Apple has lived upto it’s reputation. I’m sure Nokia and Blackberrys all across the world are feeling a little lonely right about now (when was the last time they were excited about ‘their’ phone?), although it’s a sad time for anyone ‘not’ in the U.S., since the iPhone launch was U.S. only. They will be announcing a model for the European market on Monday (as per reports), and Vodafone is being touted as the carrier. India, Australia, and all the countries this side will only be graced next year, same time.

I for one am actually glad that Apple’s taking it’s time to bring the iPhone here. It will give them time to iron out the bugs, hardware issues, compatibilities and problems, and give us a more polished and finished product. But the people who ‘have’ got their hands on with it, are surely not complaining! :)

Exams, exams! :(

Yes, the rants of a college going kid continue. I’ve been riddled with exams yet again, which is why my beloved little blog has been ignored so much the past days. All is not lost though. I’ve been keeping busy with a few projects, ideas and Facebook ofcourse. My end term holidays start in just over a week, and I’m planning big things for that this time around.

So! Here’s to a great iPhone for all those who have it, and who’re going to buy it! And I shall be back to blogging full time very, ‘very’ soon! :D


20 June 2007

A shout out to Search Suggest users

It’s been quite a while since I released my Search Suggestions hack. Since then, I’ve seen the number of hashes being created for authorization increase steadily, which means people “are” using it. What I haven’t seen increase, is the number of search “terms” being added to my database.

This can mean one of two things:

  1. You have implemented the hack, but have botched up something in the implementation which is preventing search terms from being added to your account.

  2. You have “not” implemented my hack, and are just sitting pretty with a hash code in my database.

For the first case, if you need help implementing the hack properly, please let me know. I’ll be more than willing to have a look at your code and see where things are being messed up. We all want the suggestions to come up nice and pretty now, don’t we? :)

For the second case, well … if you don’t want to use it, fair enough. Just let me know your passcodes (which you used to get your hashes) so that I can remove them from the database, to prevent them from eating up space :)

Chow!


14 June 2007

A small success!

Checking today (‘today’ being the second day of this application being included in the application repository), I see 400+ users, out of which 4 are friends. These past two days have shown exactly what people meant by the Facebook ‘social graph’ and ‘viral distribution’ of applications. I noticed some applications become big time earners overnight, but a small application like my to–do list getting these many users in 2 days is very, very heartening :)

So, now I’m going to have a look at the whole Facebook development scenario:

F8 Platform

The platform, at its heart is a REST based API. You make simple calls to one URL, with the required details, and the server sends back whatever you asked for after running a few checks to see if you “can” get the data you asked for. It’s quite simple that way. There are tokens, session keys (there are two types, more later), API keys and all the regular boobah that you’re used to seeing. However, it gets interesting when you begin to move away from this REST API.

Facebook is one of the first APIs (that I’ve seen in my short stint with webdev) that offers direct access to their SQL tables. Ofcourse, they call it FQL, but the outcome is the same. You select columns, where certain conditions are matched and validated, from some tables. This not only saves time, but reduces server load, since you’re going to the heart of the data instead of being proxy–ed around.

Finally, there’s FBML, which is Facebook’s version of (X)HTML. It offers RDF–type tags which get parsed by Facebook into proper data wrapped in relevant tags. This is used when your application has a profile presence box, and you need to show stuff in it. You update it with FBML using a given function. Or if you want to show editing options for features for your app. It’s quite cool! :)

Static content is cached by Facebook for faster serving (like images, videos etc.), but most of the load is on the developers servers. All processes happen on your servers, and Facebook only acts as a mediator between your server and the user, so that they can control what comes and goes through.

The development

If you know how frameworks and APIs work, this will be familiar grounds. Even if you don’t, you can figure your way out by getting yourself the REST Clients from Facebook. It’s got functions to do everything, and all you need to do is call them. I use the PHP5 Client, but there are clients available for pretty much every major language used for Webdev today.

It’s been a breeze getting the hang of it (thanks to a lot of help from Stephen, as usual), and just having access to such huge amounts of data is amazing. With all coding projects, you have to figure out how to get around some hurdles. For example, the current system allows the authorization token to be passed to only “one” page per app. That means, you can’t call Facebook from any other page, unless you have an infinite session key to pass around. It takes some figuring out, but once you get the hang of it, you can see a pattern emerging. I personally think Facebook should allow choosing custom pages (via. a “next” query string which they use, but don’t allow access to) to which you’d like to redirect to from Facebook. But oh well …

Pretty much all workings with applications will require you to store data of some sort (if it’s a decent to good app). For that, you’ll need to know SQL if you want to work with relational tables. I use Ning at the moment, which offers a different way of storing huge amounts of data. I am adequately adept at SQL though, and plan to brush up on it since I want to move to my own hosting soon enough, and host my apps from there. You will need to know all this to make an effective application. There are workarounds, sureLike the “X Me” application, which didn’t deal with tables in the beginning, but used to constantly read the current markup in the profile box, alter it using regular expressions, and then put it back. For example, if someone would hide an action, it would set it to display:none instead of actually removing it. I got my info from the maker himself :), but I’d suggest you do it the right way.

The documentation is grossly incomplete, but then which documentation isn’t. If you want help, the Developer’s Discussion Group is always there, and people like me who can help you out. There’s also an unofficial IRC room at #facebook on irc.freenode.org. That’s a fabulous place to get info, “if” the people are in a good mood :P

Final thoughts

All in all, it’s not hard making an application for Facebook, and for people who want to start getting their hands dirty with webdev, this is probably the safest and best way to start. You don’t have to looking for data. It’s all there. All you have to do is call for it :) Also, you should be creative. Don’t try to re–invent the wheel and make something that already exists. Your app will get stifled because the other app will already have an established base. There are so many things you can make, it’s not even funny! Just rack your brains a little … ;)

So, I hope I’ve cleared things out, and hope to see someone from my readers come up with a great application for Facebook :) Let me know if you do!

(P.S. — My app users count went up to 403 while writing this article! :P That’s how quickly apps can catch on :) )


12 June 2007

Facebook photos! Who needs Flickr? #

People not on Facebook probably use Flickr as their main image host, because it’s easier to share it with people, tag them, and store them safely knowing you won’t lose them. Flickr, backed by Yahoo!, has surely become an essential part of the netizen’s arsenal of web–services, no doubt that. But, as with everything, there are alternatives which though not as good, are good enough substitutes.

Facebook Photos

Facebook Photos is one of the best “organised” photo collection tool available on the Internet today in my opinion. Sure, it lacks features which people have gotten used to because of Picasa Web Albums and Flickr, but if you’re looking for a simple photo storage service, with decent sharing and commenting features, this one is for you.

The best part is, you’re not bound by features being rolled out by the provider. Applications can enhance your experience, and act as plug–ins, which brings me to the main point of this post. Let me present to you, Photos2Rss!

Photos2RSS

This was an application I wrote initially to take away my dependence on Flickr, especially since I found out the 200 image limit on the free account. The one feature which doesn’t come natively with the Photos application of Facebook is a way to get them out of Facebook. Your photos are sitting nicely in your album, but that way they’re only for your friends to see and enjoy. What if you want to share them on your blog, or some other place? Well, now there is a way …

If you’re on Facebook, add the application to your profile. The application doesn’t add a profile box or anything. It just sits pretty in your list of applications in the sidebar, and you can push it down in the ‘hide’ zone if you don’t want to see the link all the time.

Once you have it installed, it’ll take you to the album selection page. There you can select who’s albums you want to pull out as a feed. If you want a friend’s, you’ll need their UIDThat's the 9 digit number at the end of the URL on the profile page of your friend.. Fill that in, and you’ll be presented with a list of their albums. Along with that, there are options for randomising the pictures, and a total count. You can specify these for further control on how your photos are pulled. After filling in the details, you’ll have to submit once, before choosing the feed format.

There are two feed formats available currently—RSS and JSON(P). RSS is for subscribing to someone’s albums to track it for changes. Say, your friend’s birthday pictures. Whereas JSON(P) is more for use with codes and hacks on blogs and pages. Add in the callback function name at the end and the data will be enclosed nicely in your function :)

Drawbacks and limitations

As I said, this is a little hacky, hence there are some pre–requirements, assumptions and limitations in place for this to work like it’s supposed to. To start with, the photos you want to pull out have to be part of one album, and one album alone. You can pull in photos from different albums, but not using the same feed. Well, not yet atleast. If there are enough adopters of this, I’ll add it inI’ll add it in anyways sometime in the future to find the easiest way to do it, but more users will speed up the process :P.

The second thing is, the application needs to be a part of your list, because that’s the way I’ll get an infinite session key from Facebook for the feed. If you don’t add it, the feed will fail because it’ll need to log in to get your photos out. Like I said, it doesn’t ‘add’ anything to your profile like most of the applications, so there is no clutter :) I don’t like clutter myself :P Once you add it, you can get as many feeds as you want, for as many albums as you want.

These are the only ones for now :) With more complexities, some more might creep in, but I'll try and keep them at a minimum :)

So, I hope you find it useful, and bugs and feature suggestions as usual can be messaged, posted on the application’s wall, my wall, or in the comments here :) Enjoy!


08 June 2007

Who said that? #

This seems to have been broken for a while. Blogger changed the structure of the comment form page, hence it wasn’t getting the comment author’s name properly. I’ve fixed it now. A quick re–install will do :)


There isn’t really much history behind this one, except that it was an idea originally put into my head by Avatar, for the old Blogger. Since back then we had the form as part of the post page, and not a Blogger page, a comment quoting system was the ideal thing for a blog like Bloggeratto which needed Avatar answering tons of questions. Back then when I wrote the script, it was so badly broken that I feel ashamed now of it :P

With the new Blogger, that system broke since the form disappeared. Although, the idea is still a good one, and the necessity of having a comment quoting system became very glaringly obvious to me right after my Blogger Smilies post, where I had to answer tons of comments, and reply to a lot of suggestions. So, I wrote this script a long time back, and it’s been through a _very_ long testing phase. I’m going to finally release it for everyone to use :)

It's a really simple script, which adds a ‘Reply’ link to all the comments on the comments page, which you can use to add the body of the comment to the form’s input, with all <BR> tags converted to line breaks for ease of use, and the text itself enclosed in a i[rel=”cquote”] element for easy styling. It also wraps the quote in nice curly comments for you :)

Also, when you click the quote link, a link is created back to that quote, and shown right above the input area. That’s for the unusually large number of comments that you might have to reply to all at once :)

Inputs are always welcome! Cheers! :)

What you waiting for?

Blogger Comment Quote / Reply
All my Userscripts


07 June 2007

More bVibes love: Greasemonkey joins in #

Ah! Two updates today :D

While looking around bVibes, I bumped into a post on Hackosphere about remote vibing (?) buttons from bVibes which you can add to your posts. Well, I took it a little out of context, but the effect is pretty much the same :)

With Vibe me later, you can click through to a story from a bVibes page, go through the story, and if you consider it worthwile, vibe it from the page you land on. You won’t have to go back to the story page on bVibes to vote for it. The script adds a (not so good looking, but meh!) small button to the bottom right of your page, which flashes initially to remind you it’s there.

You can use the button to vote whenever you want. Also, the button will only show up for pages linked from bVibes, and when you click through from bVibes. I might recode it to check bVibes for every page you visit … hence make a ‘smart’ vibe button :)

Enjoy!

Links

Vibe me later
All my userscripts


bVibes get some Facebook love

bVibes is our very own Digg, for bloggers! Created by the elite hacker Ramani, I think it’s something the bloggerosphere needed more than the blogosphere in general. It’s about time Blogger started getting the attention it deserves, and blogs hosted at Blogger the credibility and respect they deserve.

I recently joined up, and it’s picked up quite well! Users are joining up pretty quickly, and stories are being submitted even quicker :P But as usual, enough is never enough! So now, bVibes is getting some love, Facebook style! My recent fascination with the Platform and a mail from Ramani were enough … and we now have a bVibes application for you to add to your profilesIf you’re not on Facebook yet, I suggest you start with that the moment you finish reading this post.

The application basically does what the normal Digg.com application does. It shows the stories you’ve recently voted for in a nice little box on your profile. As things are, there is a half an hour delay between new votes showing up … I might try to fix that, but I’m sure you can live with that :P You can also tell the application how many of your recently voted for stories do you want to show (Digg’s app doesn’t allow this, hah!), or a default of 5 will be enforced. The app also shows how many votes a story has :)

So, do your share of the good work. Show off the posts you think deserve attention right on your Facebook profile, where it’ll be seen by all your friends! Let them get the exposure they deserve!

All bugs, suggestions and feedback can be posted in the comments here, or messaged to me via Facebook. Enjoy!


02 June 2007

Facebook has the lead!

I’ve been obsessing with Facebook for the past week because of the revelation of the new Facebook Platform. What that has in turn done is show me the intricate ways in which Facebook works. How different components come together to integrate themselves to the central goal of Facebook—to keep people connected to each other.

I think Facebook in itself is way ahead of the competition because of their goal. They aim not to have tons of users. Their userbase is a result of constant innovation. They aim to improve the networks that exist, and improve the interactions between the users of the networks. They are probably the only network which emphasizes on innovating, and I think that focus is what keeps them ahead.

Facebook Platform

Some see the platform as going against Facebook’s goal. I felt the same way when it first came out, but as time has passed, and I’ve seen the applications that have popped up, I can guess where Facebook is coming from. They’re not trying to foray into any foreign territory (even if they’ve inadvertently done so). They are trying to make Facebook the one stop destination for all it’s members to find info (about everything) about their friends and the people they know. Applications to track someone’s music, activities and calendar are some of the one’s which have popped up, with some of them becoming very popular. The popularity of applications is thanks to Facebook’s social graph, and what I like to call, the Wavefront effectHuygen's principle states that every wavefront acts as the source of another wavelet. Applying that logic to how news feeds work, when someone adds an application, it shows up in their news–feed, bringing it to the attention to their friends. Their friends then add it, hence starting a new wavefront.. The beauty of this is that the one thing that developers spend most amount of time doing is trying to get their applications to the public. Facebook does that for them, so they can concentrate on building killer apps.

This is very tempting to someone like me, developers, who don’t have resources to consolidate data. Facebook provides the data. All we have to do is use our creativity to use that in ways we think people would want to use them. I don’t see Facebook platform as a detachment from their primary goal. I see it as a natural evolution.

Facebook bloat

Many complain about many of the features as ‘bloat’ and unnecessary, wanting to revert back to the old Facebook. Mark Zuckerberg once said:

Change can be disorienting, but we do it because we’re sure it makes the site better. It may have felt different at first, but things like photos, events, groups and the wall have all made Facebook a more useful and interesting site.

It’s our goal to provide a tool that helps people understand what’s going on with the people around them; all of our additions and changes contribute towards this goal. The new things we’re going to launch will do the same.

And all the current features achieve all this in perfect harmony with each other. I can’t imagine a Facebook without the news/mini–feed. That is truly the major thing that sets it apart. The first thing I want to see when I log in is what my friends have been upto since I last logged in. Who their new friends are, what events they’re attending, what pictures they’ve added, what groups they joined … all those things. If I have to go to each and every profile to check what they’ve been doing, it beats the whole purpose of being part of a network … the information should come to you automaticallyThere was an internal joke here in my hostel, that you remove the feeds, and all the information that Facebook gives you, and you have an Orkut!!

The reason I see the competition not being able to catch up with Fb anymore, is simply because of the path Fb chose and the path the others took. Fb declined the offer by Yahoo! simply to preserve what they had in their own vision. Networks like Orkut have become stagnant, or interfaces to integrations of different services by the parent company, which almost borders on advertisement of those services. Sure, the users are getting all the features that they’d normally want from a network, but they are not getting the ‘integrated’ experience. The different services don’t come together to work together. They are just there working in their own separate modules and cubicles. You’ll never get to know when someone (on Orkut, say) adds a new video or new photo about the party they attended last night. Fb can achieve this by putting two and two together (photos being uploaded after an event the previous day, follows a nice pattern) because the different applications are part of the mothership, and all data finally goes back to a central server, not different parts of the world. That is the key difference between in–house productions and acquisitions. But that is not the point to this…

The point becomes (or remains) that Facebook got a lot of things right, at the perfect time. It helped that the brain behind the concepts was a college kid himself, being able to get into the head of other college kids. And if Facebook continues the same way, there is no–way their getting dethroned as the best social network to be a part of (because it’s just plain and simple cool!)!