Can you show us any concrete examples of high quality, comment-less codebases? The last (mostly) comment-less source that I read through last year was Node.js and I wouldn't exactly call that high quality or well documented.
Can you show us any concrete examples of high quality, comment-less codebases? The last (mostly) comment-less source that I read through last year was Node.js and I wouldn't exactly call that high quality or well documented.
No.
Quite simply, there is a collective perception that if a codebase lacks inline comments, it's of poor quality. Very few would dare to publish such a work.
I have a different challenge for you.
Take a high quality codebase and delete all the inline comments. You'll find it's just as readable, if not more so. How much better would it have been if the coder had spent the time writing better code rather than adding superfluous comments?
None of these contribute directly to achieving a theoretical maximum output of SLoC. If that's you're metric, I don't think it's a good one.
Aside from niche projects - A great deal of time goes into realising software. The incremental cost of comments is minuscule.
I have lots of challenges and bottlenecks. The time to type comments isn't one of them.
That's certainly not my metric and I definitely don't believe it's a good one.
My metric is readability. The ability to return to a piece of code 6 months down the road and be able to understand precisely what's happening.
> I have lots of challenges and bottlenecks. The time to type comments isn't one of them.
Oh, I know. It's very easy to add a comment that you think will help clarify things down the road, but instead, ends up being more cryptic than your code.
By definition, a comment is something short and half-thought out. It's a comment.
As I said in the post up above, stay away from comments. If you have to annotate, write documentation instead.
Who is the authority on whether commentless code is good or not? Could this possibly be completely subjective? Hmmm.
> Oh, I know. It's very easy to add a comment...but [it] ends up being more cryptic than your code.
You don't know that :)