Archive | Technical Stuff

07 March 2012 ~ 12 Comments

Django Settings for Production and Development: Best Practices

When you’re just starting out with Django, it can be overwhelming to see there’s no standard approach to deal with settings. However, there are a few simple best practices that work when you start needing more than the basic settings file. What’s the problem? Django stores all the settings in a project-wide settings.py file. All [...]

Continue Reading

26 January 2011 ~ 2 Comments

Order in an Asynchronous World: How Twisted Inline Callbacks Work

The other day, a colleague wanted to know how to avoid callback-cascading coding style in Twisted. The traditional model of writing programs in Twisted is to use callback functions, which lead to hard to understand and hard to maintain programs. For example: Can we make it more readable? Yes! We can use inline callbacks to [...]

Continue Reading

30 December 2010 ~ 1 Comment

Using Memcached to Store Semi-Persistent Data

My last article, Do Not Use Memcached As a Data Store, received a fair amount of criticism all going along the lines of “Duh. Of course it’s pretty stupid to use Memcached to store data, as it’s meant, as its name indicates, to be a CACHE stored in MEMORY (Memcached, duh).” Since it seems my [...]

Continue Reading