6
\$\begingroup\$

For example, say I wanted to ask a question about memory efficiency regarding two versions of a structure I have in a specific language, but I'm only concerned about that one section of the program. Could I ask that, or would it be better served on, say, SO?

I haven't posted much on CodeReview, so I'm not familiar with the rules and conventions yet. Granted, I did find another question1, which seems to indicate it would be okay. But then there's the fact that the only thing being reviewed is a couple versions of a data structure (and the performance implications thereof).

1: Is it okay to ask questions about algorithm help?

\$\endgroup\$

1 Answer 1

9
\$\begingroup\$

You are always welcome to post just part of your code for review. It is always best though, to provide enough context to make sure the code you post is sensible.

The code you post does not need to compile, or run, it just has to compile/run when used in the context of the rest of the code.

It is often useful to post a link to a github repo (or similar) containing the rest of the code, though, so reviewers can get more context if needed.

Having said all that, your question here seems to indicate you want to do an A v.s B review (which of these options is better)? Questions like that are harder to review. I recommend posting the option you think is best, and in your notes, indicate what your concerns are with it, and what other alternatives you have considered.

\$\endgroup\$

You must log in to answer this question.

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