IBMsixnshv

Plagerism in coding?

This might be a dumb question but I'm learning to code and am a newbie. Usually when I want to code something I google to to see if anyone had done it before, and use that bit in my code if it works. Is that consider plagerism or cheating? Could I do this for school assignment?

Add a comment
New
pragprog May 17, 2018

Short answer: most of the universities might have plagiarism checkers so no. Also, if its stackoverflow then sure. I copy paste snippets from stackoverflow all the time.

Dropbox Dropboxly May 17, 2018

It depends a lot. If you're plagiarizing the whole thing, yes, major problem. If you're copying a 1 liner off stackoverflow and then modifying it to fit your needs, I wouldn't worry about it.

Amazon Hooliganss May 17, 2018

Agreed with this. Often times there are elegant ways of doing things that you can find on stackoverflow that is only a line or two. If you’re copying anything more than a line or two at a time, then you’re doing it wrong

IBM sixnshv OP May 17, 2018

So like, I needed to calculate column 'distance' base on coordinate pairs...so I google and found the haversine formula in python.... And so I use that whole class ' which was like 10 lines of code's because otherwise I would never know how to calculate distance any other way. So that is cheating? Like I don't get I would be able to just figure that on my own....

IBM sixnshv OP May 17, 2018

I see. Crap I didn't do that, I just used the entire class to calculate distance. I'm currently doing a coding bootcamp training at work. When I submitted my project they ask me to sign something confirming it's my own work and that I didn't cheat. This is why I started wondering what is considered cheating... Because I have always just Google stuff I don't know...idk man

Microsoft BADC0DE May 17, 2018

A couple of questions you should ask yourself... 1. Is the code you are copying a major part of the solution or just a “helper”. 2. Do you understand how the copied code works - can you describe it as if it were your own, and could you write/modify it if needed 3. Are you attempting to hide the fact that it’s copied, or is it a standard and well-known solution that someone shouldn’t/wouldn’t code themselves (eg Dijkstra’s algorithm).

IBM sixnshv OP May 17, 2018

So in my example I understand everything except the intricate inner workings and math involved behind the map .radian() function .. . I just know in general that it converts the latitude and Longitude to a degree value needed to calculate distance. I know everyone uses this when calculating distance from coordinates..so I will to. I see no reason to change the rest of calculation of distance code because it works and it makes sense. I needed to calculate distance to graph average distance among different groups of people, which is the question of one problem. So is me copying the haversine formula (class) cheating?

Microsoft BADC0DE May 17, 2018

It sounds to me that the problem is at least in part encouraging you to discover the haversine formula, not to create it yourself. In saying this though, you *have* to reference it and understand *exactly* how it works.

Honeywell that1guy May 17, 2018

I think this is so stupid on the part of the universities. If you find a solution on the internet and integrate it into your product for a working result, this is exactly what real world development is.

Microsoft BADC0DE May 17, 2018

No - in universities the point is about learning, building knowledge from first principles if needed, so the student has building blocks to draw from later in their career. In industry it’s about getting the job done as quickly and efficiently as possible (and not getting the company into trouble by falling foul to things like OSS licenses).

New
JohnBarron May 17, 2018

No that’s what real world code monkey work is...

Microsoft HomeAlone May 17, 2018

bunch pf over paid copy jockies

New
JohnBarron May 17, 2018

If you’re copying one line that’s just an API call or special syntax you had to lookup, that’s fine.

Amazon brYm45 May 17, 2018

You shouldn't do this while you're learning. It would be considered cheating, but more importantly you need to understand why it works. Don't look things up until you've already been stuck for a while, then re-implement the solution in your own way. After you get a job, copy all you want as long as it doesn't break license

Amazon 800GOTJUNK May 18, 2018

In theory, if you understand it and can rewrite it afterward without looking online, you are ok. There is still a final exam for a reason. At work, they won't care as long as you are not copying a copy righted code from a vendor, that'll get you lawsuit, but those are not on stack overflow anyways. Also you won't find an identical solution or something is different, you'll have to understand it to modify it for your need. Remember, like using calculator all the time, you still need to be able to do without online search in interview.

IBM sixnshv OP May 18, 2018

Thanks that makes sense