Hi, I'm Richard Caceres, and I make things. I'm available for freelance.

I helped build Cargo Collective and have worked on a lot of great websites with OSK Studio. I also co-created wowlist.org. You could call me a full-stack developer or a Developer & Designer.

I'm based in San Francisco and like going to talks and meetups such as the SF Python meetup or the SF Django meetup.

Follow me on Twitter and Github, or send me an

This website is a hybrid blog and portfolio. Scroll down to see what I have been up to.

Google News Lab

Google News Lab is a website designed to help journalists learn the best ways to use Google tools for reporting and storytelling.

I was brought onto this project, because of my knowledge of Python and Django. Django turned out to be a really great fit allow us to rapidly develop and evolve and content management system and API.

It was easy to add features such as converting the CMS and API to have translations in over a dozen languages.

The application runs on Google App Engine and utilizes Google Cloud Storage and Google Cloud SQL.

Site: https://newslab.withgoogle.com/
Agency: Use All Five
Launch Date: June 19, 2015
Technologies : Google App Engine, Cloud SQL, Cloud Storage, Memcache, Django

Announcing this timeline

This website is a hybrid blog and portfolio. As someone with a diverse set of interests, a timeline is the best way to catalog my output. The filters showcase my different hats, but when it comes to it, everything I do is bound by myself and the passage of time.

Coming soon: A backlog of content and projects will be made available here.

Announcing django-cache-decorator

I have been using Django for over two years, and I have grown to love the rich feature set it comes with. Yes, there's a lot one ends up not using, but it is great that these things are there for when one needs it. It's worth noting that these extra features do not cause a performance impact. Django can be stripped down and is capable of returning < 10ms responses.

Django offers many interfaces with swappable backends. For example you can use the same ORM functions for interacting with Postgres or Mysql. Or you can send Email directly from the server or via a commercial service like SendGrid (3rd party). Or you can choose from a variety of cache backends: In-memory, Memcache, or Redis (3rd party).

And once one has experience with the Django framework, it is really quick to develop web applications. These are all reasons why it's compelling to invest further into Django.

I have put together a simple python package to make it easy to add caching to any function in a django project. It's called django-cache-decorator.

Installation

pip install django-cache-decorator  

Example Usages

from django_cache_decorator import django_cache_decorator

@django_cache_decorator(time=0)
def geocodeGoogleAddressJson(location):  
   """Cache indefinitely until cache is reset or expired"""
   ...


@django_cache_decorator(time=500, cache_key="TagManager:popularTags")
def popularTags(self):  
   """Cache for 500 seconds. Specify a custom cache key"""
    ...


@django_cache_decorator(time=0, cache_type='redis')
def reverse_geocode(lng, lat):  
   """Cache indefinitely with redis backend"""
   ...

How it works

When the @django_cache_decorator is applied to a function, it'll cache the results of that function. If no cache_key is passed, a cache key will be generated automatically from the function name and the arguments. See the function cache_get_key for details.

The decorator also supports the argument cache_type to specify which backend to use.

In April 2015, I worked on the websites for the critically acclaimed film, Ex Machina.

Ex Machina Official Website - I helped implement the desktop and mobile site.

Ava Sessions - I added the feature to Geocode the user locations with GeoIP and show contextual weather information. I implemented the backend API that received image uploads from the client and created various thumbnails and uploaded them to Amazon S3.

I also helped architect and implement the mobile website. Since the desktop site was built with React, it was possible to create a separate root component that reused but differently composed components from the desktop site.

Most credit, however, is due to Osk Studio for their design and coding.

Using polling to update an EmberJS Route's model

On a website where content is updated frequently, it is useful to have theses updates show up to other users without them having to press refresh.

A robust solution would be to use web sockets or a full library like OrbitJs. But a really simple solution is to just use polling.

Ember-Data models have a reload method which reloads itself from the server (see reload. It's really easy to wrap this call into a polling mechanism (setInterval). This works great when you just want to update one model (ie /posts/123). And then it's nice to package this into a mixin that can be added to any route.

Here's the code.

mixins/polling-route-model.js

import Ember from 'ember';

export default Ember.Mixin.create({  
  /**
   Property to store the interval
   */
  polling_model_interval: null,

  /**
   Create the polling interval
   */
  activate: function() {
    this._super();
    this.clearInterval();
    var self = this;
    this.polling_model_interval = setInterval(function() {
      var obj = self.get('currentModel');
      if(
          obj.get('isLoaded') 
          && ! obj.get('isDirty') 
          && ! obj.get('isSaving')
          && ! obj.get('isDeleted')
          && ! obj.get('isError')
          && ! obj.get('isNew')
          && obj.get('isValid')
      ) 
      {
        obj.reload();
      }
    }, 20000);
  },

  /**
   Destroy the polling interval on deactivate
   */
  deactivate: function() {
    this._super();
    this.clearInterval();
  },

  /**
   Helper to clear the interval
   */
  clearInterval: function() {
    if(this.polling_model_interval) {
      clearInterval(this.polling_model_interval);
    }
  },
});

routes/post.js

import Ember from 'ember';  
import PollingRouteModel from "../mixins/polling-route-model";

export default Ember.Route.extend(PollingRouteModel, {  
  // your route code
});