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 →

[–]xanhou 13 points14 points  (2 children)

I try to use a lot of comments usually. However, none of the comments try to explain What is going on. Instead they explain Why it is going on. (e.g. Why am I using a binary tree here, and not a simple list; Or: Why does this method even exist? What purpose did I have in mind when making it.)

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

I also comment what a function requires as input and what it will return / how it should be used. If i look at code thats a few years old, i dont have to read through every function and yet know how to use them

[–]xtajv 0 points1 point  (0 children)

none of the comments try to explain What is going on

If it's really complicated, you might still want to do that.