3
\$\begingroup\$

On Code Review, we post a lot of code and sometimes these run into some serious lines of code. There have been times when we have to paste very minimal code for review and the folks who answer end up asking where the rest of the code is. How do we get around this problem?

\$\endgroup\$
5
  • \$\begingroup\$ to me, the title and the post are two different questions. Or did I misunderstand? \$\endgroup\$ – Adam Dec 23 '11 at 16:43
  • \$\begingroup\$ by questions I mean posts.the essence is to have more stuff in there ,yet remain readable \$\endgroup\$ – ashutosh raina Dec 23 '11 at 20:45
  • 2
    \$\begingroup\$ I understand, but I'm not sure it's good to encourage the posting of long snippets (even in code review). If there's an architectural challenge, often an overview will do. And if it's about lots of unrelated details, shouldn't it better be split up into several questions? \$\endgroup\$ – Adam Dec 23 '11 at 20:55
  • \$\begingroup\$ the trouble also starts when we incorporate the suggestions from the answers , we would like to put the revised version there also keeping the old code as well . so the old code could be folded and anyone could see what it was before and how the review process improved it. As far as splitting questions is concerned it is relative sometimes code aspects are related and they have to be together to make sense. \$\endgroup\$ – ashutosh raina Dec 26 '11 at 6:39
  • \$\begingroup\$ With proper indentation I don't see a need for code folding. If an included function is involved in the code but (seemingly) irrelevant to the problem outlined in the question, it's easy enough to scan past it. Actually omitting the function can cause confusion or worse it could be impossible to answer the question if a relevant part is omitted. \$\endgroup\$ – Ben Brocka Dec 27 '11 at 14:39

Browse other questions tagged .