1

Is it normal in computer science courses that one can't use open source code to solve exercises on courses even if the licenses of the code allows to use the code? I was confused as I used some code, gave source where I found the original code but still the lecturer said we have to learn to do the code on my own.

  • 6
    You are confused about who permits what with regard to open source code. Your situation is akin to asking "I took part in a bicycle race and was disqualified because I used a car. Why did that happen even though my dad told me that I can use the family car for whatever I want?!" – user2705196 Jun 17 at 15:55
  • Good computer science courses don't ask students for code; they ask students for evidence that they can produce code themselves. The point of any class is for students to learn a particular skill—in this case, programming—and skills can only be learned by actually practicing that skill. – JeffE Jun 20 at 22:22
5

This is a quite generic question, so there is no real answer to it. You need to look at it from the course perspective as well as from the Open Source license perspective.

There are different Open Source licences available, but most of these should allow you to use them for creating derivative work. This might mean Open Sourcing your solution also though (in case of a copyleft license such as GPL).

I however suspect that your course wanted to teach you more basic concepts, therefore expecting you to come up with a solution by yourself. There is no clear answer to your question, however, more complex exercises would nearly always rely on the usage of Open Source software, such as SDKs, programming languages, libraries and frameworks.

3

I would assume that the lecturer wants you to write the code yourself; copying and pasting from an existing piece of code (no matter the licence and how you reference it) does not demonstrate that you have learnt the skills the lecturer is trying to teach you. That being said, using existing code to point you in the right direction would probably not be a problem.

0

As indicated by other answers, generally the purpose of a computer science programming assignment is to demonstrate learning of various core concepts. If one just uses libraries of code, then there is the possibility that coders might never learn to code those components on heir own.

However, for many programming situations, using appropriate open source libraries, and even snippets from Stack Overflow would be quite acceptable and efficient. What computer students (and even some professionals) forget to do is to acknowledge the sources used. To submit someone else's code without appropriate annotation and citation would make it appear as it was your own. Submitting someone else's work as your own would, in most university situations, be an "unfair means" offence and, if detected, trigger some form of disciplinary procedure. You should always properly acknowledge and cite the source of someone else's code. This should be in code comments and also indicated in any corresponding documentation.

I have to explain this to students in the coding laboratories so often!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.