Archive for May 30th, 2007

HowTo: Write more comprehensible code

May 30, 2007

Here are six tips on writing maintainable code; via /.: The tips are

  1. Comment like a smart person;
  2. Use #define a lot; No, a LOT;
  3. Don’t use variable names that will mock you;
  4. Do error checking. You make errors. Yes, you;
  5. “Premature optimization is the root of all evil” — Donald E Knuth; and,
  6. Don’t be too clever by half.

Go to the article for detailed explanations of each tip with sample codes. Have fun!

Making peer-review process transparent

May 30, 2007

Ariberto Fassati, in a letter to Nature, suggests the following:

I therefore propose that journals’ records should be made publicly available after an adequate lapse of time, including the names of reviewers and the confidential comments exchanged between editors and reviewers. The Nobel Foundation makes all its records available after 50 years, as do many governmental and other institutions. This delay may be reduced for scientific journals to, perhaps, 15 or 20 years. This is also likely to have a positive impact on the peer-review process itself.

However, my take on this suggestion is a bit different; the peer review records should be published along with the paper–it will surely have a positive impact on the peer-review process. If the reviewers of any review insist on anonymity, in those cases alone, the reviews can be published withholding the names of reviewers, which can be made public, say after 10 years or so.

Stevenson under the palm trees

May 30, 2007

I finished reading Alberto Manguel’s Stevenson under the palm trees; it is a small book of about 100 pages (with illustrations using Stevenson’s own woodcuts). I also understand from a note at the end of the book that some names, expressions and descriptions are from Stevenson’s correspondence.

Some sections of the book gave me a deja vu since I am reading this book immediately after his reading diary; for example, here is a passage, where Manguel sneaks in the etymology of the word nostalgia:

The word ‘nostalgia’ (he remembered reading somewhere) had been invented in the seventeenth century by an Alsatian student in a medical thesis, to describe the malady that afflicted Swiss soldiers when far from their native mountains. For him it was the contrary: nostalgia was the pain of missing places that he had never seen before.

So is the title (and the quote on the dedication page from Goethe’s Elective affinitiesNo one wanders under palm trees unpunished).

Even after reading “With obvious echoes of Stevenson’s Jekyll and Hyde” on the cover page, the book managed to surprise me somewhere around the 90th page–to that extent it is a successful thriller. However,  I could not allow myself to be completely carried away by the fantasy (which might have to do with the fact that I associate Stevenson’s last days with his extraordinary  (and, must-read) Child’s garden of verses).

Bottomline: A breezy read; those who had read Stevenson’s correspondence, biography and books very carefully might enjoy it more.

Before I end this post, here is the complete review of Stevenson…:

Stevenson under the Palm Trees is a subdued Stevensonesque tale with a decent literary twist to it. Manguel comes close to striking the right note in the writing, though the effort of integrating fact and bits of Stevenson’s own writing does show. The Doppelgänger-play is a weighty burden (Jekyll and Hyde inevitably imposing themselves on the tale), and Stevenson’s illness — making for lots of haze and lost time — perhaps too simple a device, but it’s a decent little historical literary (semi-)thriller.