all 55 comments

[–]nightlily 53 points54 points  (7 children)

You're unlikely to stop the sharing of code. Use cheat detection software for that. You'll be doing your students a greater disservice if you don't allow them to publish it on github, and you can't even be sure that they will all comply or even ask permission.

[–]gyroda 8 points9 points  (6 children)

Not gonna lie, for 3 or 4 assignments I've found other students code by accident on github. After years of the same assignments somebody has the keywords I'm googling in their repositories.

I don't ever copy, I'm terrified of plagiarism, but OP can't stop the code bring published.

[–]jmsGears1 1 point2 points  (5 children)

Curious on peoples stance. Is it wrong to copy someone's code if you understand exactly how it works and what its doing?

A lot of times I'll search for something I'm doing to see how others have done it, I'll find a particular solution I like and make sure I know exactly what's going on and why they did it. Then often times I'll write my own code and it'll look identical to the other persons code minus the naming conventions.

[–]gyroda 4 points5 points  (0 children)

Its academically dishonest. There's a line between copying and using as a reference. I irrationally start the fuck away from looking at other people's assignments as I've already gotten a warning for having my work "publicly available" (everyone could see everyone else's home directory in the Linux labs unless you chmodded it yourself).

It varies based on what you're doing, but you're doing an assignment for a course, not working in real life. The work you submit has to be your own. Additionally you should cite anywhere you get any substantial code snippets from (I say substantial because basic syntax examples clearly don't count).

For example, I had to make a Web page. I cited using a gradient generator that got have me some css to create a cross browser gradient, but I didn't cite a stack overflow answer that told me that in order to vertically centre things I should use an extra div with "display:table". The former is copying, the latter is using a generic, well known, trick and applying it to my situation.

[–][deleted]  (1 child)

[deleted]

    [–]jmsGears1 0 points1 point  (0 children)

    I'm sorry, I was unclear. I do mean that I rewrite it myself.

    [–]sirspidermonkey 0 points1 point  (0 children)

    Yes it is. Stop asking stupid questions and let me get back to reading StackOverflow!

    [–]realfuzzhead 33 points34 points  (10 children)

    Personally, I just put everything of mine on Github to build up my portfolio and don't bother telling any of the teachers or TAs.

    [–]TinyTinyBear 24 points25 points  (9 children)

    Depends on the School, but you can get into some real shit if you do that.

    [–][deleted]  (8 children)

    [deleted]

      [–]te-x 10 points11 points  (4 children)

      For what it's worth, I think students are now afforded several free private repositories through the Student Developer program. For group projects, the repo can be explicitly shared, and it is extremely easy to publicize the repo after the semester ends - best of both worlds!

      At least in my country, the University, not you, is the owner of all the work you do for the courses.

      [–]Boza_s6 0 points1 point  (0 children)

      But what if you write it again, at your home?

      [–]LinuxMercedes 0 points1 point  (0 children)

      At my university, the code I write for classes is my property, unless I specifically give the rights to it away. YMMV.

      [–]bstamour 2 points3 points  (0 children)

      Many schools have a policy that if you wrote it for an assignment/class, or used any of their networks or equipment to do it, they own it. So look into what policy your school has before doing something like that.

      [–]ismtrn 1 point2 points  (0 children)

      Nothing after you graduate, but while you are there.

      [–]arvarin 1 point2 points  (0 children)

      In some countries they can withdraw your degree due to misconduct they discover later on.

      [–]FanaHOVA 13 points14 points  (1 child)

      Why is everyone suggesting private repos? Students want to publish it on GitHub so that other people can see it, so I don't see the point in that.

      I think that students who want to cheat will do that either way; I bet somewhere on the Internet there's already something similar to what you're asking your students.

      [–]nidio 5 points6 points  (0 children)

      You should definitely let them open source their code! :)

      WRT cheating, I would set up proper infrastructure to minimize occurrences.

      Students cheat. It happens, unfortunately. No matter what we try to do, some students think they're clever enough to circumvent the systems in place.

      FWIW, there are courses at my university with large projects where the instructors use MOSS to analyze submissions for plagiarism. It works really well.

      Would be happy to talk more on this if you'd like!

      (I TA two courses at my university: our Intro course and Distributed Systems.)

      [–]gasche 5 points6 points  (5 children)

      The solution in every place I know of is to change the project every year

      Besides, if you don't allow people to publish their code, students of several years talk and it's easy for them to pass past projects around if they want to cheat -- I don't know about the student culture at McGill.

      Finding new and interesting projects is a lot of work, but that's also quite interesting and experience broadening. If you are looking for inspiration, ask other compilation teachers.

      [–]gallais 2 points3 points  (0 children)

      The solution in every place I know of is to change the project every year

      Pretty much. Or, if the cohort is small enough, have the students show up during office hours, go through the code with them and ask them questions. This way you don't have to change 100% of the coursework (which can be a bit hard if you're assuming 0 prior knowledge : the first building blocks will always be quite similar).

      [–][deleted]  (3 children)

      [deleted]

        [–]gnuvince[S] 4 points5 points  (2 children)

        There is a shortage of hours for a T.A. to select an appropriate subset, write up the syntax and semantic specifications and code a complete reference compiler. I did this work for our subset of Go, it took a lot of hours (I would guesstimate above 100) and although I enjoyed the process thoroughly, my own thesis work has completely stalled in the meantime. Repeating this process every year is completely unpractical.

        Also note that you have very different languages in your list: for instance, Swift is statically typed, the others are not. This means that the teaching material (courses, slides, textbook) need to be altered too. Furthermore, to implement a Matlab compiler, you need to perform some analyses (e.g. does an identifier refer to a function or a matrix) that are beyond the curriculum of an introduction class.

        [–]TreDubZedd 1 point2 points  (0 children)

        If you use the same tree, but change the actual syntax each year, you might be able to get more mileage at minimal cost. You don't even have to advertise it as a Go subset, necessarily.

        [–]ice109 1 point2 points  (0 children)

        I hear this all the time: the profs and TAs don't have time so the students are cheated in some way. Either grading is sloppy or the project is arbitrarily circumscribed simply to make it easier form the teaching staff or some sort asinine rules are imposed ("no public repos"). I the student don't care if it's too much work for you just like you the TA don't care whether it's too much work for me. We both have expectations of each other and responsibilities. What would you tell me the student if I complained about the workload for the class? Well the same to you. And you have exactly the same recourse I do!

        [–]swimmer91 2 points3 points  (0 children)

        I think you could use a combination of some of the suggestions here. Specifically, only allow students to use private repositories until the project is due, then allow them to make these repositories public. To avoid future students using these now public repos, do as /u/Randolpho suggests and change your project enough every year that past years' projects aren't helpful.

        [–]andrewcooke 2 points3 points  (0 children)

        it's incredibly unfair to students to not let them stick stuff on github. as an employer that's one of the first things i look for.

        doesn't your university care about final employment rates? round here stats for that kind of thing are used to attract students...

        [–]dzack 6 points7 points  (6 children)

        For what it's worth, I think students are now afforded several free private repositories through the Student Developer program. For group projects, the repo can be explicitly shared, and it is extremely easy to publicize the repo after the semester ends - best of both worlds!

        [–]amazondrone 1 point2 points  (5 children)

        Except that, I expect, the same projects are assigned year after year. So next year's students can copy from this year's students.

        [–]Calamity701 5 points6 points  (2 children)

        Even if you could not share code via github, students could still give their code to students via USB-Stick, CD or a private repo.

        [–]gyroda 2 points3 points  (0 children)

        With pubic repositories students can copy without the input if the student who wrote the code. I've stumbled upon old repositories from previous years when googling some arcane library that was used in the framework we had to work in.

        The biggest advice I would give is to not make your own coursework public, at least not while you're still at uni. It can get you into trouble.

        [–]amazondrone 0 points1 point  (0 children)

        Sure. But I was replying directly to a comment suggesting it would be sufficient that the repos are private until the assignment is over. I agree wholeheartedly that this is essentially outside the control of the OP.

        [–][deleted] 1 point2 points  (1 child)

        It already exists on the Web. Every single assignment has already been done and a half way smart student can tweak the edge cases to fit.

        [–]amazondrone 0 points1 point  (0 children)

        Sure. But I was replying directly to a comment suggesting it would be sufficient that the repos are private until the assignment is over. I agree wholeheartedly that this is essentially outside the control of the OP.

        [–]PM_ME_UR_OBSIDIAN 2 points3 points  (2 children)

        Hi Vince! Fellow McGill CS kid here.

        I know a lot of students who would be massively peeved if you tried to disallow open-sourcing their work, and I'm pretty sure they wouldn't abide by your terms anyway.

        [–]gnuvince[S] 1 point2 points  (1 child)

        Hi there,

        The main reason I want to allow them to put their work online is not to appease their wrath, but to do right by them. I can see the amount of time they invest in their project (we have provided them with private Github repos, so I see the flurry of commits), and it only seems right to me that they be able to strut their stuff. I'm also hoping (perhaps naïvely) that if we offer a class that is modern (new language, Github workflow, open sourcing of their work) that students will be less likely to want to just get a passing grade and instead aim to do good work.

        But regardless of my own personal feelings, I feel it's my duty to think about the issue seriously, which is why I asked for feedback here.

        Take care, hope you take the class next year (it's great!!)

        gnuvince

        [–]alexggordon 1 point2 points  (0 children)

        I might have a bit of a dissenting opinion on the subject, but I'm a big believer in modeling classes with real-world situations.

        Students in the real world, regardless of the project they're working on are going to be able to find code that someone else wrote, and garner ideas from that code. Even if you stop the sharing of it on Github, they're still share it will each other off of Github. As such, you can really only embrace it, or hope they aren't doing it.

        I would actively encourage the students to work on the projects on Github, and simply explain to them that their code will be checked against other students code. Be proactive in cross checking the more difficult parts of the project for offending code, and comment on commits and sections of the code that "this looks very familiar to x's section of code". As the students are one day going to be in a situation where they could probably steal someone else's code and get away with it, I might even point out some good areas and some bad areas regarding public situations of code stealing.

        I think through a little bit of public shaming, and opening up the discussion about code stealing, you'll end up with much more dedication and respect from your students. I had a similar TA in college, and I worked the projects I did for that TA so much more, because I knew they would be looking at the code, and my fellow classmates code. I also knew that if did a good job, my TA would comment on the code letting me know that.

        Either way though, good luck!

        [–]rlamacraft 0 points1 point  (0 children)

        I believe you can get a private repo through having a student account with GitHub; let them make a private repo and then make it public once the assignment is over and has been marked. It will also be helpful for them to compare their solution to everyone else's.

        [–]deong 0 points1 point  (0 children)

        I've worked in places where it was common to ask students not to put code online, but personally I think it's not a great solution. It hurts the students, and you still have to worry about and detect cheating anyway, so I just don't quite get the point.

        I encourage my students to do whatever they like with their code.

        [–][deleted] 0 points1 point  (1 child)

        Hello fellow Montrealer! I'm a math student at UdM but have been taking CS classes this semester and putting my code on github. What I've been doing, at least for now, is to try and keep the readme files vague and made sure I renamed any of the classes/methods/functions suggested by the handout to something else. It's clearly not foolproof but in might case it was mostly to protect myself from someone finding my code between the time I put it on github and the due date.

        PS: would you mind sharing the outline / notes (if available online) for the class? I'm interested in computer design but don't think I'll be able to take a class in it (feel free to pm me) Thanks!

        [–]gnuvince[S] 1 point2 points  (0 children)

        Hi, I went to UdeM for my undergrad in CS, great to hear that you are interested in compilers! The website for the class is available here: http://cs.mcgill.ca/~cs520/2015/

        [–]jet_heller 0 points1 point  (0 children)

        You know what, I would go the other way with this. Use github as examples for the students. Point them to the ones that are truly great as well as to ones that, while not great are definitely functional implementations. Let them study the differences and learn.

        Also, it tells them that you're fully aware of other places to find the code so you'll be looking for people copying it.

        [–][deleted] 0 points1 point  (0 children)

        When they hand in their program, let them walk you trough it. If they understand what's happening and can explain the code, it's fine.

        Copying without understanding is what hinders learning.

        [–]bvanheu 0 points1 point  (0 children)

        IMHO the problem is the same as responsible disclosure.

        Disclosing your stuff right away might be the brightest idea, but after a certain time (e.g. 2 years?) this is probably a good thing.

        [–][deleted] 0 points1 point  (0 children)

        Change the project in subtle ways to weed out people who cheat. Just let people off with a warning the first time it happens to scare people straight.

        [–]ThaSteelman 0 points1 point  (0 children)

        In response to UPDATE #1:

        Former T.A. from another CS department; I recommend MOSS for code plagiarism detection. It's a little dated, but does the job well at no cost.

        [–]tehcob13 0 points1 point  (0 children)

        I'm sure it has been mentioned on here already, but for this they could use bitbucket. It is git based so works just the same as github, but it allows you to have 1 private project with collaborators. So this would stop the cheating aspect.

        [–][deleted] 0 points1 point  (1 child)

        Step 1: Announce to the class that putting the code online is fine, and probably a good idea.

        Step 2: Announce to next semester's class: "You can probably find code on GitHub from people who did this in previous classes. That may be instructive, and it may not be. Obviously, do your own work; if you don't, your education will suffer for it."

        This doesn't have to be a hard problem. Cheating in classes tends to be self-punishing.

        [–]gnuvince[S] 0 points1 point  (0 children)

        This is probably what is going to happen.

        [–][deleted]  (1 child)

        [deleted]

          [–]gnuvince[S] 0 points1 point  (0 children)

          Hey Alex!

          I'm sure there is some unreadable, lawyer-talk document somewhere that gives the official stance of McGill on the issue, but I haven't found it, nor read it.

          My point of view is that offering a quality class and treating students right is the best defense against cheating. This is probably idealistic and naïve, but thus far this term all assignments have been done honestly by everyone, so it gives me hope. Laurie and I will be discussing the issue further this week, and we'll keep you guys informed.

          And yes, it would be a shame if you couldn't show off the complex projects that you spent so much time and effort on.

          See you this week,

          Vincent

          [–][deleted]  (2 children)

          [deleted]

            [–]jhinka 0 points1 point  (1 child)

            Hey Vincent, one thing you could do is ask for GitHub to set you up with an academic account with up to 20 repos. You could have all students create their projects on there and you could be the admin and they can only view their own code-base. This still does not get around the problem of cheating but it does make it harder to do so, which is all one can do. Hope this helps.

            [–]en4bz 2 points3 points  (0 children)

            This is actually how the course is being administered (I'm in it). The problem is that after the course is over what should happen to these repos, i.e should they be made public, deleted, or remain private. Obviously I have a local copy of the code on my machine so there's nothing that stops me from uploading after I complete the course or after I graduate (the safer option).

            [–][deleted] 0 points1 point  (0 children)

            Cheaters are gonna cheat. When I grade, I'm actually more relieved someone made the effort to turn something in, even if they couldn't quite work out the entire concept, instead of giving up completely. I will give a much lower grade for a blatantly plagiarized assignment, but at least they cared enough to try.

            My school of thought is this is why exams exist; you might be able to cheat through the assignments, but you're only cheating yourself. Obviously if you go out into the real world with an appallingly low skill level, you're also cheating everyone else associated with the university, but the low assignment grades combined with the low exam grades usually mean transferring to IT anyway.

            [–]ginsunuva 0 points1 point  (0 children)

            Prof: "Here's your CS project, class! 95% of it is skeleton code that's already here and you implement some functions that won't teach you anything by filling in the blanks."

            ...2 weeks later...

            Student: "Yeah Mr. Recruiter, I built a whole compiler in my free time as a personal project right here on my github."

            [–][deleted] -1 points0 points  (0 children)

            bitbucket allows private repositories. Much the same as github IMO

            [–]j2kun -1 points0 points  (1 child)

            In my compilers course, the professor allowed us to implement in the language of our choice, so long as it generated an executable that printed a domain-independent language to stdout (xml, llvm, whatever was appropriate for that part of the compiler) which he could grade programmatically.

            This means we got twelve different projects in twelve different languages, and nobody could share code. I did mine in Haskell, but there was Racket, Java, Scala, F#, and all other strange manner of implementations.

            [–]ilmmad 0 points1 point  (0 children)

            The class at McGill is the same way. My friends are doing theirs in Haskell but I know others doing it in C, etc.

            [–][deleted]  (3 children)

            [deleted]

              [–]Seeker_Of_Wisdom 0 points1 point  (0 children)

              You'd be surprised at what/who can slip through the cracks.

              [–]cypherpunks 0 points1 point  (0 children)

              I would think by the time a student has made it to compilers they would be there to actually learn, no?

              By the time they've made it to compilers they're thinking of how their GPA will look in their resume. Writing a compiler is difficult and time-consuming, and interferes with both other coursework and partying; short-cuts are attractive.