/ #blog 

Daily Log, 2010-11-02

Spent quite a bit of time with Keith getting a Cross Site JSON call to work in jQuery and Sinatra. The problem (or security feature) is that a browser will not make an XMLHttpRequest to another domain than the one it’s currently displaying data from. We are building a widget that is going to be embedded on other servers, and we wan’t to make such a call… Luckily, there’s JSONP which “pads” the response by the server in a JavaScript function call and thus bypasses the problem. jQuery supports JSONP natively in it’s $.ajax request and we tried hard to get it to work with a POST request (as the docs suggested would work). It doesn’t however, and we had to change to a GET request (using the handy $.getJSON method. So we sacrificed the purity of our REST API (we are really creating a ressource) by allowing that ressource to be created and retrieved by a GET request. Still that beats using iframes for our widget - at least in our book. ...

Jens-Christian Fischer
/ #blog 

Daily Log, 2010-11-01

Little work done due to hospital visit and lot’s of talking. Working on secret project (to be released soon) and getting fed up with this message when running the cucumber features (Ruby 1.9.2, Rails 3.0, Cucumber Beta 0.22): “warning: regexp match /…/n against to UTF-8 string”. It turns out, that others have had that too: Crimpy Code and Openhood have the solution. We are looking into providing support for login via Facebook. OmniAuth seems to fit the ticket nicely (and it also handles a bunch of other authentication systems based on OAuth, OpenID, LDAP and many others). We’ll see how this works out. ...

Jens-Christian Fischer
/ #blog 

links for 2010-09-26

Lunch over IP: Reboot8: How to be a Renaissance man, and help Google eat itself Notes on the famous Ben Hammersley Reboot 8 talk about Renaissance man (tags: reboot8 renaissance) You’re cuking it right Hints & tipps on using Cucumber (tags: testing cucumber howto) A few git tips you didn’t know about Advanced git tips (tags: tips git) Vimcasts More screencasts (tags: vim video) An Introduction to Vim Macros - video tutorials for introduction, python, vim, screencasts, blog, tutorials, installing, install, select, features ...

Jens-Christian Fischer