Posts

Showing posts from January, 2011

JQuery 1.5 promises a better future.

One of the new features of the unreleased JQuery 1.5 is a new $.ajax module. Apart from many bug fixes, the most interesting, and useful part for me is that it now uses promises . Those familiar with python and twisted, or the JavaScript library mockikit, Dojo Deferred, or java.util.concurrent.Future might know these as deferreds or futures. jQuery is using promises, and not futures. They are similar but slightly different. It's a very commonly used technique in concurrency libraries now - so it is good that jQuery has hopped on board. Since jQuery always returns a promise, you can now add callbacks even after you have done the call... or even change the callback later. jQuery.getJSON( url ).error( errorCallback ) Pluggable ajax lets us test more easily The other great thing(from a testing perspective) is that jQuery now allows you to use plug in mock implementations. This lets you make a fake ajax implementation for your unit tests more easily. This pluggable architecture co

London python dojo pygame write up.

Image
Last night I went to the London python dojo at the Fry IT offices. The night started with pizza, beer, and nerdy chats with everyone. Then two lightning talks. The first by @tomviner (Tom), on some funny and useful python modules. `pip install oo && python -moo` Python goes moo (dad joke). `pip install e && python -me 1+2` Next up was @otfrom (Bruce). He has a cunning plan to work on an engine that could be used later in a cross language dojo to display a game world. @otfrom is trying to see if other language dojos in london are interested in having a bot war tournament in the future. So far the clojure dojo, and perhaps the scala dojo are interested in participating. @otfrom also announced the London dojos mailing list at: http://groups.google.com/group/london-dojos A group for people interested in programming dojos in london (not just python). Then 30 of us took an open source game from pygame.org , forked it and hacked on it! I brought along a big bag of joy

Pyramid does 22, but how do you do zero lines of python?

There is an article talking about how in a certain configuration the Pyramid python framework uses 22 lines of python for a hello world app. How would your python web app run zero lines of code for a hello world? By pre-generating the html at startup - or at deploy time, and serving the generated data. Beat that Pyramid! ;) 6 minute Abs . This is a silly blog post - but also slightly serious. Uploading static data to serve is a very valid approach for a web framework. It's performance, security, and complexity benefits are quite big.