Chapter four is about writing comments. This chapter surprised me by saying comments are not typically a good thing. They make up for poor code that does not explain itself. This contradicts what I have learned throughout my few years coding here. I usually lose points on assignments if I do not add a great deal of comments explaining my code. This leads me to believe that my teachers do not expected us to write professionally when making our code. The chapter talks about using TODO comments. That is a practice that I have done when I know I will be taking a break from writing that part of the code with the intent of coming back to finish it. If you can avoid using comments by writing self explanatory code, then you should do so. However, when this isn’t possible, you should write short comments that explain what is happening in the code.
From the blog chanson2016 by chanson2016 and used with permission of the author. All other rights reserved by the author.