3 ms·
I don't think the answer to this questions is "comment your code", it's "give your functions meaning full names". Commenting is great, but you need to know how
by pedalpete 13y ago
I don't think the answer to this questions is "comment your code", it's "give your functions meaning full names".
Commenting is great, but you need to know how the program is put using meaningful function and method names not only when they are declared, but also when they are called/passed.
I use comments when I've taken a non-obvious path with the code, and I explain why in comments. I think that is what comments are for.
- johndcook 13y agoMeaningful function names are a good start. But they can only answer "what" and not "why."