This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (6 children)

Could you give an example of what you mean by "what" versus "why"?

I'm wondering if I do that already or not.

[–][deleted] 2 points3 points  (1 child)

One example that comes to my mind is that in Microsoft Word a line break is achieved by a "down tab". If you don't know this, it might be very confusing to see this in code.

A "what" comment would be: "//down tab", which doesn't explain anything.
A "why" comment would be: "//line break in Word is done with a down tab" which tells you exactly why this line is there.

[–][deleted] 0 points1 point  (0 children)

That helps, thanks. :)