
Ask HN: How to Handle Student Who Copies Code? - orangepenguin
I&#x27;m tutoring a couple of high school age students in Python. One of them doesn&#x27;t seem to understand what we&#x27;re doing at all. When I work with him, he just makes random guesses that show a lack of understanding for principles we just learned.<p>Yet, during the week, he emails me things that he has written that go beyond what we&#x27;ve learned. I&#x27;m not sure if he&#x27;s writing the code himself, or just finding cool examples and taking credit for them.<p>Here are my top two concerns:<p>1) If he&#x27;s copying code and claiming it as his own, he&#x27;s not being honest and he&#x27;s not learning.<p>2) If he&#x27;s actually writing this code himself and I confront him about copying it, he could feel really hurt and distrusted when he <i>should</i> be rewarded for his efforts to learn.<p>What should I do?<p>NOTE: I don&#x27;t have a problem with students using existing code as long as it is open source and proper attribution is given.
======
phlyingpenguin
Can you find the source that they're using or are they getting it from other
students? If you can find the source, just ask why they didn't give
attribution, then how he's going to approach understanding the code that they
copy in the future. This has been my approach for students (college
professor).

The alternative is much harder. I've been mentoring a nephew who blames his
teacher for how little he understands, but sends me code very clearly copied
off of another student. My general approach has been to explicitly not help
him with any actual source, and instead work on pseudocode. He might spend 8
hours trying to figure out how to compile the broken C++ that he's working
with, but he can't honestly claim that I wasn't being helpful. As suggested by
flukus, asking for code explanations isn't a bad way to go. Such explanations
always find themselves companion to homework assignments that I craft, and
it's what I've been trying to do in the pseudocode conversations with my
nephew. However, another great way to go is to just find examples of any given
problem (and attribute them!!) in another language entirely. Then the student
has the opportunity to become a polyglot in a very natural way. Ultimately, I
refuse to speak in the target language because I'm very aware that he wants me
to hand him the answer.

------
flukus
It's entirely possible he/she doesn't "get it" while you're tutoring them but
does after playing around a bit.

Ask them to explain the code the emailed, if they wrote it themselves then
they should be able to explain it.

~~~
orangepenguin
Hmm... good idea. Added bonus, if he has to Google it to explain it, he'll
learn how it works. :D

------
rubyfan
Tell him it's OK to use the Internet to solve problems and encourage him to
learn from others code but to be honest about it. Then if he's actually able
to solve problems using others code, go get him a job because he's figured out
a way to get things done despite his inexperience.

------
herbst
Let him explain his code in front of the class, it was always fun when our
teachers did that and sometimes it was obvious he knows whats going on and
nobody got hurt.

