Contents tagged with comments

  • When To Comment Your Code

    My opinions on comments in software code have evolved with my experience.  When I was a teenager first learning to program for real, I rarely used comments unless the code was for an assignment, in which case it was a forced exercise every bit as much as teachers’ requests to “show your work” added verbosity to my math and science problems’ solutions.  Of course, the programs themselves were quite simple, and the languages used (BASIC, Pascal) didn’t really support OOP (not that I knew what that was).  And it was important, then, to be able to express the intent of the code in English, if only so the instructor knew what was being attempted.  … more