Occasionally, I have an issue where my grammar is bad. I can’t count how many times this problem when I comment my code. I always thought it was a cut and paste issue or a typo, but how come I could never catch it when proofreading? Then, I realized that my problem may be in my proofreading.
For example, read the following text:
Many readers are not aware that the
the brain will automatically ignore
a second instance of the word “the”
when it starts a new line.
Now read the same text, with the line breaks in different position:
Many readers are not aware that the the
brain will automatically ignore a second
instance of the word “the” when it starts
a new line.
See the problem? This is called a lexical illusion. It is more prominent now than ever because of the use of IM, text messaging, and email. It appears in documents that are written in text editors rather than word processors, because most word processors have grammar correction. When proofreading, people often miss the errors because brains like to process information fast and lazily. When we read from one line to the next, our brain is willing to filter duplicate or redundant words at the beginning of a line. It takes extra concentration to catch the illusion.
Reflecting back, I noticed that it often happens when I shorten or lengthen existing code, rather than creating new comments. So, I have to make extra effort to find when this happens.