Attention readers: This blog has moved to a new home at https://chenghlee.wordpress.com/.

Thursday, May 15, 2008

Commenting code

It pays to reread your code and its comments from time to time; while reviewing an analysis script I wrote this morning, I noticed this particularly politically insensitive comment:

# Purge people of "other" ethnicities

Needless to say, I removed this comment so as not to leave the impression that I am in favor of genocide.

For those who are curious, this comment was attached to a line of code that removes data from subjects whose ethnic backgrounds we are uncertain about. Without doing so, it becomes difficult to correct for the effects of population admixture in genetic analyses.

No comments: