Slashdot Mirror


As Computer Coding Classes Swell, So Does Cheating (nytimes.com)

An anonymous reader shares a report: College students have flooded into computer science courses across the country, recognizing them as an entree to coveted jobs at companies like Facebook and Google, not to mention the big prize: a start-up worth millions. The exploding interest in these courses, though, has coincided with an undesirable side effect: a spate of high-tech collegiate plagiarism. Students have been caught borrowing computer code from their friends or cribbing it from the internet. "There's a lot of discussion about it, both inside a department as well as across the field," said Randy H. Katz, a professor in the electrical engineering and computer science department at the University of California, Berkeley, who discovered in one year that about 100 of his roughly 700 students in one class had violated the course policy on collaborating or copying code. Computer science professors are now delivering stern warnings at the start of each course, and, like colleagues in other subjects, deploy software to flag plagiarism. They have unearthed numerous examples of suspected cheating.

41 of 250 comments (clear)

  1. Nothing new here by Anonymous Coward · · Score: 2, Interesting

    Borrowing, or reusing code, has always been the norm and is the basis for libraries of routines and procedures. Blatant ripoffs should be obvious but smaller scale plagarism (your word) is hard to determine.

    1. Re:Nothing new here by gweihir · · Score: 4, Informative

      Often it is extremely easy to determine, namely from patterns of mistakes. I once, as a TA, had a case where I refused points for some exercises to several students. They complained, and then I showed them how a comma had become a dash and then had become a quote over several generations of copying (with the dash and the quote making absolutely no sense in the given context). That shut them up pretty fast.

      Of course, for simple and correct code fragments you cannot actually detect cheating reliably. The easy solution is to make the exercises more complex. Students are coddled far too often in coding courses anyways.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re: Nothing new here by Anonymous Coward · · Score: 4, Insightful

      Sums it up. Or they get a friend to write it for them. I remember in college I was the only one in my computer science class to get a week long project right and have unique code. Everyone else either got it wrong, or all had the same code.

      But I agree, kids are coddled in class. This is a very tough mental field. The campaigns to teach everyone to code make it seem like it's house work. Anyone can do it. I think they are finally realizing it's not so.

    3. Re:Nothing new here by XxtraLarGe · · Score: 4, Informative

      Often it is extremely easy to determine, namely from patterns of mistakes.

      It's even easier when it's a direct copy. I've had students who copied homework directly, including the same errors, and the same comments. One time, I had a student use another student's file and they didn't even bother to remove the other student's name out of the comments section. They both got 0's for the assignment, and it was a pretty hefty assignment to get a 0 on.

      --
      Taking guns away from the 99% gives the 1% 100% of the power.
    4. Re:Nothing new here by XxtraLarGe · · Score: 4, Interesting

      Borrowing, or reusing code, has always been the norm and is the basis for libraries of routines and procedures. Blatant ripoffs should be obvious but smaller scale plagarism (your word) is hard to determine.

      In my classes, the students are expected to complete the assignments using the techniques covered to date. That is because what we learn in the next class often relies on understanding what we covered in the previous when. So when they use a solution that is beyond what they have already learned, they are putting themselves even further behind the curve.

      You can't imagine how many times I've had students make a hamfisted attempt to insert something they found on Stack Overflow that uses techniques not yet covered in the course. Since they don't understand what that code is supposed to do, it often doesn't work correctly, or crashes because they thought they could copy & paste without even compiling. I have no problem giving those students a 0 on their assignments.

      --
      Taking guns away from the 99% gives the 1% 100% of the power.
    5. Re: Nothing new here by Anonymous Coward · · Score: 2, Interesting

      Anyone can code, it just needs to compile. Almost no one can program. Crap code is breaking in odd ways because of huge amounts of undefined behavior. Most of the time the programmer can't even tell you why their code worked in the first place, yet alone make it work against once it breaks. Large amounts of determinism allows most to plow through their lack of understanding by throwing code at the wall and seeing what sticks.

    6. Re: Nothing new here by DuckDodgers · · Score: 2, Informative

      Bullshit. This is not a tough field. When CS101 and CS102 classes are hard, all you're doing is weeding out the kids who didn't have any coding experience in high school.

      My family didn't own a fucking computer before I got to college. I wanted to work in the industry, but I new nothing. I passed my first three classes by cheating. The kids that aced had taken programming classes in high school and owned computers since they were in elementary school. By junior year I was all caught up. I'm still working as a developer, almost twenty years later. Java, Python, Perl, Scala; git; Maven; Jenkins; shell, vim, sed, piping. And I would have never got here if they did a better job catching cheaters at school.

      All you're doing is weeding out the people that didn't start young.

    7. Re: Nothing new here by steveg · · Score: 3, Insightful

      Reusing code for some sort of production is good sense.

      Reusing code that you are supposed to be writing in order to learn *how* to write it using certain techniques short circuits the learning process. You may get the code to do what you want, but the important result (you learned how to do it) doesn't happen. Nobody needs a program to pick from a menu to multiply two numbers, or to print out a Fibonacci sequence, or whatever. What they do need is a programmer who can create these things, because that programmer is on their way to create things that will actually be useful.

      So reusing code for school assignments is stupid. You may or may not get caught, but either way, you didn't learn anything. So why even take the class?

      --
      Ignorance killed the cat. Curiosity was framed.
    8. Re:Nothing new here by Anubis+IV · · Score: 4, Informative

      Same here. I used to have a group of students (from a part of the world where plagiarism is more culturally accepted) sit in the lab and work together. With me sitting just a few feet from them, I watched them as they copied code back and forth from each other's screens, so I made it clear that while they could work together in figuring out the algorithm, it was up to each of them to actually implement the algorithm. They nodded, made a gesture of following what I said, and then went right back to it again.

      So, since their code ended up being identical, I gave them 0s.

      After that, they stopped copying from each other while sitting in the lab, and instead took their cheating out of class. Thankfully, that was even easier to detect, since they'd have signature traits, such as the same number of irrelevant trailing spaces at the ends of specific lines. They started changing variable names and intentionally adding whitespace in irrelavant places, just to make their code look distinct. What they didn't know is that I had a plagiarism detection tool that accounted for those sorts of changes, and sure enough their code always came out as a 100% match for someone else in the class, while everyone else's would be around 20-50% (which was expected, given that there are only so many ways to implement simple tasks).

      Much to my disappointment the professor refused to act on any of it, so the best I could do was give them 0s when it was abundantly clear they were cheating. Eventually they started changing the implementation enough that the tool I used no longer showed a 100% match, but at that point they were effectively re-implementing it themselves anyway, which was exactly what we wanted from them in the first place.

    9. Re:Nothing new here by Hognoxious · · Score: 2

      plagarism (your word)

      Wrong. His word was plagiarism.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    10. Re: Nothing new here by The+Snowman · · Score: 3, Insightful

      Eventually there will be few real programing jobs and a bunch of drop in ide code everywhere and it's not far off at all.

      If Salesforce is any indication, the "drag and drop" model of designing a system is nowhere near ready for prime time. Even simple implementations require a real programmer to make them work, despite what they promise.

      --
      24 beers in a case, 24 hours in a day. Coincidence? I think not!
    11. Re: Nothing new here by barbariccow · · Score: 2

      IDE? How the hell does anyone program anything without vim? I don't get it. Like... once you learn how to record (either via 'q' for complex recording, or '.' for "repeat last action" simple recording).... how do you ever go back to basically a colorful notepad?

    12. Re: Nothing new here by K.+S.+Kyosuke · · Score: 3, Informative

      How the hell does anyone program anything without vim?

      Using Emacs, obviously. ;)

      --
      Ezekiel 23:20
  2. Re:How many different ways to solve problems? by Anonymous Coward · · Score: 4, Informative

    There may be a limited number of ways to solve the problem, but there are an unlimited number of variable names that can be leveraged to solve a problem.

    No two should be identical. Though all will be similar.

  3. Re:So many students... by HornWumpus · · Score: 2

    Pretty standard. Large lecture (likely two times), small labs. TAs do 99% of the teaching.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  4. Re:So many students... by phantomfive · · Score: 2

    At Berkeley they have a professor who lectures a huge class, then a bunch of graduate students who work more closely with the individual students. So you rarely talk to the professor, but you frequently talk to your graduate student advisor.

    I can't speak to the effectiveness of this system, but the purpose of course is to save money.

    --
    "First they came for the slanderers and i said nothing."
  5. Re:You say cheating, I say cargo cult programming by gweihir · · Score: 2

    Ah yes, for example the Java "programmers" that can only call existing functions and methods and can only do it with code copied from the web. The job-security aspect for IT security consulting is correct though, I am benefiting from that. Although when I have to explain to a web application programmer how to find out what his code does that is really demented. It is much more satisfying to do this in an academic setting, there I can just fail those that do not understand what they are doing.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  6. Name and Shame! by h4ck7h3p14n37 · · Score: 3, Interesting

    Any student caught cheating should have their name announced/posted in a prominent location so all of their classmates know who the cheaters are.

    The rest of the students work too hard to allow cheaters to remain anonymous. They deserve to know who's trying to screw them over.

  7. asian culture is geared so that test / school chea by Joe_Dragon · · Score: 2

    asian culture is geared so that test / school cheating is very common and the schools really don't want to kick out full cost paying (some time more then out of state rates) foreign students.

  8. Re: So many students... by phantomfive · · Score: 2

    Yeah it's a problem. You are likely to be better off going to UC Merced and getting more personal attention at a lower cost.

    On the other hand, I've known some good programmers to come out of Berkeley, so maybe they're still getting the basics right. If you're learning a linked list, a graduate school advisor can probably teach it almost as well as Donald Knuth.

    --
    "First they came for the slanderers and i said nothing."
  9. Re:How many different ways to solve problems? by beelsebob · · Score: 4, Informative

    The key is that there's nearly unlimited ways to solve a problem incorrectly, but when the exact same incorrect solutions keep coming up within the same sets of students it becomes very obvious to the teaching assistant what's going on.

  10. Re:Isn't it all cargo cult programming? by davidwr · · Score: 2

    Show me someone doing something creative today in code.

    Those obfuscated- and underhanded-programmer ng contest entries come to mind.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  11. Re:How many different ways to solve problems? by grasshoppa · · Score: 2

    The key is that there's nearly unlimited ways to solve a problem incorrectly,

    Point of fact, there are a very small number of ways to solve simple, college level problems. Obfuscation is not a coding methodology we want to be encouraging, afterall.

    You have a valid point about incorrect assignments, however.

    --
    Mod me down with all of your hatred and your journey towards the dark side will be complete!
  12. Um, Ah.... by SuperKendall · · Score: 3, Insightful

    Students have been caught borrowing computer code from their friends or cribbing it from the internet.

    I wonder if the article writer is familiar with what professional coders do, or GitHub in general???

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  13. I'm not sure what the point would be by Skuld-Chan · · Score: 4, Insightful

    I mean at some point in your career you're going to have to figure out some problem on your own - and if you cheat during all that high priced training you might as well not even have gone.

  14. India anyone? by yodleboy · · Score: 3, Interesting

    If these schools and profs want to get an early look at the kinds of problems they can expect when a massive swell in IT courses happens, look no further than India. What problems do they have? How do they address them (or fail to)? Seems there are regular articles on mass cheating in Indian IT curriculum. For the sake of fairness, they could research the MSCE schools in the early 2000's. I guess my point is that as surprised as they seem to be, there is still time to get ahead of the most obvious problems if they do some research.

  15. Re:Example code by davidwr · · Score: 2

    boolean done = true;
    while (!done) { ...
    }

    In a class of about 450, they were the only ones who made that fatal mistake.

    That's no mistake, that's a test of the compiler's optimizer.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  16. Re:How many different ways to solve problems? by Anonymous Coward · · Score: 4, Funny

    if something like that happens, you just pull both students in independently and ask them to explain how the code works and ask a few pointed questions. In general the students who copy do it because they don't understand the problem or how to solve it, some won't even understand the language they are supposed to be working on.

    Funny story in college I had an instructor end class early because he was so enraged by a cheating student. I think it was the complete lack of effort that did it, the student turned in the 1st assignment from last year for this years first assignment, despite the fact that the problem had changed.

  17. Re:How many different ways to solve problems? by Anonymous Coward · · Score: 4, Insightful

    I used to run diffs on everyone's code, piped to wc -l to see who had the smallest number of different lines. I'd check those. Usually they were identical down to the whitespace with only variable names changed. Sometimes only comments. Rarely, but it happened, no changes except the filename. Students heard that I automated grading so they assumed I wasn't checking. it was more work to make their code look different than to write it from scratch.

  18. Re:How many different ways to solve problems? by grasshoppa · · Score: 4, Funny

    Heh, I'd have been the dick who wrote an automated obfuscator. Flip the indentation from spaces to tabs ( or tabs to spaces ), randomly change ctime/mtime ( within acceptable range ), camelcase to underscore ( or reverse ), use a dictionary to change variables to their synonyms, add generic comments ( ala "palm reading" ), randomly placed returns ( where language appropriate ).

    Figure that wouldn't take more than an afternoon to code up.

    Could get even crazier by adding the ability to swap out loops ( foreach to while/for ), but those can impact overall grade and is language specific so it'd have to wait for v2.

    --
    Mod me down with all of your hatred and your journey towards the dark side will be complete!
  19. Re:How many different ways to solve problems? by twistedcubic · · Score: 4, Insightful

    Some things you only realize when you have to grade students' programs. Clueless programmers cheat in clueless ways, of course, because if they were clever at hiding that they copied, they could just use this skill to write the programs on their own. Also, the anti-cheating programs we use are way more sophisticated than inept programmers. I use the excellent VPL Moodle plugin (https://moodle.org/plugins/mod_vpl) which has this built-in.

  20. What should be expected? by Marc_Hawke · · Score: 2

    The majority of posts here talk about how 'collaboration' and 'code recycling' are the absolute standards in professional programming. I agree of course. My question is how should the class be structured in order to allow for that, but still teach the class and measure the students grasp of it?

    Does it come down to writing code by hand on paper? (Something I've never liked.)

    Does the teacher have to 'warp' the assignments? "Do this project, but get the answer wrong in exactly this way that I've just randomly selected."

    Do we ignore actual code as insignificant and just have short-answer or multiple choice questions on concepts? (I know I go through 10 languages a day, I'm competent because I know concepts rather than syntax.)

    Or do we say, "There's no cheating in this class. If you're able to get the project done here...you'll be able to get it done in a work environment as well."

    --
    --Welcome to the Realm of the Hawke--
  21. Re:How many different ways to solve problems? by computational+super · · Score: 3, Funny

    an unlimited number of variable names

    What? There are only 26 letters. a = b; b = c; and now I've already used up 3 variable names.

    --
    Proud neuron in the Slashdot hivemind since 2002.
  22. Stopping cheating on programming tests by maiden_taiwan · · Score: 3, Informative

    I taught programming at a well-known university in the 1990s. To prevent cheating on exams, I created three different versions of the exam. Call them A, B, and C. They had the same questions, but with different numeric values (and therefore different answers). I distributed the exams in the order A, B, C, A, B, C, .... So no matter where a student was sitting, the other exams around him/her were different. I did not reveal this to the students.

    Everyone who cheated from his/her neighbor got caught, because their exam (say, "A") would have exam "B" or "C" answers on it. Those students instantly failed the course.

    For homework, my advice was: you can talk about assignments in general terms, but you cannot show each other your code, because you are being graded on your work. That was where I drew the line. Still, a half dozen students (out of 150) would get caught cheating on their homework each semester. It made me sad, because none of the cheaters had ever come to my office hours for help. If only they had....

  23. Re:Big Deal by PPH · · Score: 3

    And after the third or fourth applicant from that college is found to be an incompetent fuckwit, HR will stop looking at any applications from that institution. Pretty soon, word will get out and a degree from there won't be worth squat. And nobody will enroll in their CS program anymore.

    That's why colleges worry about stuff like this.

    --
    Have gnu, will travel.
  24. Re:"Open Source" is human nature by Obfuscant · · Score: 3, Insightful

    We copy code without completely understanding the "how" all the time, it's called a "library"

    And this is often why we wind up with complete nonsense output from a simple program. A large part of reusing code requires knowing when the assumptions that went into writing that code are valid and when they are not. It is hard to know when you shouldn't use a certain kind of sort algorithm if you don't know what that algorithm is and how it works. It is hard to know when not to use certain numerical functions if you don't know what they are.

    That's why you learn what things are and how they work when you are in school, so that when you get into the real world you can make better choices and not so many mistakes.

  25. How dumb can students be? by bradley13 · · Score: 5, Insightful

    I see this among my students as well.

    First, on the side of the students: It is perfectly fine to copy code snippets. How do I safely hash a password? Unless it's a computer security course, students shouldn't be reinventing code like that. That's when you go to StackOverflow and find the canned answer from an expert. Some students (and professors) are confused about this.

    Ok, with that out of the way: When plagiarism does happen, it is generally pretty blatant. Two solutions submitted, identical except for the renamed variables. It's almost insulting, that they think I won't notice. Alternatively, they pay someone else to write the program, and then cannot answer even the simplest questions about how it works.

    But even if they manage to sneak a plagiarized solution through: how stupid can you be?!?! If students aren't writing the programs themselves, they will fail the exam, where copying isn't an option any more. Or, even worse, they manage to scrape through the first year exams. If they get into their sophomore year, they are allowed to fail a course and repeat it a second time. This is horrible, because they drag out the pain for 3 or 4 or 5 years before failing out of the program.

    What a waste of their lives. If they can't handle the material, they're only doing themselves damage by dragging things out. Plagiarism in a technical field, where ultimately you either have the skills or not - and this will be discovered - is just unbelievably dumb.

    --
    Enjoy life! This is not a dress rehearsal.
  26. Re:How many different ways to solve problems? by freeze128 · · Score: 2

    If you were a student, and you wrote that obfuscator just so you could copy someone else's code, then I would say that you deserve to pass your programming class.

  27. The wrong message! by hackel · · Score: 3

    Students shouldn't be called out for "cheating." Instead, they should be taught *how* to collaborate and properly give attribution to the source of their code and adhering to licensing requirements. This is how it works in the real world. It's not "cheating." Programming is supposed to be collaborative! Open Source is the way, and Free Software should be the mantra of every academic computer science programme.

    Of course cheating on an actual test is terrible. But for an assignment? As long as the code runs, and the parts taken from others are properly attributed, it should be permitted. Just as long as it's not a 100% copy of the entire code base, but rather copying an algorithm here or there, using an existing library, whatever.

    Of course the vast majority of developers should NOT be studying computer science. They should be doing some kind of software engineering course that is more practical. Computer Science should remain just that—a science. Mostly theoretical, based on research.

    1. Re:The wrong message! by serviscope_minor · · Score: 4, Insightful

      They should be taught both, but that means cheating will still be a problem. Collaborating etc is all well and good but students also need to know how to actually write code themselves. Not everything can be assembled from libraries and stackoverflow code with trivial glue logic.

      --
      SJW n. One who posts facts.
  28. Re:How many different ways to solve problems? by kleinesRaedchen · · Score: 2

    Heh, I'd have been the dick who wrote an automated obfuscator.

    Your obfuscator would be entirely useless against professional plagiarism programs.

    Flip the indentation from spaces to tabs ( or tabs to spaces ), randomly change ctime/mtime ( within acceptable range ), camelcase to underscore ( or reverse ), use a dictionary to change variables to their synonyms, add generic comments ( ala "palm reading" ), randomly placed returns ( where language appropriate ).

    spaces to tabs: whitespace usually is ignored
    ctime/mtime: why should this be considered anyway?
    camelcase to underscore: identifier names are ignored
    change variable names: identifier names are ignored
    add generic comments: comments are ignored
    randomly placed returns: whitespace usually is ignored

    Professional-grade plagiarism programs see
    int a = b
    + 2;

    as token sequence
    INT INDENT ASSIGN INDENT PLUS 2 SEMICOLON

    All of your obfuscations are snake oil.

    Figure that wouldn't take more than an afternoon to code up.

    Could get even crazier by adding the ability to swap out loops ( foreach to while/for ), but those can impact overall grade and is language specific so it'd have to wait for v2.

    Swapping code parts woul indeed challenge plagiarism programs. But, as you conceded, this is hard to implement without introducing errors.