To cite either a complete computer program or just a program fragment, you will need the following information. Provide as much as available.
- Title of program/source code
- Author(s) name (Individual or corporation)
- Date (when the program or program fragment was created, published or last revised)
- Code version (2.0, 1.150)
- Type (e.g.pseudo-code, source code)
- Availability (e.g. program publisher, title of video or book and publisher, a book's page numbers, URL of Webpage, online video or book)
Provide the citation information as a comment placed above the reused code. For example:
/*
Title: <title of program/source code>
Author: <author(s) names>
Date: <date>
Code version: <code version>
Type: <type>
Availability: <where it's located>
*/
Gen-AI Code
If citing code generated by generative AI:
- Title: Include a descriptive title like "Code generated by ChatGPT."
- Author: name of the AI generator (e.g. OpenAI)
- Date: Use the year the code was generated.
- Type: Specify that it’s computer-generated code.
- Availability: Add the URL where the code was generated (e.g., https://chat.openai.com).