Can I get code reviewed if it might be published or referenced in a publication? I am a recently-graduated high school senior in the United States who is currently doing research with a professor in a lab at the university that I will attend. One of the components of the project we are working on is writing code to analyze sequences of DNA for certain characteristics. Even though I am a beginner to coding, I'm the only one in our group who has any experience writing code. I like to ask friends or Code Review.SE for help improving my coding style, as I would like to do for this set of programs in particular. However, I have some concerns about doing that here, as I believe that the code will be referenced in the paper we will write at the conclusion of the project.

If I share the code with people who are otherwise not affiliated with my project to review, do I have to


mention that I had the code reviewed in the code / paper?
list the reviewer as a contributor to the project on the paper?
Short answer: "Do I have to mention that I had the code reviewed in the code / paper?" -> You really should, yes.  It's common practice to mention that code (or other research-related things) were discussed and reviewed with colleagues as they were developed.  A single sentence in the paper's methods section will suffice.

"Do I have to list the reviewer as a contributor to the project on the paper" -> Probably not.  The specific guidelines for what constitutes a "contributor" to a paper (usually discussed as "authorship", as in, should additional people be listed as the paper's authors) will vary from journal to journal.  Review of code or similar is generally not consider sufficient for authorship of a paper.  However, it is polite to list the names of the people who helped in the acknowledgements section, usually on the first page of the paper.

Long answer -> You really should discuss this with the professor you're working with as he/she will have a much deeper understanding of the implications, target journals, common practices, and so on.  That's your best approach.  There's no shame in having someone review your code.  It's considered a /good/ thing, so don't worry about being called out for not being good enough, etc.  Review is part of the academic process and is desirable.