17
\$\begingroup\$

This question is inspired by a question I just saw: Review website done after one week of learning HTML and CSS

How do we want to handle these issues? We wanted to avoid pastebins since having the code elsewhere diminishes from the site (since it can go away, preventive firewalls/IT policies at work, etc). I'm not sure the review is going to be useful to anyone since the website can change and the review comments not apply anymore. Atleast on here we can see the edits that have taken place.

Edit:

Another instance of it:

\$\endgroup\$

3 Answers 3

20
\$\begingroup\$

I think it's OK to have "and click here for even more code!" but the relevant core of the code absolutely has to be in the post itself.

There's just too many things that can go wrong with having all the code offsite.

\$\endgroup\$
18
\$\begingroup\$

I think we should politely ask the questioner to post the relevant code. (Something for the FAQ as well?)

If there is too much code, the OP should find ways to reduce it. I've also suggested collapsible code blocks.

What about HTML and design stuff? Well, code reviews are not about running the code. They're about making sure the code is sane by looking at it. I am not sure this site should allow "Does the render of my HTML look ok?" kind of questions.

\$\endgroup\$
2
  • \$\begingroup\$ Full ACK on every point you made. \$\endgroup\$
    – edorian
    Commented Jan 27, 2011 at 18:52
  • \$\begingroup\$ I'm in agreement as well, but I want to give the community enough time to come to a consensus. \$\endgroup\$ Commented Jan 27, 2011 at 18:54
0
\$\begingroup\$

This might also involve the questions: What is the appropriate length of a Code Review question? and Should line numbers for code snippets be added?

Since this is code review, I imagine the length of many questions could be immense. Just as an example: my recent one on a custom mysqli/spl class dumped on pastebin, where each part of the entire code could affect the accuracy of an answer. Encouraging posting code here is good. Encouraging posting only relevant snippets to the question is good. But what a poster may be trying to convey could be distorted by throwing an entire code dump in a question or trying to trim off excess lines just to make things neater? There could be something in those trimmed lines that would change an answer.

What if stackexchange hosted their own paste bin or a side-module where the user can dump code related to the question? For example: two tabs showing on a question page: default tab #1 shows the full post, answers, comments as normal; tab #2 shows the code complete with syntax highlighting, comments by line#, etc. This way, content is still maintained within SE, entire code dumps are possible for a question, and length of posts get shorter?

\$\endgroup\$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .