sharadsinha

Archive for March, 2012|Monthly archive page

Comment About Code Comments

In Design Methodologies on March 31, 2012 at 11:48 AM

Anyone writing a program in any programming language is encouraged to add comments to the code. Comments help in understanding code. Well yes, this is true as long as the programmer and a reader of a piece of code understand the language in which comments were added. Understanding any programming language is not difficult. They require one to know English. That’s all! However, code comments could be in the native language of a programmer. This is where lies the problem in understanding code comments (besides the usual case of ineffective comments). Code comments in Spanish would be of no use to a non-Spanish user/reader. Shouldn’t there be a universal language or way to add comments? Or, should it the be the case where comments c0-exist in multiple languages: native language of the programmer as well as in English,the universal language of business? Programmers may find it easier to understand comments in native languages (like Spanish, French etc.) while others may find it easier to understand if they were in English. I think that comments should serve both the original developer/programmer as well as anyone else who reads them.

Advertisements