Flask-SQLAlchemy Caching

As my carrier evolves I'm developping more and more on restfull API. While endpoint caching made a lot of sense when rendering rich Jinja templates output - and still does for API - it is not as efficient when your client will query your objects database one by one, or…

Micro ajax library

I've been spending couple of months now building static pages interacting with SodaHead's API for some of our partners (ESPN, Fox...) and I'm always looking to shorten the amount of code on the page. The following is a cross browser compatible micro Ajax library (handeling GET/POST/DELETE...) in just…

Palindrome

We've been recently going through a recruiting process at work and my colleague came up with this simple exercise to see how a candidate organizes his development: Write a function that returns true when it's passed a palindrome. To me in coding there is two ways to look at problems…

JavaScript i18n

As SodaHead extended over the ocean and opened a new website in germany we were faced with a massive translation integration. We are using Jinja2 on the backend, i18n is part of the batteries. JavaScript on the other side, doesn't provide anything to handle i18n so I had to come…

Ordinal

A python quick method to get your numbers postfixed with two letters in order to get an ordinal string version of a number. This is helpful when you want to display number in a more human way. The method also handles special case of number being or ending with 11…