Misc scribbles

Cheating in your computer science class by copying from stackoverflow

2015-12-17

I would like to tell a story about how I provided some personal tutoring help for a friend in a computer science class, and talk about a nagging feeling that really felt wrong for me.

So, a long time ago, in a land far far away, a friend took an intermediate class on C++. I was first updated on his progress when he emailed me to get some help with some compiler errors. I was happy to help the young padawan. Here was the error:

         test.cpp:42:43: error: non-ASCII characters are not allowed outside of literals
                and identifiers
              for (startScan = 0; startScan < (size āˆ’ 1); startScan++)
                                                    ^~

Now, what does this say to you? For me, it was actually very clear what the error meant. It simply meant that this code was taken from somewhere, and copied and pasted into the compiler. I know that because if they had typed it themself, they definitely would not get this error, because it is the error that implies something was automatically converted to a unicode dash, mostly something done during copying and pasting. At this point, I just kind of laughed, and helped him fix that. I showed how the compiler is actually pretty smart and can help fix these errors and then I said "l8r dude".

The next week, I had another skype meeting with him, and this time I wanted to help a little more. It was pretty clear when we started that he was using code that was copied and pasted again. I said, "uh, ok,....I'm not sure we need that now, but let's just keep going", and then I sat down and started helping. I wanted to help get all the details of the program working, so I helped guide the solution. Each time we needed to test the program, it required repeating some input lines via cin >>, which is really annoying (obviously, you should test your code with unit tests, but universities don't teach that, a rant for another day). Anyways, it took awhile, because coding really does just take time, but in the end he finally got it fixed and I said great job, and he turned it in!

Now, on my friends last assignment, I got another call for help, and when we started skype, I found yet again that he had copied code from somewhere, which included a C++ class and a main function for doing binary trees. I just simply said "dude, delete that, we don't need it" and so he deleted it, but I think maybe he had worked on this copied code for awhile, and maybe felt it was kind of his, so was apprehensive. I insisted though. Then we walked through the assignment again, very slowly. I spent probably 2-3 hours helping him out that night. During those hours, I saw him continually making many programming mistakes such as just not knowing how to declare variable or a function properly, or just not knowing what to do next. This was kind of frustrating!!! But I wanted to absolutely teach him how to make it right! I was patient though, and I wanted to teach a fun lesson, so I showed how you can do some "unit tests" which avoids having to constantly re-enter your data via cin >> ....

Now, the padawan completed his C++ class, and then we all were happy ever after....but a disturbance in the force was sensed...

image Image from http://zelcs.com/this-is-why-stackoverflow-sucks/

I was reminded about all this due to seeing that StackOverflow is now changing their "license" over all the little snippets of code that are posted on their site. It just makes me reflect on literally HOW OFTEN PEOPLE JUST COPY AND PASTE FROM THERE. They might understand what they are doing, or they seriously might not!!! I think it is a real problem that people sometimes do not understand, but I cannot deny that it can be helpful too.

If I reflect on education in general, I recall when I took a University level physics class... it was really hard! We had to enter our validated solutions for the math problems into a computerized website homework portal, and that involved being 100% correct about things. Now, what if there was just a physicsoverflow, where they not only had Q&A, but they had "programs" that gave you all the right answers to your homework problems that you could just copy and paste and use as solutions to your homework? This isn't even in the realm of asking for "homework help" anymore, this is just pure cheating if you can copy your answers from somewhere. It is disappointing though because this is what people are doing in computer science!! These students are missing out on basic understanding of code. !!thisIsNotOk();

Now, at least when I was being a tutor for my friend, I felt like my advice helped my friend learn some things, not just give answers. But what if I was not there? I guess there is a certain "impersonal quality" that makes asking Google/StackOverflow for answers less like conventional "cheating", but that is still wrong. I think it would be good if more expert knowledge was available for all people, and not just copy and paste snippets. As a start, I thought that this post by Philip Compeau and Pavel Pevzner (who teach a Bioinformatics Algorithms MOOC on Coursera) was very interesting, and I really liked their quote:

"Online education should move toward replicating the experience of receiving one-on-one tutoring."

That sounds great, but how can this be achieved? And how can it be done right? I think it really requires the student to "learn how to learn"

If I think back to a long time ago, I remember being in 4th or 5th grade and I did a book report on World War 1, and I went to the library. I remember desperately flipping through pages of a 100 page book to try to find some snippets of information to support some basic idea that I wanted to talk about. Maybe I wanted to know something specific, but the problem was that I wasn't REALLY READING THE BOOK! I probably could have had a better understanding of the topic if I had just read it, or even a part of it, and asked for help, but instead I just picked and chose snippets from the book to "sound smart". I am very guilty of this type of error in many instances throughout my school career, so I am no saint! I even have a phrase to describe this style of learning...I call it "predatory learning" and it is probably the worst kind of learning style. Predatory learners often pick and choose from scraps of info, but they never get a full meal!