AI should not replace essential human elements of writing and reviewing code. Students are expected to use AI technologies ethically, respecting copyright laws, privacy norms, and the intellectual property rights of others. AI resources should be used responsibly and not abused for the ease of use in creating original content. AI should not be used to engage in plagiarism, cheating, or any form of dishonesty. AI work must not be submitted in the place of student work.
AI tools should be used as an aid rather than a substitute for human expertise. Students are accountable for the code generated with AI assistance, and it must adhere to existing coding standards and practices. All AI-generated code should be scrutinized to ensure that it aligns with project requirements, just like any manually written code.
Failing to adhere to these rules may result in not passing the class.
Documentation
Proper documentation is vital for any well-maintained coding project, but it’s imperative when introducing AI-generated code into your work.
Documenting the AI-generated code helps make the project more transparent. It allows staff and mentors to understand how AI models are utilized within the codebase.
If AI tools are used to write code, it must be documented in the Read-Me and in comments in the code. This documentation should cover the purpose of the code and manner of usage.
Best Practice: Encapsulate AI-Generated Code
Encapsulate AI-generated code into defined modules or functions to improve readability and usability immediately. Code encapsulation means wrapping a piece of code, typically a set of statements or functions, within a higher-level structure such as a function, class, or module. The encapsulated code is then treated as a single unit with a well-defined interface and can be invoked or interacted with as a cohesive entity.
Encapsulation promotes modular design by breaking down complex systems into smaller, manageable units. Each encapsulated unit can be developed, tested, and maintained independently, making the codebase more modular and easier to understand.
Encapsulated units can also be reused in different parts of a program or other projects.