Archives for the Month of July, 2007

Django shortcuts

I’ve exceedingly poor memory, so here’s my shortcuts.

python manage.py dumpdata > data.json
python manage.py reset registration
python manage.py loaddata data.json

JScript. Dynamic languages’ forgotten cousin.

Update 27 July 2007: Looks like there’s resurgent interest in serious Javascript use on the server-side.
In response to Han’s Nowak’s question of what new language to use, and since Python had to be excluded, may I suggest JScript.NET?
(I’ve moved most of the technical aspects of the discussion over to the Python, Zope and dotNET [...]

Is a washing machine actually good for us? And other subversive thoughts

Check out this ABC radio interview. The story leads in with an interesting study that shows that the comfortable indoor temperature has risen over the years and this means more heating costs. But why?

Digging a hole for ourselves

India is outraged, and so they should, given the shabby treatment of Dr Haneef by the Australian authorities.
More worrisome is that polls in Australian online newspapers show about 50/50 support for the government’s stance to revoke the doctor’s visa. It just goes to show how deep the paranoia runs, and how hard the government is [...]

Soprano’s Finale - Did He Die?

The Sopranos Finale Explained:
But in reality, when you die, it ends. There’s no more; you don’t get to see the reactions of other people to your death. You don’t get to do anything.
Subscribed

Kalpana Chawla Rebirth and What to Make of It

Here’s a recent piece on the apparent rebirth of Kalpana Chawla, who perished in the Columbia shuttle disaster back in 2003.
The curious and interesting part is actually right at the end:
Upasana was born barely two months after the astronaut`s death in 2003
This begs the questions:

why not 9 months?
does this mean there might [...]

More Spreadsheet Innovation

Readers are probably aware how fond I am of spreadsheets as a tool for rapidly prototyping applications. Here’s another implementation of spreadsheets based around IronPython, but addresses issues like shared updates.

Ubuntu 7.0.4 Feisty Fawn on Vmware

Just make sure your VMWare virtual hard disk is at least 2.5 Gb.
Ubuntu will not install properly from LiveCD (which is the default download) when the virtual hard disk is 2.0 Gb. Grub

A Python curl

It happens that I often have to dial into users sites to troubleshoot problems, and they usually run our Python software on Windows. Since I often don’t have access to tools like curl, I’d like to present the next best thing. A command-line interface to urllib2 which uses the same options as curl. This script [...]

Junk DNA is not Junk Code

Tyler writes:
DNA is wasteful, highly error-prone with regard to copying-fidelity and is incredibly susceptible to post-hoc substitution and modification:
I think you should check out this article on Junk DNA in ScienceCentral:
If it’s not in our genes, maybe it’s in our junk. So-called “junk DNA” may turn out to be just as important as our much [...]

Exactly how hard is it to encode and decode RFC2396 in ASP.net?

Yang Xing reports:
Developer [sic] should avoid encoding Space into “+” or double encoded into “%2b”. It is recommended that when encode [sic] URL use “System.Uri.EscapeDataString”, when decode URL use “HttpUtility.UrlDecode”
Sigh. There are days when one just wishes one’s back in Python-land.
Contrast with the following Python-equivalent:

>>> urllib.quote(’255 m’)
‘255%20m’
>>> urllib.quote_plus(’255 m’)
‘255+m’
>>> urllib.unquote(’255%20m’)
‘255 m’
>>> urllib.unquote_plus(’255%20m’)
‘255 m’
>>> urllib.unquote_plus(’255+m’)
‘255 m’

On Hyperlocal News Sites

Terry Heaton summarized why the Backfence experiment failed. Of note, is the distinction between hyperlocal versus hypertargetted. Increasingly, the physical world is so small that people who share common interests no longer live in the same town, or in the same country.
Out in Toowoomba, population circa 100,000, a lot of people forgo buying the [...]