No Shit Sherlock Comments

Good to know

A no shit sherlock comment looks like this:

def get_range(x):
    """
    gets the range
    """

It's comments like these that lead many developers to think that comments should be banned.

Comments like these don't help and people don't like them and are often very vocal about not liking them. Yet they still appear. This is largely because of the mindset developers have when they write the code - when your [head is in the code], context is obvious and why is obvious, but it is not obvious that they are not obvious. However, it is obvious that you must write something as a comment so most developers write something obvious.

Communal code commenting can help cut down on this type of comment.

  • What is a no shit Sherlock comment
  • Some people want to ban comments
  • Some people think that you should only write why
  • Capture conversations about code.