3 ms·
That's right, and I think that was the point of the author: > I may put a few words in a comment to explain why the code is doing what it's doing. If I find co
by mrtbld 13y ago
That's right, and I think that was the point of the author:
> I may put a few words in a comment to explain why the code is doing what it's doing. If I find comments answering 'what' or 'how', I take that as an indicator that the code is not written well enough.
- masklinn 13y agoSometimes you don't want to write the code "well enough" either, e.g. if you're reifying a standard algorithm I think it's a better idea to directly transcribe the original paper if possible, and stick as close to it as possible (including the usually dreadful naming conventions). And in that case I usually add the paper's pseudocode above the corresponding transcription as well to make the mapping even clearer.