HTTP Headers, Web Apps and Mobile Safari

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 one sent when you access the same app manually using Safari..

Here’s a test that proves this assertion: Continue reading

Basic vs. Digest

In the series of highly boring posts ;) here’s another one; in this case, a simple explanation of two different authentication protocols available in the HTTP standard.

HTTP Basic Authentication Protocol

This is the simplest HTTP Authentication protocol available:

  1. The browser sends a request to a protected resource: GET /index.html
  2. The server looks for the “Authenticated” header in the request; since it does not find it, it replies back with a response with the 401 code (“Unauthorized”). The response contains a “WWW-Authenticate” header, with the value “Basic”. This response is called a “challenge”, and it also contains a “realm” text, which describes the protected resource in clear text (the “realm” is shown in the pop-up window that usually appears for you to type your password when this protocol is used).
  3. The browser creates a new request GET /index.html that contains an HTTP_AUTHORIZATION header, whose value is the word “Basic” followed by the ‘username:password’ string encoded in base 64. This algorithm is a two-way algorithm: you can retrieve the username and password from the base 64-encoded string.
  4. The server receives this response, and since base 64 is a two-way algorithm, it compares the MD5 (or SHA1) password hash to the one stored in the database. If they are the same, the request is processed. Otherwise, the user gets a 401 again.

Continue reading

Pourquoi pas?

Pourquoi ne peut-on pas avoir des conférences comme celle-ci, avec des mini-events comme celui-ci en parallèle en Romandie? Ou encore comme celle-ci? Ou bien comme cette autre! Ou celle-là!

Pourquoi pas? Est-ce que le marché est trop petit? Y a-t-il un manque d’intérêt général? Je pense que le problème est important, et qu’une grande partie de l’élan technologique local est étouffé par ce manque d’une grande conférence technique chez nous.

Après tout, le web a été inventé à Meyrin. Continue reading

Symfony con MAMP

estuve jugando un rato con symfony y MAMP, y esta bastante bueno, aunque hay un par de cosas que no me gustaron. aqui van unos comentarios que te podran ser utiles.

me puse a leer las instrucciones de instalacion, y despues encontre el tutorial, de donde saco gran parte de lo que escribire en este articulo.

ahi dice que hay un archivo tgz que podes bajar de aca. se llama “sandbox” (caja de arena) y tiene todo listo y esta especialmente destinado para principiantes.

lo baje y lo descomprimi (haciendo doble click) en el web root – yo lo tengo seteado en ~/Sites, mira esta pantalla de configuracion de MAMP:

entonces puse la carpeta sf_sandbox en ~/Sites/sf_sandbox.

como tengo el MAMP andando abris un browser y te vas a http://localhost/sf_sandbox/web/index.php/

primero no me anduvo porque tenia MAMP con la opcion “PHP 4″, y la cambie a “PHP 5″ y anduvo:

Continue reading

Cool Color Tools

361037981_473b9acf23_m.jpgJust a few links to work with color; you might know them all, or not, but if you have more, don’t hesitate to post them in the comments!

 

Finally, a classic – even if it has nothing to do with color: typography.com.

Enjoy!

Update, 2008-01-28: You can add Mondrianum to this list :)

A Simple Recipe for Podcast Success

I am subscribed to quite a few podcasts and screencasts here and there. And I’ve come up with a very basic (albeit limited and you could even say irrational) way of determining which to keep listening and which to throw away immediately:

The quality of the material… and the voice of the speaker.

I’m not Pavarotti nor Alfredo Caruso, but some voices just irritate me. I just experienced this through the Heroku screencasts; the guy’s voice is not really nice (at all), kind of creepy even, hard to follow, I don’t know how to describe it. It is annoying to follow a 10-minute presentation like this; really, I’m sorry, but that’s how I felt it, even if his service seems really interesting and I might even try it in the future.

Compare now with Ryan Bates of Railscasts: his voice is adapted, serious yet young, with the right pitch and speed. It makes following the explanations easy, moreover taking into account that I’m not a native English speaker. The Railscasts are a perfect example of what I like in podcasts and screencasts: short descriptions (15 min max) of extremely useful features, with practical uses and with some background as well to get the idea. The site (and Ryan) is absolutely brilliant.

As I said, is a purely subjective point of view, but that’s (one) of the criteria I use to decide whether to keep listening to a podcast / screencast or not. The other being the contents, of course; throw in a nice voice spitting nonsense and you won’t have much better luck than the Heroku guy.

The notable exception to this rule must be obviously David Heinemeier Hansson; his first videos showing how to do a weblog in Rails in 15 minutes are just insane; the guy’s voice is really awful, too highly pitched and somehow disturbing. But the stuff he showed was great, and I stuck with that instead :)

Simultaneously

Incredible. I just came accross this blog called “One Month App”. The guys from Clear Function have been working on Pulse, a web-based application, more or less at the same time as I was working on Parking Friend (from the end of September to mid-October)! Their design is nicer than mine, though :)

It is also interesting to see that their toolset is more or less the same as mine (it’s a typical Rails stack, after all) but I’ve used Inkscape and Gimpshop instead of the Adobe Creative Suite applications (which I do not own). In any case, it is possible: you can create really complex applications in Rails, in a really small amount of time. This is not something that all development stacks allows you to do!

Congratulations for the release to the team of Clear Function!