Archive for the ‘Uncategorized’ Category

I was going to respond to this on genehack, but recovering my password proved to be onerous, and besides, the issue is an important one worth discussing.  John SJ Anderson wrote: Elf digs into some Javascript on a particular high-traffic site. In the same way that some people love reading about high-performance cars or bikes they’re [...]

24Mar

An awesome truth!

Posted by Elf Sternberg as Uncategorized

From twitter: TheOnion.com has migrated to Django. If you don’t understand this, please register with your local unemployment office.

I recently had to convert a few GIMP palettes into color schemes for a website, and since I’m very fond of LessCSS, I decided to create LessCSS variables and use that as a plug-in to my CSS.   The trick was converting on the fly; GIMP palettes store their variables in decimal, and I like [...]

In my current development house, we have the painfully obvious “different settings for different stages of the development cycle.”  Production, obviously, isn’t in DEBUG mode so users don’t see the underlying technology when things go awry, and each dev has his own database.   The solution we’ve found is to create separate settings files with [...]

I need to make clear that I did not invent the code below. I’m not sure who did, but the topic of making vi’s “paren bounce” feature work in Emacs came up in a conversation I had the other day, and I’m posting the chunk of code that’s lived in my .emacs file since, oh [...]

This is probably a “no-duh” to some people, but I had not known this. When you upload something to the CDN, you get a url that looks like this: http://cdn.mycompany.com/images/someimage.jpg Which is all fine and good. Django’s MEDIA_URL is usually suffixed with a closing slash, meaning that if you’re in the habit of typing something [...]

15Feb

Lesson learned…

Posted by Elf Sternberg as Uncategorized

A few weeks ago, I installed the latest version of the Gnome Accessibility Toolkit (Gnome-AT), and while I never quite got it to work the way I wanted to, it didn’t seem to be doing any harm.  I figured once I got to the point of showing the client the work we’d talk about accessibility [...]

Functional. Elegant. Foolproof. Pick two.

Like many designers, I’ve been enjoying Clients from Hell, a collection of various incidents freelance designers and developers have had working with customers over the years.  Oh, boy, do I know some of these.  But there’s one that stuck in my craw: “Slow It Down.”  The basic complaint is common to Ajax-based applications: if you’re [...]

For multi-select boxes where you have a list of things you want to filter on, and you want the queryset returned to be an OR’d set. qset = Q(mode__exact=modes[0]) if len(modes) > 1: for mode in modes[1:]: qset = qset | Q(mode__exact=mode) r = Responses.objects.filter(qset) Now, I need to figure out how to do this [...]