South migration with dynamically generated data

When you add a new non-null field in Django models, and you use South to migrate the schema, it usually gives you two options: either add the default value for the field, or use a simple one-off value as default. This works as far as the new field is non-unique. If you are dealing with unique fields, you cannot provide a simple one-off value because it would immediately cause the uniqueness constraint to be broken, and having a default value for a unique field doesn't make any sense. Fortunately, South migrations are written in Python, and it's trivial to add custom dynamically generated data. This post will demonstrate the process of adding a unique slug field to an existing model and migrating the schema using customized migration.


Steam for Linux: full Steam ahead

Nobody can deny that Valve is serious about Steam for Linux after recent Half Life series and Counter Strike releases for the platform. Valve obviously wants to push this with even more intensity. Indeed, today's featured item is a big Tux with a cake, and 50% to 70% off on all Linux games.


Simple trick for managing JavaScript brackets in Vim

There are many ways to handle JavaScript brackets and braces in Vim, including autoclosing using plugins. In some cases, though, that is simply not enough. I will show you a few snippets you can insert into your ~/.vimrc to make things a bit easier in some situations.


GNU Screen: short guide to making your terminal awesome

You use your terminal for everything nowadays. You have at least two terminal windows open at any time, probably closer to a dozen. You've customized the heck out of your shell's startup, and added so many aliases and functions you don't even know how you remember all of them. If that's you, and you haven't yet heard of GNU Screen or used it, you're in the right place.


CoffeeScript and me

I keep seeing comments like "CoffeeScript? Nah. I take my JavaScript black." I remember when I used to look at CoffeeScript with the same kind of superiority complex. I was happy with my JavaScript skills. The language was easy to use, and it would bend to my will quite well. It was comfortable. I could do a lot of work with JavaScript, and I did a lot of work. But then again, I was doing a lot of work... when I could be doing less.