August 2012
1 post
2 tags
A Fairly Low Ceremony Method for Modularizing...
Updates
No longer wrapping modules in def require
Using pkgutil and inspect to get module names and constants
Every time I need to add anything to settings.py in Django, I find myself spending a good minute trying to find a logical place to put it. But it’s always the same. I give up, put it somewhere arbitrary, and move on feeling cheapened, dirty, and defeated. There must be a...
June 2012
2 posts
1 tag
Sharefix vim plugin →
Have you ever wanted to keep your quickfixes available when running different commands and functions in vim? Now you can.
3 tags
Sass One Liners →
I always have trouble remembering the syntax for linear gradients, especially the legacy webkit version. It would be nice if compass had a repl that you could execute compass’ CSS3 mixins and functions in and get the nicely prefixed properties out. Well it does!
compass interactive
Here we go:
>> background(linear-gradient(white, black))
background(linear-gradient(#ffffff,...
May 2012
1 post
1 tag
Prefetch Images With Javascript
This one is an oldie but a goodie. If you ever need to swap out the src on an image tag you can prefetch images with javascript to make the swap instant after the page loads. All you need to do is create an image element in javascript and assign the url to the src. The browser will request the image immediately regardless of what you do with the image element. You can try this out in the network...
April 2012
1 post
2 tags
Vim Python Complete Function
I finally found a nice complete function setup for python in vim. It’s simply using rope-vim’s code assistance but there are a few settings you need to enable. I should note that I was clued in on rope and a ton of other great plugins through a nice article by John Anderson on using vim as a python ide. You can follow his setup or I use janus so I dropped them into my janus folder as...
February 2012
1 post
1 tag
Bret Victor - Inventing on Principle →
Summary
Devoting yourself to a principal isn’t confined to social services for example, you can take a stand on a principal in technology too. This transforms your view from ‘how can I turn this problem into a viable product?’ into ‘how can I prevent this problem from hindering myself and others?’.
Finding your principal can take a while, but when you do, it will...
December 2011
1 post
1 tag
Web Art
I recently read Paul Graham’s essay Hackers and Painters and it solidified a few reasons why I enjoy programming for the webs. Graham uses art as an analogy for different aspects of programming. A couple of his points stood out: That programming is not all theory and algorithms as most assume. And that dynamic languages are superior in that they lend themselves to the creative process.
...