Difference between revisions of "BCH441 Code submisson instructions"
m (→Instructions) |
m (→Instructions) |
||
Line 28: | Line 28: | ||
;Developing | ;Developing | ||
− | :You must develop your code in one or more '''functions''', not just ''ad hoc'' scripts. The analysis must be run from a function. Make sure that your variables are instantiated within the function body, or passed as parameters. Do not refer to variables in the global workspace, create everything you need in the local context. <small>(Ask, if you are not sure how to do that e.g. for a genetic code table or such.)</small> Please consider the [[http://steipe.biochemistry.utoronto.ca/abc/index.php/ABC-Rubrics#Code evaluation rubrics]]. | + | :You must develop your code in one or more '''functions''', not just ''ad hoc'' scripts. The analysis must be run from a function. Make sure that your variables are instantiated within the function body, or passed as parameters. Do not refer to variables in the global workspace, create everything you need in the local context. <small>(Ask, if you are not sure how to do that e.g. for a genetic code table or such.)</small> Please consider the [[http://steipe.biochemistry.utoronto.ca/abc/index.php/ABC-Rubrics#Code|evaluation rubrics]]. |
;Final analysis | ;Final analysis |
Revision as of 06:18, 12 October 2020
Code submission instructions
Contents
This course has strict formal requirements for submitting code for credit. These requirements are designed to demonstrate that it was you who ran the code, that the code you have submitted is the exact code that was used to produce the submitted output, and that the results have not been altered after submission.[1] Just to remind you:
- Once you have developed your analysis and submitted your results and code
- The submitted code must be exactly the code that you have used to obtain your results. Altering the code in your documentation - even if only for cosmetic purposes - is an academic offence.
- The reported results must be exactly the results your code has produced at the time you ran it. Altering the results you obtained - for any reason whatsoever - is an academic offence.
- It must be possible to reproduce your exact results from your posted code.
Of course a situation might arise where you do need to alter the code - e.g. to format the output better, to add a reference to a source that you forgot, or to add a clarifying comment. Not a problem. Simply modify whatever you need, and replace the entire old code and output in your documentation.
When in doubt: be safe and ask; don't make assumptions.
Instructions
- Developing
- You must develop your code in one or more functions, not just ad hoc scripts. The analysis must be run from a function. Make sure that your variables are instantiated within the function body, or passed as parameters. Do not refer to variables in the global workspace, create everything you need in the local context. (Ask, if you are not sure how to do that e.g. for a genetic code table or such.) Please consider the [rubrics].
- Final analysis
- Your final analysis should run from a function call without manual intervention. Your function needs to execute
sealKey()
as its first instruction and as its last instruction.sealKey()
takes a snapshot of the function state, deposits it in an encrypted version on the course server, and returns a validating key. (Ask, if you feel this does not work well for the solution you had in mind and you need a different approach.)
Please follow the following code pattern:
mySubmissionCode <- function(<parameters>) { sealKey() # run sealKey() as the first command # put your code here ... # make sure it is well commented # make sure you reference your sources # make your function draw your plots, compute averages, etc. and use print() or cat() # as required to output results. sealKey() # run sealKey() again, as the last command return() }
Finally: run your code as a single command (e.g. mySubmissionCode(a = "this", b="that",...)
), and paste the entire code and all of its output into your submission
Example
Here is a formatted example, in case you need one.
Example code
Notes
- ↑ This all is in response to an academic offence that occurred when a student could not get their code to run correctly and then confabulated the results.