A few days back I was reading an article on Coding Standards. There are a few articles and even books available on this topic. Following coding standards consistently, I believe is very important for a software development team. Coding standards are not written in stone. They are guidelines for making software code more readable. Like most guidelines they can be, and usually are customized for individual teams. Most teams have well defined ways in which they structure their code and name variables, methods, classes, etc. The specific standard a team adopts is not as important as the practice of ensuring that the entire team adheres to the same standard.
Comments are an integral part of any program, even though they do not contribute to the logic. Appropriate comments add to the maintainability of a software. I have heard developers complain about not remembering the logic of some code they wrote a few months back. Can you imagine how difficult it can be to understand programs written by others, when we sometimes find it hard to understand our own code. It is a nightmare to maintain programs that are not appropriately commented. Java classes should contain comments at various levels. There are two types of comments; implementation comments and documentation comments. Implementation comments usually explain design desicisions, or a particularly intricate peice of code. If you find the need to make a lot of implementation comments, then it may signal overly complex code. Documentation comments usually describe the API of a program, they are meant for developers who are going to use your classes. All classes, methods and variables ...
Comments