I'm certain that this doesn't interest anybody in the slightest, but I just upgraded the entire site to Drupal 6.0.
Unfortunately some modules like jstools, or the Adsense module haven't been ported over yet so I've just gone ahead and disabled them for now until everything gets back to normal in the land of Drupal.
I've been very pleased with Drupal as a CMS, and am really look forward to them tightening up Drupal 6 further on in the release cycle, but right now everything is looking promising enough to jump ship from Drupal 5.xx.
Howdy!
Welcome to my blog where I write about software
development
, cycling, and other random nonsense. This is not
the only place I write, you can find more words I typed on the Buoyant Data blog, Scribd tech blog, and GitHub.
Facebook's Bleeding Edge
For the past couple weeks I've been living dangerously, as some people know I live in the Tenderloin District, but that's not what I mean when I say "living dangerously." In my constant quest to squeeze as much performance out of Top Friends as possible, I've been evaluating the latest and greatest stuff that Facebook has to offer developers. In addition to the usual adding of features, tuning virality, and general application upkeep, I've been exploring mixes of FBML, FBJS, Mock AJAX, preload FQL, and batched queries all as a means to improve how fast Top Friends is for our users. I've been saying for months that it's exceptionally important to keep up with all of Facebook's changes, for better or for worse, and sometimes they throw out gems like preload FQL that will help shape new and interesting ways you can utilize Facebook's data inside your application.
The Feature
The first obvious thing that I wanted to apply preload FQL to, was a new feature we've pushed out called "Top Friends News" which aggregates "what's going on" with your Top Friends.
It was very important to incorporate data from Facebook as well as our own data into the feature to make sure the page was as rich and interesting to the user as possible. Unfortunately, executing queries to fetch birthdays, recently uploaded photos, statuses, etc, are prohibitively expensive if you just run them as standard FQL queries. Even as preload FQL queries they are relatively expensive when hitting a cold cache. To ensure the page was as fast as possible using preload FQL we ran a lot of tests with various iterations of the queries and tuned everything as much as possible. I could yak endlessly on all the cool stuff we've done in this specific case to squeeze every last drop of performance out of the News page, but I'll cite the numbers and get to the nitty-gritty right away. Before we released the feature I tried the page with no preload FQL queries, and the necessary Facebook data was procured through painfully slow standard FQL queries. Executing these queries on the page made the "Top Friends News" page the slowest page Slide served up to Facebook, clocking in at about 2.5-3.0s. Simply unacceptable. After a long day of tuning and implementing all the queries to run as preloaded FQL queries, the "Top Friends News" page became the fastest page Slide serves up to Facebook at around 0.5s a pop.
Although preload FQL is technically still a "beta feature" according to the wiki, we've implemented it in an application that has millions of users daily; in my opinion preload FQL is "Google-beta" quality (which means, it's solid) as opposed to "Microsoft-beta" quality (which means, it sucks).
Using preload FQL
If you grab the latest PHP client library from Facebook, support for preload FQL is already baked in via the admin.setAppProperties API call. Actually calling the API call is relatively painless, it's something to do pre-push instead of "live" like normal FQL queries. Once you set your application's preload FQL rules, the results are simply posted to the FBML page matching the "pattern" you specified when you set the FQL rules to begin with (read the wiki page for more), when the results are POSTed however, they'll be formatted in JSON, similar to a regular FQL query if you specify ResponseType.JSON. This does mean however you should be using FBML for your application page to take advantage of preload FQL, it's possible to use iframe pages and preload FQL through a clever mix of memcached and <fb:iframe/>, but I won't go into that here.
Performance Concerns
While moving to preload FQL means you lessen the chance that Facebook times out while trying to load your FBML page, if you structure your queries incorrectly you merely shuffle the lag-time for the user, you won't eliminate it. After working with some Facebook engineers on profiling the performance of preload FQL, they've added another parameter that will be posted into your FBML page that you can use to guage the time it took your preload FQL queries to execute. If you start logging fb_sig_time alongside fb_sig_preload_fql_timestamp you can measure the difference between when Facebook started to process your preload FQL rules (fb_sig_preload_fql_timestamp), and when Facebook called your server for the page (fb_sig_time).
Mixing and matching FBJS, FBML and preload FQL rules in your pages can allow you to create blistering-fast pages that are as rich as possible for your users, while allowing you do to more with less (server-wise) than you could ever do before. Add in a bit of the Data Store API and you'll have pages that rival Facebook's own in terms of speed at prices that rival Amazon's S3 in terms of overall cost. In general Facebook is an engineering organization with lots of smart people working for them, and most of those smart people (that I've met anyways) are working to make the Facebook Platform even better than it is now, meaning the time you put into exploring new parts of the platform will most definitely have been worth it after you start to use some of Facebook's more "bleeding edge" features that are designed to make your life easier, not harder.
2008 is going to be an interesting year.
The Feature
The first obvious thing that I wanted to apply preload FQL to, was a new feature we've pushed out called "Top Friends News" which aggregates "what's going on" with your Top Friends.

It was very important to incorporate data from Facebook as well as our own data into the feature to make sure the page was as rich and interesting to the user as possible. Unfortunately, executing queries to fetch birthdays, recently uploaded photos, statuses, etc, are prohibitively expensive if you just run them as standard FQL queries. Even as preload FQL queries they are relatively expensive when hitting a cold cache. To ensure the page was as fast as possible using preload FQL we ran a lot of tests with various iterations of the queries and tuned everything as much as possible. I could yak endlessly on all the cool stuff we've done in this specific case to squeeze every last drop of performance out of the News page, but I'll cite the numbers and get to the nitty-gritty right away. Before we released the feature I tried the page with no preload FQL queries, and the necessary Facebook data was procured through painfully slow standard FQL queries. Executing these queries on the page made the "Top Friends News" page the slowest page Slide served up to Facebook, clocking in at about 2.5-3.0s. Simply unacceptable. After a long day of tuning and implementing all the queries to run as preloaded FQL queries, the "Top Friends News" page became the fastest page Slide serves up to Facebook at around 0.5s a pop.
Although preload FQL is technically still a "beta feature" according to the wiki, we've implemented it in an application that has millions of users daily; in my opinion preload FQL is "Google-beta" quality (which means, it's solid) as opposed to "Microsoft-beta" quality (which means, it sucks).
Using preload FQL
If you grab the latest PHP client library from Facebook, support for preload FQL is already baked in via the admin.setAppProperties API call. Actually calling the API call is relatively painless, it's something to do pre-push instead of "live" like normal FQL queries. Once you set your application's preload FQL rules, the results are simply posted to the FBML page matching the "pattern" you specified when you set the FQL rules to begin with (read the wiki page for more), when the results are POSTed however, they'll be formatted in JSON, similar to a regular FQL query if you specify ResponseType.JSON. This does mean however you should be using FBML for your application page to take advantage of preload FQL, it's possible to use iframe pages and preload FQL through a clever mix of memcached and <fb:iframe/>, but I won't go into that here.
Performance Concerns
While moving to preload FQL means you lessen the chance that Facebook times out while trying to load your FBML page, if you structure your queries incorrectly you merely shuffle the lag-time for the user, you won't eliminate it. After working with some Facebook engineers on profiling the performance of preload FQL, they've added another parameter that will be posted into your FBML page that you can use to guage the time it took your preload FQL queries to execute. If you start logging fb_sig_time alongside fb_sig_preload_fql_timestamp you can measure the difference between when Facebook started to process your preload FQL rules (fb_sig_preload_fql_timestamp), and when Facebook called your server for the page (fb_sig_time).
Mixing and matching FBJS, FBML and preload FQL rules in your pages can allow you to create blistering-fast pages that are as rich as possible for your users, while allowing you do to more with less (server-wise) than you could ever do before. Add in a bit of the Data Store API and you'll have pages that rival Facebook's own in terms of speed at prices that rival Amazon's S3 in terms of overall cost. In general Facebook is an engineering organization with lots of smart people working for them, and most of those smart people (that I've met anyways) are working to make the Facebook Platform even better than it is now, meaning the time you put into exploring new parts of the platform will most definitely have been worth it after you start to use some of Facebook's more "bleeding edge" features that are designed to make your life easier, not harder.
2008 is going to be an interesting year.
Speaking at Graphing Social Patterns
Coming up in the first week of March you'll be able to find me doing one of my three favorite things (right behind, writing code and sleeping), I'll be talking, in front of people, about Facebook, Bebo and "social applications." If you are one of the four people that have gone on record has having actually subscribed to my RSS feed, you might know that I spoke at something called "Graphing Social" in the past, but this time I'm speaking at "Graphing Social Patterns West" which will be occurring in parallel to O'Reilly's "ETech (Emerging Technology) Conference)" in San Diego March 3rd and 4th.
I'll be talking briefly, in front of people, on tuesday March 4th about during a joint session on "Social App Development 101: Elements of Style," where I'll be discussing some of keystone pieces of building an application that "pops" on Facebook and Bebo, and designing for portability, etc. My session is going to be brief, so I will most likely be employing my crouching-ninja-presentation technique, where the slides rotate every quarter-second at such a fast pace that the content becomes melded into my audiences' subconscious. It's been rumored to cause brain hemorrhaging, but that's nothing but an urban legend, I promise.
In general the entire event should be lots of fun; I'm looking forward to schmoozing with the speakers lined up for the event, as well the time-honored tradition at O'Reilly conferences, playing a good old game of "Find Tim and tickle him until he pees himself."
Overall the combination of GSP West and ETech looks like it's going to make for an interesting couple of days in San Diego, go ahead and register now to make sure you can get in.
I'll be talking briefly, in front of people, on tuesday March 4th about during a joint session on "Social App Development 101: Elements of Style," where I'll be discussing some of keystone pieces of building an application that "pops" on Facebook and Bebo, and designing for portability, etc. My session is going to be brief, so I will most likely be employing my crouching-ninja-presentation technique, where the slides rotate every quarter-second at such a fast pace that the content becomes melded into my audiences' subconscious. It's been rumored to cause brain hemorrhaging, but that's nothing but an urban legend, I promise.
In general the entire event should be lots of fun; I'm looking forward to schmoozing with the speakers lined up for the event, as well the time-honored tradition at O'Reilly conferences, playing a good old game of "Find Tim and tickle him until he pees himself."
Overall the combination of GSP West and ETech looks like it's going to make for an interesting couple of days in San Diego, go ahead and register now to make sure you can get in.
More Tips for Beginning Facebook Developers
I don't feel quite as awesome as I did last summer when I tell people that I "develop facebook applications." Despite personally being really happy with my applications, I get the feeling that users now perceive facebook apps as spammy, poorly designed, and pointless. Sure, there are some applications that are knowingly like this (and they are probably making some quick cash), but to many new developers they just don't know any better.
The points in Tyler's post, as well as the ones below, will help new developers start on the right track and then we can all feel awesome again to be a facebook application developer. I am staying away from saying "don't spam" because that is a topic in need of it's own post.
Just because you haven't seen it doesn't mean it isn't there. Do a little research on existing applications with the same idea before you start development. This will help you decide whether you should pick up their best features and improve on them, or just scrap your idea altogether. There is definitely room for similar applications, but don't build a product if you can't make it better.
She may be hot, but she has no brain. Looks are great, but make sure you have a well built application to support your idea. Users love to uninstall when they see error messages.
Keep improving and adding features to your applications based on user requests, they really know best. I may be crazy, but I like to read and respond to nearly every (positive) comment and suggestion on Free Gifts boards.
Tyler pointed out that the one year mark is approaching, and the amount of progress the developer community has made is really amazing. Over the next few months there are a few things I really hope to see: inter-application collaboration, more functional user interfaces, and a decline of "one timer" apps (quizzes, etc).
The points in Tyler's post, as well as the ones below, will help new developers start on the right track and then we can all feel awesome again to be a facebook application developer. I am staying away from saying "don't spam" because that is a topic in need of it's own post.
Just because you haven't seen it doesn't mean it isn't there. Do a little research on existing applications with the same idea before you start development. This will help you decide whether you should pick up their best features and improve on them, or just scrap your idea altogether. There is definitely room for similar applications, but don't build a product if you can't make it better.
She may be hot, but she has no brain. Looks are great, but make sure you have a well built application to support your idea. Users love to uninstall when they see error messages.
Keep improving and adding features to your applications based on user requests, they really know best. I may be crazy, but I like to read and respond to nearly every (positive) comment and suggestion on Free Gifts boards.
Tyler pointed out that the one year mark is approaching, and the amount of progress the developer community has made is really amazing. Over the next few months there are a few things I really hope to see: inter-application collaboration, more functional user interfaces, and a decline of "one timer" apps (quizzes, etc).
Trying out AdSense
In a vain effort to try to monetize all of the incredibly witty things that I do and say on this ridiculous excuse for a blog, I've started experimenting with Google AdSense mixed in with some of the content on the site. They don't insert themselves into the RSS feeds (as far as I know) and they only show up for anonymous users to the site so I'm willing to bet that the majority of where my traffic actually goes won't be affected.
Unfortunately, since Slide has infected me with this weird disease where I obsessively watch numbers, I'll most likely be obsessively watching a large number of zeroes in the coming weeks. That said, you could totally screw with me by clicking around on a lot of the advertisements...seriously, that would totally irritate me...you should try it.
Unfortunately, since Slide has infected me with this weird disease where I obsessively watch numbers, I'll most likely be obsessively watching a large number of zeroes in the coming weeks. That said, you could totally screw with me by clicking around on a lot of the advertisements...seriously, that would totally irritate me...you should try it.
Tips for beginning Facebook developers.
I am starting to see more and more novice developers on the Facebook forums as well as the IRC channel asking fewer and fewer "development" questions and more and more "product" questions. I find this incredibly interesting because it means one of two things: either everybody has figured out how to use the Facebook platform or an increasing number of people are putting the proverbial cart before the horse when it comes to developing Facebook applications.
Call me cynical about the first option, but I find it highly unlikely that everybody figured out how to use the Facebook Platform; despite its low entry barrier many people are over-thinking it or simply trying to develop a Facebook application before they figure out how to build a web application in general.
The second option is far more likely, Facebook applications have reached such a level of ubiquity that "everybody and their mother" wants to write a Facebook application these days. Right now at a small consulting firm in Omaha, Nebraska some middle manager is asking his lead developer if the firm can reinvigorate their collaborative synergies and utilize the social graph to further meet their clients needs.
Facebook is the new Windows, and the Facebook Platform is the new Visual Basic and I feel as if there is a burden on "us" (the existing "top developers" on the platform) to start to cultivate a community that will encourage stylish, functional and ultimately useful applications on the Facebook platform, to ensure that there will never be a "Facebook 98" or a "Facebook ME".
Here's a couple of the best tips I can offer, and maybe Zach (developer of Free Gifts) can help expand.
Call me cynical about the first option, but I find it highly unlikely that everybody figured out how to use the Facebook Platform; despite its low entry barrier many people are over-thinking it or simply trying to develop a Facebook application before they figure out how to build a web application in general.
The second option is far more likely, Facebook applications have reached such a level of ubiquity that "everybody and their mother" wants to write a Facebook application these days. Right now at a small consulting firm in Omaha, Nebraska some middle manager is asking his lead developer if the firm can reinvigorate their collaborative synergies and utilize the social graph to further meet their clients needs.
Facebook is the new Windows, and the Facebook Platform is the new Visual Basic and I feel as if there is a burden on "us" (the existing "top developers" on the platform) to start to cultivate a community that will encourage stylish, functional and ultimately useful applications on the Facebook platform, to ensure that there will never be a "Facebook 98" or a "Facebook ME".
Here's a couple of the best tips I can offer, and maybe Zach (developer of Free Gifts) can help expand.
- Learn by example: Currently Slide has many of the largest applications on the platform, and we've worked extremely hard tuning and tweaking our apps and understanding our userbase. When thinking about developing your application, it certainly won't hurt to check out some of the existing apps that have succeeded on the platform. Stand on the shoulders of others who have spent far more time researching and testing what works and what doesn't work on the platform than you'll be able to spend.
- Check out some demos: There are a few demo applications that you can dig through to better understand the basics of what makes a Facebook application.
- Just code already: By far the most common mistake I've seen thus far is over-thinking things, the majority of your questions will be answered by simply trying stuff out on the platform. This isn't high school calculus, you are allowed to guess-and-check. I am willing to help developers who obviously need it, but if you can't be buggered to try something out, I can't be buggered to point you in the right direction on where you went wrong.
With the first year anniversary of the original F8 event right around the corner in May, I feel we as a community of developers have made tremendous progress in establishing ourselves, but now I feel it's time for some introspection and self-improvement as a community.
On funding my startup
This has been a whirlwind year for startups across the bay area and my startup, TY-Combinator really is no different. Barely a month into 2008, Slide, Inc announced it had received funding, the recent news about the bid from Microsoft to purchase Yahoo! for just above the GDP of Croatia and now great news for the TY-Combinator.
I'm pleased to announce that the TY-Combinator has received an unsolicited bid from Microsoft that values TY-Combinator shares at over 400% under market value. Microsoft is willing to offer TY-Combinator a half-eaten sammich in exchange for 85% of TY-Combinator outstanding shares. This is an exciting time to work for TY-Combinator, with the prospective addition of the capital Microsoft is willing to offer we will be able to finance new projects to expand our global reach over 1000%, up from our reported reach in the 2007 fiscal year of 1.

Microsoft's bid for a stake in TY-Combinator
I'm pleased to announce that the TY-Combinator has received an unsolicited bid from Microsoft that values TY-Combinator shares at over 400% under market value. Microsoft is willing to offer TY-Combinator a half-eaten sammich in exchange for 85% of TY-Combinator outstanding shares. This is an exciting time to work for TY-Combinator, with the prospective addition of the capital Microsoft is willing to offer we will be able to finance new projects to expand our global reach over 1000%, up from our reported reach in the 2007 fiscal year of 1.

Microsoft's bid for a stake in TY-Combinator
Are Free Gifts Still Gifts?
Facebook has been pretty nice to Free Gifts in the past, despite originally being a blatant rip-off of the real Gifts application. Prior to today, I have only received one complaint from Facebook regarding Free Gifts practices. They asked me to remove a gift that looked similar to one of their gifts. I was okay with that even though mine was a lemon and theirs was a lime; maybe it was tough for the color blind audience to decipher? Today, I received my second complaint from them, which stated:
I will admit it is relatively the same wording, but they failed to explain how using "Send xxxx a Gift" is deceptive or misleading to users. First of all, Facebook provides a tool tip when you hover over a profile action which says "Provided by the xxxxxx Application," which immediately makes a distinction between Gifts and Free Gifts. Second, as far as I know, users are still sending a gift when they use Free Gifts. Third, I have been using this text for longer than I can remember now with no complaints. With over 50 million gifts sent, I have never had a user say they were "trying to use the real gift" application.
I did comply somewhat by making all future profile actions say "free gift" instead of "gift," but there is no easy way for me to fix the 8 million profiles already containing the text. As of now they have failed to respond to my question of how exactly I was deceiving users, but I am really interested in hearing their reasoning.
Your Facebook application, Free Gifts, is currently in violation of the Platform Application Guidelines section I.3 (see http://developers.facebook.com/guidelines.php). Specifically, please note that the Terms prohibit applications from acting in a manner that is misleading, deceptive, or fraudulent.
The application's link under the profile picture uses the same wording as Facebook's Gift application (please see attached). Please change this to reflect your application's name to differentiate Facebook's Gift application and "Free Gifts" application, as it is currently misleading users to think that this refers to the associated Facebook features.
I will admit it is relatively the same wording, but they failed to explain how using "Send xxxx a Gift" is deceptive or misleading to users. First of all, Facebook provides a tool tip when you hover over a profile action which says "Provided by the xxxxxx Application," which immediately makes a distinction between Gifts and Free Gifts. Second, as far as I know, users are still sending a gift when they use Free Gifts. Third, I have been using this text for longer than I can remember now with no complaints. With over 50 million gifts sent, I have never had a user say they were "trying to use the real gift" application.
I did comply somewhat by making all future profile actions say "free gift" instead of "gift," but there is no easy way for me to fix the 8 million profiles already containing the text. As of now they have failed to respond to my question of how exactly I was deceiving users, but I am really interested in hearing their reasoning.
SIGSEGV in my brane.
I'm not proud of it, but I do read TechCrunch every now and again, if for only the occasional gem that comes across that causes me to hate buzzwords and everybody that uses them.
In the second paragraph of this article almost caused an entire system shutdown in my central-buzzword-processing unit (CBU):
"Both Imeem and Anywhere.FM saw a lot of synergy in the deal."
I couldn't read any further into the article after reading that, whenever anybody uses the word "synergy" seriously I have a tendency to tune out completely and think the absolute worst of them until they offer me chocolates, caffeine or other goodies.
In the second paragraph of this article almost caused an entire system shutdown in my central-buzzword-processing unit (CBU):
I couldn't read any further into the article after reading that, whenever anybody uses the word "synergy" seriously I have a tendency to tune out completely and think the absolute worst of them until they offer me chocolates, caffeine or other goodies.
Courtesy of Adonomics
We've been working pretty hard for the past month (well, for the past 8 months too) but I'm particularly proud of the work that my co-conspirator and I have been putting in on Top Friends (we're that green line that creeps up from behind on FunWall and Super Wall).
One of the most helpful "tools" that's been available to me has been Slide's competitive spirit. In addition to the 2,000+ developers on the Facebook platform we have some pretty healthy competition going on inside Slide as well. Between Top Friends, SuperPoke and FunWall there is plenty of trash-talking and "friendly competition" (read: if it weren't an HR violation, I'd of already resolved to dirty tactics). In doing so we've cultivated an environment where some of the most often heard phrases are: "Is Facebook down again?!" and "OH SCHNAP!"
Another key factor to our team's enjoyable demeanor has been (in my opinion) our liberal use of the "rubber chicken" as part of a sort of group hazing. In essence, when you have glaring mistakes that somehow get pushed to the live site, you will come into the office the next day with rubber chickens adorning your monitor. This group acknowledgement of when we "fuck up" encourages more of a social-pressure to write good code instead of relying on policy, etc to ensure code quality, especially on the rapid release schedules we adhere to. Rubber chickens are the truly quintessential gift at Slide, it is always feels better to give than to receive.
As we near the end of the first month in 2008, I wish Facebook and Bebo continued success with there platform(s); not because I love FQL and FBML oh so much, but because I work for Slide, on the Facebook team, where competition and rubber chickens reign supreme in the land of embedded videos, sortable friends and flying sheep.
(Now seriously, Slide is hiring)