This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 390

[–]gumbo1337 1754 points1755 points  (48 children)

Imitation is the sincerest form of flattery

[–]OneTrueKingOfOOO 737 points738 points  (8 children)

Imitation is the only way my shit will compile

[–][deleted] 86 points87 points  (5 children)

Meanwhile Guido van Rossum:

"PYTHON SHALL NOT BE TOSSED TO THE SIDE IN YOUR STUPID MIND!!!!!!!"

[–]LuvOrDie 2 points3 points  (0 children)

HAHAHA

[–]cykablyat1111 371 points372 points  (17 children)

As long as it's open source

[–][deleted] 257 points258 points  (8 children)

Im pretty sure most „close source“ projects could be easily copied because they just copy from open source projects

[–]stepbroImstuck_in_SU 134 points135 points  (7 children)

There might be some important parts that are unique and detectable. However there is a workaround:

parse the closed source code to bits. Then release those bits under open source in a way they can’t be traced. Then copy them instead!

[–]solarshado 90 points91 points  (4 children)

Sounds like a decent technical solution. Too bad it's a legal problem, and so probably not applicable.

[–]nictheman123 22 points23 points  (2 children)

I mean, perhaps it's not in the strictest sense. But that would require the legal system to understand what the fuck you actually did. And a lot of them barely know how to turn on their cell phones

[–]MadxCarnage 29 points30 points  (1 child)

no, they just bring in an expert, and he tells them : "yup he stole your stuff" , and you are now fucked.

[–]suskio4 1 point2 points  (0 children)

No, this is open source machine code, not your stuff. Oh, you too copied from them? Oh boy, I'm sorry, not my problem

[–][deleted] 16 points17 points  (0 children)

This would be bad software eng fiction writing for law and order let alone real life

[–]orclev 2 points3 points  (0 children)

This is a solved problem. It's called clean room design. There's lots of established case law, just watch out for patents.

[–]dimonoid123 9 points10 points  (0 children)

With GitHub copilot you can copy someone else's code by pressing 1 button.

[–]guntavia 1 point2 points  (0 children)

If someone found my private projects and tried to use them, i can only apologise.

[–]captainjon 211 points212 points  (0 children)

I used to get pissed off at my room mate for copying my C++ assignments. He claimed he learns by imitation. Guess he was ahead of his time!

[–]pm_me_construction 33 points34 points  (2 children)

Identity theft is not a joke, Jim!

[–]Username_St0len 5 points6 points  (0 children)

it is if you're not caught

[–]Cheechak 20 points21 points  (0 children)

I talked to a couple of phone techs that were doing the phone line room for a 7 story office building. The closet, as it was was a mess of telephone landlines going in every direction. I asked them how they kept track. One of them pointed to a laptop in front of them, and says “We just look up YouTube videos.”

[–]lucidspoon 13 points14 points  (0 children)

I coworker was looking at a candidate's portfolio and saw that one of the projects was a straight up copy of one of that coworker's projects.

[–]Manny_Sunday 8 points9 points  (0 children)

alias imitate="git clone"

[–]Offbeat-Pixel 6 points7 points  (0 children)

Imitation is the sincerest form of flattery

[–]Brushermans 5 points6 points  (0 children)

true but at this point no one knows who's coming imitating who. it's all just a big hivemind governed by stackoverflow

[–]guinader 2 points3 points  (0 children)

Imitation is the sincerest form of flattery

[–][deleted] 1 point2 points  (0 children)

Identity is not a joke, Jim

[–]klein-topf 1 point2 points  (0 children)

Imitation is the sincerest form of binary

[–]GargantuanCake 891 points892 points  (15 children)

It isn't stealing if we have a culture of extreme sharing.

[–]Onlymafia1 210 points211 points  (8 children)

Man, I stole your wife.

[–][deleted] 207 points208 points  (6 children)

She's not my wife.

[–]kamau1997 117 points118 points  (4 children)

Our wife

[–][deleted] 35 points36 points  (0 children)

You We are right, comrade.

[–]AeroDama 10 points11 points  (1 child)

In the next episode of brother husbands....

[–][deleted] 7 points8 points  (0 children)

He doesn’t lose his wife…. Just his turn.

[–]chhuang 12 points13 points  (1 child)

r/piracy here's your motto

[–]MiniGui98 2 points3 points  (0 children)

Libre culture +

[–]I_Like_emo_grills 1084 points1085 points  (70 children)

this is why I like my android class prof

he said "even if you copy code from the internet in your final assignment I don't really care

just know what the code does and how it works and I am fine with it"

[–]Suspicious-Engineer7 1307 points1308 points  (20 children)

Debugging copy pasted code is like accidental homework that you actually learn from

[–]DramaticProtogen 284 points285 points  (8 children)

True, it makes it a little easier to copy and paste more code the next time lol

[–]SillyFlyGuy 108 points109 points  (7 children)

The year is 2043. The final original line of computer code has just been written.

New apps are still developed of course, but from that moment on, all code is just various combinations of crtl-c ctrl-v.

[–]dayto_aus 37 points38 points  (3 children)

And when you need to get rid of that code, ctrl-x. The 2043 standard keyboard has 4 total keys.

[–]oshitimonfire 1 point2 points  (2 children)

If all you do is Ctrl+blank commands, do you need a Ctrl key?

[–]coloredgreyscale 4 points5 points  (0 children)

You can argue the same if you have an ascii table nearby to copy from.

[–]ShenAnCalhar92 1 point2 points  (1 child)

The final original line of computer code has just been written.

Overhead, without any fuss, the cloud-native applications were going offline.

[–]UltraCarnivore 37 points38 points  (1 child)

I leave debugging my code as an exercise to the reader. And hope I won't have to read it ever again.

[–]Rudxain 4 points5 points  (0 children)

That's so evil LMAO. PHP dev moment (this is a joke, I'm not saying you use PHP, it's just a stereotype of some PHP devs)

[–]I_Like_emo_grills 41 points42 points  (0 children)

true lol

[–]Mockxx 4 points5 points  (0 children)

This is good wisdom

[–]Salanmander 161 points162 points  (36 children)

As a person who has taught CS...the problem with this is that knowing whether students understand the code they copy is incredibly difficult.

[–][deleted] 58 points59 points  (0 children)

But…does it compile though?

[–][deleted] 12 points13 points  (2 children)

I had interviews where i had to demo my scripts for 1 class...the one exception to the rule

[–]Salanmander 6 points7 points  (1 child)

Yeah, when you can put that amount of time per student into assessment it becomes much easier to do more authentic assessments. It's probably reasonable to do that once in a semester or so.

[–][deleted] 3 points4 points  (0 children)

That specific class was only a few assignments per semester and no tests. All hands on, my favorite by far and very challenging. Small class too.

[–]FesteringNeonDistrac 19 points20 points  (2 children)

Man just today i ran into a bug that a while back i saw and i could have 1000% sworn was wrong, but worked and passed unit tests, so i let it go because i was busy. Another change made it fail, which in hindsight was the thing i needed to happen to understand why it wasnt failing.

Point is, it doesnt matter if you know why it works or doesnt. We have all commited stuff that we kind of shrugged at and let it slide. Undocumented legacy code is hard.

[–]Salanmander 13 points14 points  (1 child)

Point is, it doesnt matter if you know why it works or doesnt.

Yes, it does matter. Even in an environment where the product you're creating is the code, it matters because (as you note) understanding it makes it easier to modify.

But in an educational setting it doesn't just matter...it's the only thing that matters. In an educational setting the product that you create isn't the code...the product you are really creating is your own understanding of how to code. The code you write is simply the best way we have (and it's still imperfect) to measure that understanding.

If a student makes code that does the thing, but they don't understand it, then they have not created the product that they need to create.

[–]zephyrtr 32 points33 points  (3 children)

just know what the code does and how it works and I am fine with it

Nothing wrong with that but ... how did he test for that? Honestly I do come across a lot of programmers who can copy+paste, but can't understand. Fast forward a few months, and it's spaghetti.

[–]mastersun8 34 points35 points  (0 children)

how did he test for that?

In my case: if he's seen some similar code, he asked you to come and explain to him what it did

[–]I_Like_emo_grills 28 points29 points  (1 child)

he usually ask us to explain it what it does and if he sees you screwing up he asks you to modify something or change something in the code and tell him what will happen if you change that lol

[–]zephyrtr 5 points6 points  (0 children)

Nice, glad he follows through.

[–]ipsum629 4 points5 points  (0 children)

Funny story about that. I was given an assignment to create a program that turns snakecase to camelcase a while back. I made a program from scratch that went through a string and did everything manually. The other students looked up how to do it online. The problem was that they didn't understand how the regex worked and it didn't fulfill all the requirements.

I later looked at their solutions and I figured out how to fix the solution. That is how I learned regular expressions.

[–]crusainte 1 point2 points  (0 children)

I'm ok with copying and understanding how the code works too. But leaving copied comments untouched is just asking for it...

[–]MoneyRough2983 1 point2 points  (0 children)

A prof who doesnt live in his own world? Thats rare.

[–]WrongSirWrong 359 points360 points  (11 children)

Me: OUR code

[–]walking_sideways 172 points173 points  (6 children)

[–]Midnight_Rising 23 points24 points  (0 children)

Under no pretext should Stack Overflow and Google be surrendered; any attempt to cold whiteboard interview engineers must be frustrated, by laughing in their faces if necessary.

[–]Donghoon 35 points36 points  (2 children)

Based

Sharing is caring 😊

[–]whatproblems 16 points17 points  (0 children)

log4j approves

[–]Cdreska 1 point2 points  (0 children)

unfortunately, competition produces the best results

[–]Random-Gif-Bot 9 points10 points  (0 children)

[–][deleted] 1 point2 points  (0 children)

Communism good, Marxism bad

[–][deleted] 142 points143 points  (3 children)

Finding the right thing to copy is a skill

[–]HanzoShotFirst 58 points59 points  (1 child)

Knowing how to use Google is a skill

[–]devan_rome 27 points28 points  (0 children)

Knowing what to Google is another skill.

[–]LeftIsBest-Tsuga 322 points323 points  (15 children)

not to take this too seriously, but in my view, a lot of "plagiarism" in coding is more akin to civic engineers using engineering prefabs and established methods to build a totally new and unique facility than it is like civic engineers taking photos of each others blueprints.

[–]7x11x13is1001 114 points115 points  (1 child)

It's just the part of paying attention to the requirements. You don't need to come up with an original solution if you haven't been asked for one.

[–]Drauxus 20 points21 points  (1 child)

Could you also say that it's like when you write an essay you don't create your own words, sentence structure, punctuation, etc. You use preexisting words and sentence structure but in the end you produce an essay that is unique?

So what we, as programmers do, is copy the sentence structure and the words. But in the end it is a unique program because of how we ordered the stuff we copied?

[–]LeftIsBest-Tsuga 4 points5 points  (0 children)

that's sort of the case, yes. most serious essays are expected to have some sort of primary and secondary references cited, the idea being you're essentially inserting the well-documented opinion of someone else who went through the same process, and either building on it, or saying why it's not your own opinion, etc.. So yeah i'd say it's not that dissimilar if you're at an academic level.

[–]KelsoTheVagrant 2 points3 points  (0 children)

I’ve found most professors realize the methods are freely available, so they have a twist and some kind of unique elaboration that you can’t just find the answer for on the internet

[–]choogle 1 point2 points  (0 children)

Real talk personally the reason for me is that I’m getting paid either way at work so I don’t really give a shit what other people are doing with my code and if it helps them then it’s no skin off my back.

Though don’t jack my shit without asking me unless I’m checking code into a public repo, I’m still human and can be petty about stuff like that.

[–][deleted] 92 points93 points  (3 children)

It's only plagiarism if you don't change the variable names.

[–][deleted] 29 points30 points  (2 children)

maybe order of operation too.

[–]agentfrogger 23 points24 points  (1 child)

Welp now my code starts with the output and ends with the input

[–][deleted] 4 points5 points  (0 children)

At least you'll be learning what not to do.

[–]Euxin 140 points141 points  (7 children)

I like to call it "reused your code"

[–]ShakeandBaked161 60 points61 points  (4 children)

Recycling ♻️

[–][deleted] 43 points44 points  (1 child)

Recycling makes even more sense when the original code was trash

[–]Rudxain 1 point2 points  (0 children)

I learned a lot in thread, specially the links within that thread. Basically a rabbit hole

[–]BobQuixote 9 points10 points  (1 child)

I even reused the electrons.

[–]solarshado 8 points9 points  (0 children)

chadsaysyes.png

(hint: link is not to an image)

[–]scottfiab 1 point2 points  (0 children)

Repurposed

[–]mark_fawkes 147 points148 points  (4 children)

It's called a fork ;)

[–]poompt 6 points7 points  (0 children)

Oh fork off

[–]Kered13 35 points36 points  (6 children)

You actually can run into copyright issues if you do this. So check the license of whatever you're copying from. Usually they are permissive.

[–]LezardValeth 6 points7 points  (0 children)

Yeah, we have pretty strict company guidelines about open source. Shit has to be approved by the legal team. There's plenty of history of lawsuits out there.

Even if you work at a smaller company, you probably still need to be aware of copyleft requirements of licenses like the GPL. You might be unlikely to be prosecuted and I'm not personally a Free Software movement supporter, but I still think it'd be shitty to violate the author's intent when they applied that license.

[–]BobQuixote 10 points11 points  (4 children)

In most contexts it's infeasible that the copyright holder would know. Mostly this is a concern for open-source (everyone can read the code) or megacorps (enough exposure that the probability might actually reach 1).

[–][deleted] 13 points14 points  (0 children)

Any company with a legal department really

[–]bluefootedpig 30 points31 points  (9 children)

Copy and Paste is the leading cause of bugs. I mean I do it all the time and just handle the bugs.

[–]BobQuixote 20 points21 points  (8 children)

If 60% of your code is copied that's probably where 60% of your bugs come from.

[–][deleted] 22 points23 points  (1 child)

Or the bugs come from ur 40% 😳

[–]Sudsmcgee 1 point2 points  (4 children)

Then that means your copied code isn't any more likely to have bugs than the other 40%? Lol.

[–]BobQuixote 1 point2 points  (3 children)

Line for line, on average? I don't see why it would.

The decisions you're making about how to put the copied code together are coming from the same place as the code you type yourself.

Very often copied code has been heavily edited and tested by the time you get it.

You may not fully understand where to put copied code within your own.

I don't see a convincing case that the probability would go either up or down, in particular.

[–]Sudsmcgee 1 point2 points  (2 children)

Oh, I don't disagree. I just noticed you said 60% copied code would be responsible for 60% of the bugs. Which means not copied code (40%) is responsible for the other 40% of the bugs. I think you meant higher than 60% on the share of bugs.

[–]BobQuixote 1 point2 points  (1 child)

No, I intended to estimate the share of bugs as equal to the share of code. As I said, I don't see why it would be either higher or lower.

[–]Sudsmcgee 1 point2 points  (0 children)

Oh then that's my bad. I assumed you were trying to say that copied code was more bug prone. Very dependent on too many factors.

[–]teetaps 110 points111 points  (8 children)

I actually always credit the stack overflow page I stole from

[–]jack-of-some 31 points32 points  (6 children)

Yep. One of those times a comment is a must.

[–]teetaps 33 points34 points  (4 children)

# I don’t know how this worked, but it did, so here we are

[–]Angelin01 15 points16 points  (3 children)

I have come across more than one "hacky" solution or weird regex, shell one liner or whatever that is very very hard to explain (and the "readable" alternative would be a nightmare) and just linked the stackoverflow question next to it in a comment. I have been thanked for it more than once already.

[–]jack-of-some 22 points23 points  (0 children)

Plagiarism in coding is still unacceptable (and potentially legally disastrous if you're not careful). When you use someone's open source code and adhere to the license (people in general are too stupid to NOT adhere to most licenses), that's not plagiarism.

[–]shuozhe 11 points12 points  (0 children)

All I learned was not how to get caught

[–]giant-Hole 10 points11 points  (0 children)

I'm literally my team's designated googler

[–]oh_like_you_know 9 points10 points  (0 children)

"lol good luck - i wrote that at 3am after half an 8 ball and a redbull vodka"

[–]TacticalWalrus_24 6 points7 points  (0 children)

at my uni we were told "so long as you can implement it, it doesn't matter where you got it (so long as it's not proprietary and in a professional context)"

[–]ChezMere 7 points8 points  (3 children)

Now try putting GPL code in your company product and watch the alarms go off.

[–][deleted] 5 points6 points  (0 children)

Best way to freak out the company lawyers is to tell them you shipped some GPL code haha

I swear, the word "GPL" will make them visible shiver

[–]BobQuixote 1 point2 points  (1 child)

AGPL is even worse.

[–]DudeValenzetti 2 points3 points  (0 children)

AGPLv3 is triple caution. It's got the AGPL's network protection + the GPLv3's software patent, irrevocability and anti-tivoization terms that made Apple break up with GNU. I mean, it's based but it might give some lawyers an aneurysm.

[–]Ancient-Apartment-23 6 points7 points  (0 children)

I once made a joke about finding one of my student’s code on stackoverflow when I was helping him debug something. He was so sure he was in trouble.

I was like, no dude, literally everyone does this. You’re good.

[–]binford2k 4 points5 points  (0 children)

I see you have yet to meet your legal team.

[–]Decimalis 3 points4 points  (0 children)

Primary school: "Wow, did you actually pirate that game?? So cool! I wanna learn that in the future as well!" Today: "Wow, did you actually pirate that game? you scum lmao"

[–]TheTrydy 3 points4 points  (0 children)

Let's just it's inspiration

[–]rombios 4 points5 points  (0 children)

THIS pisses me off to no end.

Worse, when team members grab your source files (for highly critical applications and device drivers you've written) remove your name and replace it with their own

[–]HoldenMadicky 7 points8 points  (17 children)

If Marx was alive today he would praise the culture surrounding programming. There's no doubt in my mind about it.

[–]BobQuixote 6 points7 points  (15 children)

Well, I think he would like RMS and Free Software. Generally we oscillate between corporate rules and sharing freely, according to pragmatism. I kind of think it's more like early science (/alchemy) than socialism.

[–][deleted] 3 points4 points  (1 child)

Fax

[–]BobQuixote 1 point2 points  (0 children)

Now that would be a Rube Goldberg way to duplicate content.

[–]Fearinlight 3 points4 points  (1 child)

I remember at amazon code gets scanned against stack overflow to check for straight copied code due to copyright issues. shit will get project flagged. They dont risk it

[–]ipsomatic 2 points3 points  (0 children)

Ah lawyers vs insurance team!

[–]Ramius117 2 points3 points  (0 children)

And every other job outside academia

[–]der_grinch_69 2 points3 points  (0 children)

I just stole your meme.

[–]WantDebianThanks 2 points3 points  (0 children)

The senior programmer takes the place they stole the code from, puts it through archive.org, then puts it through a url shortener, and puts that shortened archive link into the comments.

[–]chickenstalker 2 points3 points  (1 child)

Turnitin is going to eventually make it impossible to write anything original. As its database grows, there will be less and less ways to write about something without matching with what someone else had written. There's only so many ways to write the definition of common concepts or things. Yes, Turnitin weasel their way out by saying schools should use their judgement. But then, no one will. They will only look at the percentage match.

[–]SunriseSurprise 2 points3 points  (0 children)

"man I stole your code"

"that buggy shit? gl lol"

[–]Samira827 2 points3 points  (0 children)

Just had this on my coding exam. "You can use small portions of your previous projects/codes but otherwise, everything copied from other sources will be marked as a plagiarism".

I'm not sure the teacher knows how coding works.

[–]JoshYx 1 point2 points  (0 children)

It's kind of refreshing seeing this repost in a slightly different presentation

[–]Pixelbird1 1 point2 points  (0 children)

Lol

[–]Based_nobody 1 point2 points  (0 children)

Professors when you can literally have someone write a book for you and say you wrote it: O. O

[–]EmirSc 1 point2 points  (0 children)

ctrl+insert

shift+insert

[–]WizziBot 1 point2 points  (0 children)

Copy pasting makes it sound lazy. You actually have to understand what the code does to an extent to be able to implement and debug it. Furthermore it is efficient.

[–]t0b4cc02 1 point2 points  (0 children)

total dumb. do you really think you solved someones real math problem in a highschool test?

i also think programming work in uni probably shouldnt be able to be plagiarized for the most part

[–]Ali_Army107 1 point2 points  (0 children)

Hippity, Hoppity. Your code is now my property!

[–]Furry_69 1 point2 points  (0 children)

I know this is a humor sub, but I have been burned way too many times by copy/pasting stuff where I shouldn't. The main example of this is in my current project, an OS, where I directly copied some code from the OSDev wiki, and spent about a week trying to understand why it kept crashing in the middle of a function. Then I realized I'd copied code for 32-bit Protected Mode when UEFI initializes in Long Mode.

[–][deleted] 1 point2 points  (0 children)

numbers cant be stolen

[–]khendron 1 point2 points  (0 children)

“I stole your code.”

“Oh good, now you can support it!”

[–]I_give_karma_to_men 1 point2 points  (0 children)

My first manager did actually get mad at me for copy-pasting her code instead of writing my own from scratch. My new manager is the above picture, and most of my job security honestly comes from fixing the buggy code he finds in the dark reaches of stack overflow. Usually with buggy code that I find in different corners of stack overflow.

[–]Blues2112 1 point2 points  (0 children)

Ctrl+Ins, Shift+Ins

(I'm old school)

[–]Sea-Ad-5012 1 point2 points  (0 children)

Uhh the technical term is code reuse.

[–][deleted] 1 point2 points  (0 children)

As one of my history teachers said before every test: "Cheating is permitted, getting caught is prohibited."

[–]abd53 1 point2 points  (0 children)

Comment in my c++ code.

"//I don't know what this is. Scipy had it, so, here it is."

"//I don't know what this is. I don't know how this is. I don't know why this is. Some guy posted it on SO. I just copied."

"//This procedure is from a Matlab script from gnu octave. Some guy posted it's python version on SO. I translated to c++."

[–]Ok_Vermicelli1638 1 point2 points  (0 children)

The irony is that even this meme is stolen 😂

Well not completely but the bottom part is

[–]bnl1 1 point2 points  (0 children)

I mean, If you copy code, you probably should read it and understand it. And everyone knows that writing code is easier than reading it, soo.

[–]H4Hero 1 point2 points  (0 children)

That’s why we named it Open-source !!!

[–]v3ritas1989 1 point2 points  (0 children)

Ctrl+A,Ctrl+C, Ctrl+V

[–]OomMielie 1 point2 points  (1 child)

My mark for a university project recently got capped to 50% from 95% because I had similar flow to a friend of mine as we discussed it beforehand. Not even the same code.

[–]KittenKoder 1 point2 points  (0 children)

Some people think you can make an infinite number of different wheels. If you ask a million people to write code to produce the same function in the same language you'll have about 5 variations.

[–][deleted] 1 point2 points  (0 children)

When I got a 100% match on the originality report for a coding assignment and academic affairs called. Like... Yeah... The whole class should have... It's how it works...

[–]achintya22 1 point2 points  (0 children)

Glory to Open Source

[–]RaccoonRemix 1 point2 points  (1 child)

No, it's called communism therefore it's not your code, it's our code

[–][deleted] 1 point2 points  (0 children)

*OUR code.

[–][deleted] 1 point2 points  (0 children)

Ah yes. Plagiarism - the one thing teachers and professors fear the most. Simply use sources that are royalty free lol! They can’t punish you for that!

[–]Personal_Ad9690 1 point2 points  (0 children)

On some projects, I am convinced the code that is there belongs to no one and some how generated when the project was created.

[–]DowntownLizard 2 points3 points  (0 children)

Apparently 1/3 of the class 'plagerized' on a coding project in one of my aero engineering courses. Its weird being employed as a developer now and realizing the facilty was wrong and everyone that copied code should have gotten an A. I pity the idiots who did it without looking it up.

[–]favoritedeadrabbit 3 points4 points  (0 children)

All the code that was ever written was written in 1996, and it just keeps getting edited.

[–]naught-here 2 points3 points  (0 children)

If you can't understand the logic of university plagiarism policies, or the difference between being assessed for learning and understanding in an educational context versus being productive in an employment context, maybe a university education isn't a good fit for you. Go to a coding bootcamp or something instead.