5 ms·
What? No, it's got nothing to do with commenting. It's to do with basic code design: put your stuff in functions. A line like that should have been in a functio
by RyanZAG 13y ago
What? No, it's got nothing to do with commenting. It's to do with basic code design: put your stuff in functions. A line like that should have been in a function to start with, and it should have been caught during a code review or as common sense by the committer before he even committed.
- etler 13y agoThe point of the article has nothing to do with the code snippet. My point has nothing to do with the code snippet. It's just about code in general, and it's never as easy to understand as you want it to be.
- aidos 13y agoAgreed. Maybe it's in some insane tight loop where you don't want a function call - in which case you comment it. My rule is that if there's something I have to put in the code that's out of the ordinary, I comment to explain.
- stcredzero 13y agobasic code design: put your stuff in function Aye, and with intention revealing names! http://c2.com/cgi/wiki?IntentionRevealingNames http://c2.com/cgi/wiki?IntentionRevealingNames Also: http://c2.com/cgi/wiki?LawOfDemeter http://c2.com/cgi/wiki?LawOfDemeter