1:23, Monday June 11th, 2007 • feeling thoughtful • no comments
Facebook detects a user's timezone through JavaScript. A Date object is created, the timezone offset and sent back to the server via an Ajax request. This is done on every home page view, so at least every login and generally much more often. It's a simple technique and reliable, because it uses the value set by the visitor on their current computer, dates and times are consistent with the system clock in the corner.
Facebook Platform: some thoughts on what I've learned so far #
11:16, Friday May 25th, 2007 • feeling relaxed • no comments
The interwebs are on fire today with news of the Facebook Platform, announced last night (yesterday US).
Facebook are saying "we've grown so big, growing isn't a concern any more, now it's keeping people, so we're going to let Facebook be the network of friendships that underpins all the applications you use." The example that Mark Zuckerberg used in his speech was events. 3x as many people get invited to stuff on Facebook as on Evite. That's because I'm inviting my friends and that network (I have 40 right now, I'm a loser) is much more developed than the list of emails I will cut and paste will ever be. Everything is done in the context of friends, much like in life. An existing and very rich friendship graph is an excellent foundation on which to build a lot of applications.
But what about the technology? Facebook point to three key points on the platform site, so I'll use that structure.
Deep integration. You can do anything Facebook's existing apps can do, create stuff on the profile, in the news feeds, create pages served by Facebook. When a user interacts directly with your application (i.e. by clicking it's icon in their left nav), Facebook pulls content in FBML from your servers. FBML is HTML with Facebook-specific extensions tags, e.g. <fb:name/> and <fb:profile-pic/> which allow apps to use Facebook data without actually having direct access to it. There are some more sophisticated tags as well, including helpers for tasks like making buttons, media players and simple Ajax-style tasks.
Mass distribution. Developing a Facebook application won't mean a guaranteed success. Just like developing a web application you'll still need to create a best of breed app. You do get a leg up with promotion however. As your app is used, news feed items on profiles spread the word virally through the friendship graph, profile boxes and actions show visitors to your profile what your app is good for.
I also think there's a lot to be said for creating an app which is UI-consist with Facebook. Their UI is clear, organised and rich. Also, there's a lot of trust for Facebook now because of their excellent privacy management. It hasn't always been that way, but they listened to their users.
New opportunities. Facebook are being very open about revenue. You can make money from ads as long as you don't compete with theirs. You can make money by providing products and services just as you would anywhere else on the web.
I recommend watching the Inside Platform video. Jia Shen of widget company RockYou said "Integrating on to the Facebook Platform automatically gets you exposure to a broader base of users. One of the things I've always liked about Facebook is that it already has critical mass, you don't have to try to go out and actually build and establish another network of information."
12:24, Wednesday May 9th, 2007 • feeling relaxed • no comments
The ever fascinating Library House bloggers have compiled a graph of startup founder ages from data in their VenturePedia database.
I'm 28 now. I'm currently working in my second and third startups. While I could only really call myself a founder of the first business, the now dead Cohack, I'm as close as dammit in the other two.
I often wondered about this question: am I behind the curve or ahead of it? Library House's data suggests the answer is well ahead. They don't reveal too much, but of more than 600 founders, about 10 were in the 25-29 age bracket. 1 in 60 isn't bad. Indeed, the curve will be bearing down on me for at least another 10 years yet.
I'm inclined to see this more as youthful rashness on my part than precociousness. I probably should have spent longer kow-towing my way through established organisations and learning my trade a bit more. Successful entrepreneurship often seems to follow the Salesforce.com model, their two founders were both successful Oracle staffers before starting out on their own. Then again there's always the Larry-and-Sergey/Chad-and-Steve/David-and-Jerry model, but I'm ancient for that.
A final note on the data. Library House's data comes from companies seeking funding. It is possible, even likely, that there are more companies founded by younger kids, but they're less likely to be looking for funding, have the skills to even pass the initial requirements to get into the DB, etc. I should also mention that I have yet have a successful business, but we're all working hard on it.
11:51, Wednesday April 25th, 2007 • feeling relaxed • no comments
I've never been one for debuggers, I'm too lazy really and because I've been a web application developer all these years, debuggers aren't really very often found. I'm much happier just slapping a print statement or two into the code. But I may have found a way to use a debugger that suits my (primitive) working style.
First of all, it's worth showing just how easy it is to get started with my debugger, pdb. Add these lines to any stretch of Python.
import pdb pdb.set_trace()
When the interpreter runs into pdb.set_trace(), it'll drop into the pdb prompt and you can start inspecting the innards of your code. See the pdb command documentation for everything you can do.
Use test cases to debug web apps
A simple trick for making use of the debugger in a web application is to use a test case as the container instead of the web server. In Django's testing framework for example, tests are run inside the standard Python unittest module which works happily with pdb.
You can also set IPython to invoke pdb whenever an exception is raised and not caught. Allowing you to debug as you play with your code in a interactive Python session.
ALA make the valid point that little is known about web designers and developers as a group. Much is assumed, we're all nerdy young white males, of course! I for one look forward to the results.
Completing the survey gave me a chance to reflect on my 6-7 year career so far and consider it in context. I've been very lucky, web design has been good to me in many ways. It's allowed me to be flexible about where I work, when and with whom. I'm constantly improving my skillset (I ticked the box for every competency in the survey). I've been able to play businessman in start-ups, entertaining my own ideas. Although that has sometimes been high-stress and low-income, I've managed to find real jobs to fall back on when the going has got too tough.
Right now I'm involved in not one but two exciting start-ups (MyMart, moblogUK) and although it's a lot of work, they're both deeply interesting ventures. Reading TechCrunch and other sites the temptation to feel like an also-ran can be a bit strong sometimes. It's hard to watch lots of great services created by people younger than me spin-out for huge money. That's like holding yourself up against Hollywood stars or great statesmen and feeling like a failure. I need to remind myself not to do it and concentrate on just making great web applications.
P.S. My most recent act in this quest was to redesign the moblogUK home page and create a new theme for the site. We've launched some great new features (including one that is genuine bonafide innovative - busyness).