Archive for July, 2006
Tuesday, July 25th, 2006
Python DSU sorting idiom
One of the more unique Python idioms is the Decorate-Sort-Undecorate (DSU) sorting method used to optimize sorting performance.
PythonWiki describes it’s function as a combination of three steps:
First, the initial list is decorated with new values that control the sort order.
Second, the decorated list is sorted.
Finally, the decorations are removed, creating a list that contains only […]
2 Comments » - Posted in Python, Programming by dkaz
Monday, July 24th, 2006
Smarty variable modifiers
I’m playing around with a PHP framework that uses Smarty Templating Engine to separate logic from its presentation, and I’m very impressed thus far.
Smarty seems to pull off elegant API, powerful features and oustanding performance - a rare triumvirate.
On top of that, it has a vibrant community and a ton of documentation scattered around the […]
1 Comment » - Posted in Programming, PHP by dkaz
Saturday, July 22nd, 2006
ETag and Last-Modified Headers
While building a feed aggregator into a project of mine, I ran into a usage of a HTTP header unfamiliar to me before today.
From the documentation of the (very excellent) python feedparser project:
ETags and Last-Modified headers are two ways that feed publishers can save bandwidth, but they only work if clients take advantage of them. […]
No Comments » - Posted in Python, Programming by dkaz
Saturday, July 22nd, 2006
Tetrominoes
According to Wikipedia…
A tetromino, also spelled tetramino or tetrimino, is a geometric shape composed of four squares, connected orthogonally. This is a particular type of polyomino, like dominoes and pentominoes are. The corresponding polycube, called a tetracube, is a geometric shape composed of four cubes connected orthogonally.
Sound familiar? It should. Here are a couple of […]
No Comments » - Posted in Interesting by dkaz
Sunday, July 16th, 2006
Japan SAQ
If you’re interested in learning more about the Japanese culture, check out the outstanding JAPAN SAQ (Seldom Asked Questions).
Q. My Japanese wife and friend both insist that Japanese babies have a blue spot on their butt when they’re born. Is this true? - Question submitted by Glen.
A. Most Asian babies have blue marks on their […]
No Comments » - Posted in Interesting by dkaz
Saturday, July 15th, 2006
Referencing “request” in Django templates
Django was kicking my ass tonight, as I struggled to figure out how to reference HttpRequest parameters in templates. It’s 2:00AM and I finally arrived at an answer - default TEMPLATE_CONTEXT_PROCESSORS in settings.py is missing “django.core.context_processors.request”. You can override the settings by explicitly setting it in settings.py:
TEMPLATE_CONTEXT_PROCESSORS = (
“django.core.context_processors.auth”,
[…]
2 Comments » - Posted in Python, Programming by dkaz
Thursday, July 13th, 2006
LLUP Protocol - Can’t wait
LLUP Protocol is exactly what Web 2.0 needs to jump into 3.0 mode. Hope Tim Bray rolls up his sleeves and start producing soon.
1 Comment » - Posted in Programming by dkaz
Thursday, July 13th, 2006
Greek Alphabet
Every once in a while (usually when I’m studying mathematical text) I get motivated to learn the Greek alphabet - from alpha to omega.
Signed,
Δερεκ
1. alpha Α, α (a)
2. beta Β, β (b)
3. gamma Γ, γ (g,n)
4. delta Δ, δ (d)
5. […]
1 Comment » - Posted in Math by dkaz
Wednesday, July 12th, 2006
How fast can you type?
Time your speed here.
I’m about 80 WPM (with 2-4 mistakes per para). Pretty damn sad.
IntelliJ has spoiled me.
2 Comments » - Posted in Programming by dkaz
Saturday, July 8th, 2006
UNIX symlink ~= Windows junction
Need to do create symbolic links on NTFS? Try using Junction.
No Comments » - Posted in Programming, Windows by dkaz
Thursday, July 6th, 2006
GoDaddy.com Booking Path - Worst Ever?
Wow. I just bought a domain through GoDaddy.com and I’m absolutely SPENT!
It is, by far, the worst booking experience I’ve ever had - it takes a fucking half hour to actually get to the purchase button.
Can you possibly squeeze more upsells into a booking experience? Who the hell is running that place?
2 Comments » - Posted in Technology, User Experience by dkaz
Thursday, July 6th, 2006
Simpson’s Paradox
One of the most interesting statistical phenomena I’ve run into is the Simpson’s paradox, in which the successes of several groups seem to be reversed when the groups are combined.
According to Wikipedia, this seemingly impossible result is encountered surprisingly often in social science and medical statistics, and occurs when a weighting variable which is not […]
