first post in a long while

Unfortunately, I’ve had a massive workload over the last couple of weeks and as a result I’ve completely forgotten about this blog and haven’t posted to it.  I will try to post as much as possible over the next couple of weeks to make up for this.  Since I do alot of coding for my classes, I usually have a large amount of subjects to blog about.  The first subject, I would like to talk about is commenting code. As everyone knows, comments can make or break the code.  It allows the reader to know exactly what you’re doing and how each part of your code contributes to the whole.  Since comments are so important, I’m finding the lack of standardization on comments a little disturbing.  While there are various guidelines to how one should comment code, I firmly believe that there should be some sort of industry standard on code commenting, especially between different programming languages.  Even in the same programming language, there are so many different ways to comment your code and every person has a completely different way of doing it. For example, when coding in C, I prefer to add a short comment at the end of a line with // where I need to explain anything.  However, some of my professors like to use /* */ blocks on top of the code section, even when very little explanation is required.  I find that this sometimes disrupts the flow of the code.  You may be reading something and all of a sudden a big comment block pops up out of nowhere, and it potentially might not tell you anything important.  Additionally, different commenting styles can result in random placement of code that results from differences in indentation.  Someone may be using tabs and // after lines to comment and it may look perfectly fine in one development environment, but someone else opening the file up may have skewed commenting due to different screen sizes and tab/space differences.  Without some sort of standardization, individual commenting styles can be cluttered and messy. I also think there should be some sort of standardization across programming languages.  For example, python coding uses #, C coding uses either // or /**/, and I believe HTML uses <!– –>.  While it is understandable that they are all different for different reasons, if all coding languages had the same comment markers, it would streamline the process.  Adding that to a commenting standard that specifies where, when, and how to comment, it may potentially allow any programmer to read code in any programming language.  This can be good for both education and practical purposes.

Leave a Reply

Your email address will not be published. Required fields are marked *