Archives for the Month of April, 2007

When a blog post about Linkbait is Linkbait

This has to be the most surreal experience I’ve had of the web ever. Jason Calcanis, the master of publicity embarks on an audacious linkbaiting scheme by merely talking about linkbaiting. The last time this happened was when Alex Barnett posted about how to game memeorandum.

Continuation Sandwich

An old post, but a good one (via Etymon):
Say you’re in the kitchen in front of the refrigerator, thinking about a sandwitch. You take a continuation right there and stick it in your pocket. Then you get some turkey and bread out of the refrigerator and make yourself a sandwitch, which is now sitting on [...]

Python Tip: Escaping Strings to C-style encodings

Wai Yip Tung contributed a useful snippet in the Python Cookbook for escaping non printable characters in python to C-style equivalents. It uses an undocumented part of the standard python library. Very neat.

>>> a=”ABC\\nDEF”
>>> print a.encode(’string_escape’)
ABC\\nDEF
>>>

Uh oh what a forum thread

Via Reddit. The greatest forum post of all time.
Incidentally, can any Indian readers tell me if it’s actually the polite form? I’ve received resumes in this style. No kidding.

PullDOM with Python Tutorial/Documentation or Code Sample

The PullDOM documentation is pretty dismal, especially because it’s a library worthwhile learning. If you have to process a large XML document (having a huge DOM tree can consume a lot of memory), but prefer not to use a SAX style interface, because the code can be difficult to understand, then PullDOM is your [...]

Turn on No-follow Wordpress RSS feeds

This change helps keep pages out of supplemental index, preserving PageRank in your content pages.
/wordpress/wp-includes/feed.php

92 function comments_rss_link($link_text = ‘Comments RSS’, $commentsrssfilename
93 $url = comments_rss($commentsrssfilename);
94 echo “<a rel=’nofollow,noindex’ href=’$url’>$link_text</a>”;
95 }

Python in the Enterprise

James Governor points to a report how Twisted Python is used by ITA software in the airline industry.
By the way, if you haven’t added James’ RSS feed to your feed reader, you should. His posts brings a lot of mundane programming tasks back into perspective.

Link for the day

7 exercises you can do to reduce your double chin [link]
I didn’t know you can exercise that chin away . :)

Metaphors gone bad

This essay by Lee Iaoccoca contains an interesting juxtaposition of two metaphors:
We’ve got a gang of clueless bozos steering our ship of state right over a cliff

Man-Made Global Cooling

One point that hasn’t been raised enough in the global warming effect, is that man-made agents triggered three decades of global cooling mid last century. Throwing more pollutants to effect climate-change is probably anathema to environmentalists, but for engineers, it has to be studied as a serious option.
Here’s an excerpt from the climatogists’ response [...]

Parallel Universes and Lara Croft

Field’s medallist winner Terence Tao explains how parallel universes and quantum mechanics can be possible by way of Tomb Raider.
In trying to come up with a classical conceptual model in which to capture these non-classical phenomena, we eventually hit upon using the idea of using computer games as an analogy. The exact choice of game [...]

11 exercises for evaluating a language or framework

Prashant lists 15 exercises for learning a new computer language. Here’s my 10-point approach (fair bit of overlap with Prashant’s):
(Hint to people writing documentation for their languages: cover these points and people will be able to get to work quickly with your creation. Sure there are lots of nooks and subtleties in every system, [...]

Paediatric Allergist Melbourne

In a couple of years, my brother will hopefully be setting up a private practice for helping kids with allergies.
Allergies are scary. I have to have an epipen around the house, and make anaphylaxis action plan known to the school. Statistically, an accidental exposure occurs about once every two years. We just had [...]

Mosanto and rBST

When my sister went to work in the U.S. a couple of years ago, I was surprised to hear that milk producers who don’t use growth hormones aren’t allowed to mention that they don’t, simply because Mosanto had sued them on the basis that merely stating that milk don’t use growth hormones imply that growth [...]

Continuations and BASIC programming

I came across this very nice through the web programming in BASIC (demo made in Wink). Now, hopefully Guido can see why Python needs continuations? The developer has an affinity for Smalltalk, and you can see that he’s really leveraged it well here.
Also check out http://runbasic.com.

Contextual Comment Spam

The blogosphere would be interested in this. I think I’ve received a web 2.0 comment spam. (Which I have unfortunately deleted)
This one posts a relevant comment scraped from another blog about the same topic (in my case Kathy Sierra’s post about being harrassed online). The name of the poster is in Chinese 发电机(meaning electric generators [...]

The little csv module that could

The CSV module in python can process more than just CSV files. It can also handle tab separated ones.
In fact, it has an in-built sniffer to guess what type of delimiters the file is using. This includes guessing whether strings are quoted or not.
Here’s some sample code:

dialect=csv.Sniffer().sniff(open(’fitted.txt’, ‘r’).read())
for column_1, column_2, column_3 in \
[...]