Skip to main content
added 7 characters in body
Source Link

I strongly disagree with the "dont"don't write comments" responses  . Why? Let me point out by changing your example a bit.

public Uri UpdateLocation (); 

SOSo what does this function do:

  • Does it return the "update location"? or
  • Does it "update" the location and return the new location?

You can see that without a comment there is ambiguity. A newcommer can easily make the mistake.

In your example, it is a property so the "get/set" methods reveal that the second option is incorrect and it does indeed mean "update location" and not "update the location"  . But it is far too easy to make this mistake, especially in cases of ambiguous words such as "update". Play safe. DontDon't confuse a newbiesomeone new to this just for saving a few seconds of your time.

I strongly disagree with the "dont write comments" responses  . Why? Let me point out by changing your example a bit.

public Uri UpdateLocation (); 

SO what does this function do:

  • Does it return the "update location"? or
  • Does it "update" the location and return the new location?

You can see that without a comment there is ambiguity. A newcommer can easily make the mistake.

In your example, it is a property so the "get/set" methods reveal that the second option is incorrect and it does indeed mean "update location" and not "update the location"  . But it is far too easy to make this mistake, especially in cases of ambiguous words such as "update". Play safe. Dont confuse a newbie just for saving a few seconds of your time.

I strongly disagree with the "don't write comments" responses. Why? Let me point out by changing your example a bit.

public Uri UpdateLocation (); 

So what does this function do:

  • Does it return the "update location"? or
  • Does it "update" the location and return the new location?

You can see that without a comment there is ambiguity. A newcommer can easily make the mistake.

In your example, it is a property so the "get/set" methods reveal that the second option is incorrect and it does indeed mean "update location" and not "update the location". But it is far too easy to make this mistake, especially in cases of ambiguous words such as "update". Play safe. Don't confuse someone new to this just for saving a few seconds of your time.

Post Made Community Wiki by Warren P
Source Link
DPD
  • 3.5k
  • 2
  • 18
  • 22

I strongly disagree with the "dont write comments" responses . Why? Let me point out by changing your example a bit.

public Uri UpdateLocation (); 

SO what does this function do:

  • Does it return the "update location"? or
  • Does it "update" the location and return the new location?

You can see that without a comment there is ambiguity. A newcommer can easily make the mistake.

In your example, it is a property so the "get/set" methods reveal that the second option is incorrect and it does indeed mean "update location" and not "update the location" . But it is far too easy to make this mistake, especially in cases of ambiguous words such as "update". Play safe. Dont confuse a newbie just for saving a few seconds of your time.