How to deal with tautology in comments?
- by Tamás Szelei
Sometimes I find myself in situations when the part of code that I am writing is (or seems to be) so self-evident that its name would be basically repeated as a comment:
class Example
{
/// <summary>
/// The location of the update.
/// </summary>
public Uri UpdateLocation { get; set; };
}
(C# example, but please refer to the question as language-agnostic).
A comment like that is useless; what am I doing wrong? Is it the choice of the name that is wrong? How could I comment parts like this better? Should I just skip the comment for things like this?