Posts in February, 2008

There are a number of very powerful template languages available in Python. Some template languages, such as Genshi, allow complex Python statements and even full Python code within the template file. Others, such as Django templates, prefer to restrict templates to presentation only and do not allow general Python expressions within the body of the template.

In the context of a web framework, is it better to have the full expressiveness of Python, or restrict templates to presentation only?

I'm going to Miami for a few days, so mail will go unanswered until I get back on Tuesday. :-)

Occasionally when I am feeling nostalgic I dust of some off my old creations. Back in the day I used to create graphical demos for PC, which are difficult to run these days because they were designed to run under DOS and not Windows, and computer hardware has change so much since then. Fortunately I can use DOSBox to run them with Vista. DOSBox even has an option to record videos, so I recorded a demo I wrote way back in 1995 (it actualy got me my first job). 'Degreelessness' was built on a Pentium 75 PC and runs with glorious 256 colour graphics. Its a little embarrassing, especially the goatee, but bare in mind is is over 10 years old!

Here it is, courtesy of Google Video.

Sorry for the spam in my feeds. It was due to an old version of wordpress that somehow combined deleted spam with my posts. I meant to fix it a while ago but it escaped my mind. My humble apologies.

This is the third part in a series of three posts about writing a Facebook application with Facebook. If you have not already ready done so, you should read the first and second parts first.

The technology behind Facebook applications is actually quite straight-forward. It is completely platform agnostic so you can build an app with any technology you might use to serve HTML content. My choice would be Python, but then I am a shameless Python fan-boy. Unfortunately there are still problems that any Facebook application developer will face, and most aren't technology related. continue reading…

To further my bid for the worlds dullest hobby award, I have been creating pie charts. I wanted to investigate generating Povray scene description files with Python. It turns out to be a winning combination; it didn't take long to build a system where I can generate a scene containing pie segments of various colors and angles. I can also vary the height and explode individual pie segments. Povray can render very high quality scenes so this system could be used to make pie charts for television or print.

I will experiment with other charts, bar charts etc. Maybe I'll even generate an animation with it.

This isn't entirely just for the heck of it. I plan to write an article about it for the Python magazine.

For the first part series of post, click here for Part I.

Writing a Facebook application is in essence the same as writing any web application, only with an additional step where the output from your web app is processed and inserted in to a Facebook page. Although PHP seems the most popular choice (and is what Facebook itself is written in) you can use any of the Python frameworks to write an app. You could even roll your own if you were so inclined. I used Turbogears, but you could easily adapt this to another Framework. continue reading…

I promised to write up my experiences developing Virtual Microbes, a Facebook application. Its a lot to get through so I've decided to split it up in to installments. This installment is a lightning tour of the components in a Facebook application.

Facebook applications are basically content served up by any http server and seamlessly presented to users within Facebook pages. There are two ways this is done; either with an iframe tag or with Facebook Markup Language (FBML), which is basically HTML with additional tags to access Facebook features. Using an iframe may be the simplest option because you can just serve pages in the way you would with any web application, but FBML offers some additional capabilities that you wouldn't otherwise be able to take advantage of. continue reading…

I hacked together a Facebook application recently. I was looking in to integrating Becontrary.com with Facebook, but I had an idea for a simple app that would help me learn the ropes with FB. Its called Virtual Microbes -- the idea is that you give your friends a virtual disease and encourage them to pass it on. You gain a point each time you give a friend a microbe and each time a friend (or friend of friend) passes it on, which has the potential for exponential growth. Its completely pointless, and couldn't exist outside of the social networking sandbox, but it gave me the opportunity to experiment with integrating Turbogears with Facebook's application system. There was some pain initially, but ultimately it went smoothly. I'll write up my experiences with it, and give away some of the code soon.