HTTP Headers, Web Apps and Mobile Safari

Date Arrow  October 30, 2009

I found today that Mobile Safari, the browser bundled with the iPhone, has a very strange and annoying behaviour when it comes to web apps. In fact, when you “install” web applications with the <meta name="apple-mobile-web-app-capable" content="yes" /> tag in the “Home Screen”, the USER_AGENT header sent to the server is different to the [...]

Tagged   How to? · iPhoneComments  Add Your Comment (2)

10 iPhone Memory Management Tips

Date Arrow  January 28, 2009

Memory management in the iPhone is a hot topic. And since tonight I’m talking about it on tonight’s monthly meetup of the French-speaking Swiss iPhone Developers group, I might as well share some tips here from my own experience.
I won’t go dive through the basics; I think that Scott Stevenson did a great job in [...]

Tagged   Cocoa · Code · How to? · iPhoneComments  Add Your Comment (32)

wp-super-cache problem? Easy fix

Date Arrow  April 23, 2008

I’ve just installed the excellent wp-super-cache plugin to accelerate things a bit in this blog; today somebody sent one of my pages to reddit and I’ve had more users than usual! – by the way, thanks for coming! :)
Update: I admit, it also has a bit to do with the reading of today’s entry in [...]

Tagged   How to? · Open SourceComments  Add Your Comment (3)

Installing PostgreSQL 8.3 on Leopard

Date Arrow  April 23, 2008

This is the documented path to my discovery of PostgreSQL 8.3, which I’ve never used before. Now that MySQL’s community is getting hammered to death by Sun, and thanks to all the good things I’ve heard about it over the years (including enhanced performance on multicore systems and greater scalability), I really wanted to install [...]

Tagged   Django · How to? · Open Source · Ruby on RailsComments  Add Your Comment (8)

Extracting e-mails from a vCard file with Python

Date Arrow  April 23, 2008

Let’s say that you have a vCard file. You can export it from your Mac OS X AddressBook.app, or from any other similar application. Now you need to extract some information from it, namely the e-mails, for spamming your friends with some boring news. Typical.
Enter vobject. This Python library is part of the Chandler effort [...]

Tagged   How to?Comments  Add Your Comment (2)

Quick spec from your Python tests

Date Arrow  April 17, 2008

Using Python’s own unittest package, here’s a small script that can iterate over your test suite to output a small, quick, nice list of the tests in your application:

import unittest

loader = unittest.TestLoader()
tests = loader.loadTestsFromName(‘path.to.your.tests.package’)
for test in tests._tests:
print test._tests[0].__class__.__name__.replace(“Test”, “”)
for method in test._tests:
[...]

Tagged   Django · How to? · QualityComments  Add Your Comment (2)

How to build ohcount on Leopard

Date Arrow  April 7, 2008

If you do not know ohcount, you should; the guys at ohloh.net have GPL’d one of their core components, namely the one that allows you to perform source code line counts in your own projects. Neat and useful!
However, the current ohcount distribution (which you can download from this link) does not build out-of-the-box in Leopard. [...]

Tagged   Apple · How to? · Open SourceComments  Add Your Comment (1)

Playing with HTTP libraries

Date Arrow  March 26, 2008

It’s fun to find out how to tackle the same task in different programming languages; in this case, it’s all about doing HTTP requests over a network: fortunately, there are networking libraries in virtually all major programming languages. In my current project, I’m generating wrappers easing the access to the core of the project itself, [...]

Tagged   Code · How to?Comments  Add Your Comment (35)

Screen Savers for the Mac using Flash

Date Arrow  March 18, 2008

This is an evening project that turned out to be really cool. Let’s say that you’re a Macromedia Flash designer, and your clients ask you to bundle your nice Flash movie as a screen saver. What to do? For Windows there are free utilities to convert a SWF into a screen saver, but not for [...]

Tagged   Apple · Cocoa · How to?Comments  Add Your Comment (1)

REST + HTTP (Basic + Digest) Authentication support for Django’s test Client class

Date Arrow  March 5, 2008

Django has a nice support for unit and functional testing; however, its django.test.client.Client class does not support PUT and DELETE requests, which might be useful if, like me, you’re doing some kind of REST implementation using that framework. There’s an open ticket about it, but for the time being, here’s my wrapper that supports those [...]

Tagged   Django · How to?Comments  Add Your Comment (4)