Logo

Copy, paste, learn: lessons from code programmers for the AI-enhanced classroom

Copying and pasting can be a powerful learning tool, whether it involves mindless copying or mindful reuse. Here’s how to use it without compromising academic integrity

A laptop screen shows a cursor hovering above copy and paste options
image credit: iStock/PashaIgnatov.

Created in partnership with

PolyU logo with text

Created in partnership with

PolyU logo with text

Copying and pasting has long been stigmatised in education as an easy shortcut, or even outright plagiarism. Yet in practice, copy-and-paste can be a powerful learning tool when used appropriately. Just as software developers frequently learn by reusing and adapting code, students in many disciplines can deepen their understanding by studying and modifying existing material. 

With generative AI and large language models (LLMs) now offering instant access to high-quality text and code, educators are rethinking how “copy-paste” practices might aid learning rather than undermine it. The key is to distinguish between mindless copying and mindful reuse – and to put structured measures in place to ensure quality and integrity.

Copy-and-paste as an active learning strategy

Far from being merely a lazy shortcut, copying content (whether a paragraph of text or a snippet of code) can serve as an active learning strategy. Novices learn better when given examples to study and emulate, rather than being forced to start from scratch, according to research on the worked example effect in cognitive load theory. By copying a well-crafted example and then experimenting with it, learners reduce the initial cognitive load of creation and can focus on understanding why it works.

When students copy a piece of code or a sample essay and then edit or tweak it, they engage in guided practice. The copied material provides a scaffold, like training wheels, that supports learners as they try out their own ideas. For example, a language learner might copy a complex sentence structure from a model essay and then substitute their own words, learning the grammar by imitation. 

Similarly, a biology student might take a textbook explanation and rephrase it in their own words, “copying” the structure of the argument while making it their own. In all these cases, copying is only the starting point: true learning happens in the following modifications and reflections.

Key benefits of copy-paste learning include:

  • Reduced cognitive load: Starting from a template or an example frees up mental resources to focus on understanding concepts rather than struggling with blank-page syndrome.
  • Pattern recognition: Reusing a solution exposes common patterns. For instance, by copy-pasting and adjusting a solution, students begin to recognise underlying principles and structures. A programmer might copy a code fragment and, in adapting it, suddenly see the general algorithmic pattern it represents.
  • Immediate feedback through modification: Copying and altering something provides quick feedback. If a student changes a few lines of copied code and it still runs (or an argument still holds), they get instant confirmation of what works and what does not. If it breaks, that is a learning opportunity to debug and inquire why.
  • Confidence building: Seeing a working example (either provided by a teacher, an online source or AI) can boost confidence. It signals: “This task is doable”. The student can then proceed with incremental changes, rather than feeling overwhelmed by having to generate a solution entirely on their own.

Educators should encourage mindful copy-paste: students must actively engage with the material they copy. This could mean requiring a brief reflection on what was learned from the example or prompting students to annotate the copied sections explaining each part’s function. Such practices ensure that copying is a step toward understanding, not a substitute for it.

Lessons from programmers: code reuse builds understanding

In software development, copying and pasting code is not only commonplace, it’s often essential for learning new techniques. Beginners frequently borrow code from documentation or forums and adapt it to their needs. Seasoned developers rely on existing libraries and snippets as building blocks for projects. Rather than starting from scratch, they copy a proven piece of code and modify it for a new context. This is essentially code reuse, which, even when done via simple copy-paste, acknowledges the usefulness of a pattern.

Copied code is typically not used verbatim for long, as we’ve seen in studies of programming practice – it is customised and integrated into the new context almost immediately. By doing this, the programmer learns how that piece works and how it interacts with other components. In educational terms, the student programmer is learning by example and then learning by doing. The initial copy provides a roadmap, and the subsequent changes deepen comprehension.

Educators can take inspiration from this. Providing students with starter code or exemplar solutions to copy can jump-start the learning process. In this sense, copy-paste is a form of apprenticeship: novices learn the craft by emulating masters, gradually moving from imitation to innovation.

Generative AI: the new frontier of copy-paste

Of course, the rise of large language models has made it so much easier to obtain ready-made text and code. Ask ChatGPT or another LLM a question, and you receive a coherent, well-structured answer that a student might be tempted to copy directly into an assignment. Tools such as GitHub Copilot in programming education can generate functions or even entire programs on demand. This AI-assisted copy-paste capability presents both an opportunity and a challenge for educators.

On the one hand, LLMs can serve as on-demand mentors or libraries of examples. A student could ask an AI for a hint or a full solution and then learn by dissecting that solution. On the other hand, uncritical use of AI outputs carries significant risks, including misinformation and lack of student engagement in the learning process. LLM-generated content may be incorrect or misleading.

What is clear is that banning AI outright is not a sustainable solution. Instead, educators should implement structured measures to channel AI use toward learning and away from passive copying.

Ensuring quality: structured measures for AI-assisted learning

One approach to ensure academic integrity uses token ratio metrics, which compare the number of words or tokens in a student’s prompt to the AI-generated output. A high prompt-to-output ratio suggests that the student provides detailed, thoughtful instructions rather than relying on the AI to do all the intellectual work. 

Another key measure is prompt quality, which evaluates the complexity and specificity of the student’s request. Well-crafted prompts indicate that students engage critically with the AI, rather than submitting vague or generic queries. 

Additionally, latency between prompts – the time a student takes before making their next request or submitting AI-generated content – can signal engagement depth. A longer delay suggests the student is reviewing, editing or verifying AI output, while near-instantaneous submission might indicate blind copying. 

When combined with revision tracking and self-explanation exercises, these measures offer a data-driven framework for quality assurance that can help educators ensure AI tools are being used as learning aids rather than shortcuts. To effectively implement these measures, instructors/professors may need to require students to connect LLM with a designated portal, where all interactions are automatically logged.

Working towards responsible copy-paste learning

Copying and pasting, whether from a peer’s code or an AI essay, doesn’t need to be the enemy of learning. The real issue is how it has been done. When learners intend to study, experiment and understand, they follow in the footsteps of countless programmers and scholars who learned by example. By acknowledging the educational value of “copy, paste, learn” and establishing clear structures to keep its use constructive, we prepare students for a future where human creativity and artificial intelligence work hand in hand.

Xiangen Hu is director of the Institute for Higher Education Research and Development at the Hong Kong Polytechnic University.

If you would like advice and insight from academics and university staff delivered direct to your inbox each week, sign up for the Campus newsletter.

Comments (0)

or in order to add a comment

sticky sign up

Register for free

and unlock a host of features on the THE site