Weblog

Time taken

Thursday, 24 July 2008

Time taken from home to work:

Tram 55min. One change at the Hague central. Packed, and seats are seldom available. Too many stops on the way.
Bicycle 45min. Too many traffic signals, and the distance is long. Influenced by the weather—strong winds, snow, or rain often play spoilsport.
Train 40min. Fairly quick, few stations, but reduced number of trains in Summer, and therefore, often a long waiting time.
Car 9min. Few traffic lights, and fewer traffic jams.

This is interesting because it clearly shows the mode of transport that wins hands down—in terms of time taken, weather, and other influences. And I wish it wasn’t so obvious.

  • Tombuntu: “Updating CheckGmail to fix login errors.”
  • Indiatime: “More than a hundred years ago, a South African ticket collector threw an Indian called Gandhi, out of the train, for having occupied a first class seat. Hundred years later, in independent India, the cycle of tyranny still continues, albeit under a government of natives.”

Revision management in WordPress 2.6

Tuesday, 22 July 2008

Revision management is exactly the kind of crud I don’t require as part of the WordPress core, especially because of the way this new feature manifests itself in the database.

But the developers seem to be going for “more is more” in recent times, features wise, and against their original philosophy of “less is more,” which won them fans to begin with.

I wish I didn’t have to add define('WP_POST_REVISIONS', false); to my config file. But what the hell, it’s a tiny annoyance for using an otherwise state of the art blogging engine.

Pedal pushers

Thursday, 17 July 2008

A movement is afoot—if you believe this article in India Today. This is serious stuff folks. Govind says he’ll now cycle to work while his Honda stays home.

Of course, getting a good geared bike is paramount for cycling in a country like India. Or else, it doesn’t take long to shoot your Vastus lateralis beyond flagging levels, thereby rubbing your enthusiasm the wrong way.

My visiting parents are awed by the way the Dutch cycle—not just the young, but old, and some very old folks indeed. A couple in their 60s and 70s riding together is truly inspiring. While unsure of their balance, they promised they’d try after all these years.

What’s needed now, and direly, is some infrastructure. If every town hall in every town, and city could take the initiative to construct uninterrupted cycle paths and amend/reinforce some safety laws helping cyclists, then there’s no stopping people from having fun, saving money and get some exercise in the bargain, while helping ease the oil burden on the state.

  • Forbes: “Want to know how well a company protects its customers’ data? Don’t talk to its security and compliance officers. Instead, try its marketing department.”

Overriding posts displayed

Wednesday, 16 July 2008

I typically display 9 posts per page—by design, on this WordPress powered site. As an unintended consequence, my monthly archives page, and my search results page would show a paged list of 9 posts. How annoying.

The call query_posts fixes this problem. By adding this following line before the loop, I am able to list my entire monthly archive displayed in a page (thus effectively overriding my 9 posts limit that I set in Dashboard → Settings → Reading):

<?php query_posts($query_string.'&posts_per_page=-1'); ?>

The value -1 set for &posts_per_page lists everything in one page. For search results, however, I’d prefer to restrict the list to 50 per page. Easy:

<?php query_posts($query_string.'&posts_per_page=50'); ?>

The result: a typical monthly archive, and a typical search results list.

For fun, try removing $query_string. from the first line of code above, and you’ll notice how it produces an entire list of posts ever written. Archives, Sitemaps anyone?

  • TheStreet.com: “Why we may never see $80 oil again.” [via Sharma]
  • BBC: “The addiction has become too costly for our pockets, our planet and security. Even the oil man (Head of Shell America) agreed that his company Shell Oil might be called something different ten years from now. It is not that oil is running out—this we also established is a fallacy. But we do not need it to run out for us to change our ways.”