I love JavaScript compression and I try to use Julien Lecomte’s YUI Compressor as much as I can. Unfortunately, compressing every file manually on each deployment, or at each update is a hard habit to get into, and it’s also extremely boring. Now that I have implemented automated deployments using Fabric, I decided to automatically minify all my JavaScript files before each deployment as well.
I finally added comment functionality to the blog (more on that later), and while writing the JavaScript module for comments, I wanted to have the ability to move the browser’s viewport to different parts of the page. Simply making the page jump around seemed a bit crude - thanks to jQuery, animating the scroll action is very easy.
A snippet that provides a notifications middleware using sessions. This is much more useful than the contrib.auth message system, since it will work with anonymous users as well. It looks like it will make it to the Django’s contrib.sessions at some point (ticket #4604 is almost there), but in the meantime, this stand-alone middleware will do the job.
When I am doing JavaScript development, I prefer to put all my code under specific namespaces. For instance, if I am doing a personal project, I’ll stick everything under a “core” space, and build additional spaces underneath such as “Comments”, “Utils”, etc. The problem with this approach is, every time a new namespace is being created, I have to check to make sure every space before it is already there. So I ended up writing a very simple jQuery plug-in that takes care of this task for me.
Clever idea, but it’s definitely scary. They buy 20% of your Twitter account for 30€ per month and insert advertisements into your timeline. If anyone I am following did this, I would promptly take them off my list.
© Copyright 2001-2010 Taylan Pince. All rights reserved.