Quantcast
Channel: Active questions tagged code-formatting - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 189

Do you agree that questions/answers on Stack Overflow should be included in code blocks as comments instead of long explanations?

$
0
0

What people usually do is to to write explanations of their problem outside of code blocks, but it would be shorter and clearer to write the problem settings as comments in the code block

Since it's shorter, the eyes of the viewer don't have to make long moves. One can view the whole problem on one page, no need to scroll back and forth. Plus, it's easier to copy the whole code at once when there's only one code block. And a code should be self-explanatory if the desired output is provided.

I do not intend to impose a site policy, just to discuss whether people agree that this method of adding information is beneficial and would be good advice.

enter image description here


Viewing all articles
Browse latest Browse all 189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>