Live data from Hacker News

Good coders borrow, great coders steal

stackoverflow.blog

21–30 of 58 posts

Re: Good coders borrow, great coders steal

#21
post #19
post #15

Something I realized working on a large internal codebase at a company: any line of code you write is liable to be copied-and-pasted at some point in the future. And that's good! Consistency is a very valuable quality of large codebases worked on by many engineers. If I want to figure out how to write a unit test for a service call, find an existing example of that pattern and copy that. Resist the temptation to inve…

I work at a FAANG with a monorepo (or nearly so). For anything that’s not blue-sky R&D, stalking around the codebase for working examples and patterns is a big part of the job. I’ve felt that there is a potentially a role missing here: a kind of free-floating code librarian who is not attached to any particular team and could be called upon to perform basic research of existing patterns. Part of this role could be to…

I've never worked on FAANG scale monorepos, but in normal-sizer project, that would be one team leader.

Re: Good coders borrow, great coders steal

#22

I think I might have a few hundred copies of: ``` # From https://stackoverflow.com/a/246128 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" ```

I think shell is the most plagiarized code in existence.

So many sysadmins have rudimentary skills and simply copy what works.

I have seen some folks with huge repos of code snippets like that

Re: Good coders borrow, great coders steal

#23
post #16
post #9

Earlier quoted context omitted.

It's not trying to be edgy, it's riffing on a famous aphorism that is often attributed to Pablo Picasso. https://quoteinvestigator.com/2013/03/06/artists-steal/

TLDR; it's probably T.S. Elliot and Stravinsky that deserve the credit.

That's one case where QI was weirdly noncommittal. It's obviously Eliot's line ("Immature poets imitate; mature poets steal"), with a couple words replaced. The Stravinsky reference came decades later and was second-hand anyhow.

Re: Good coders borrow, great coders steal

#27
post #19
post #15

Something I realized working on a large internal codebase at a company: any line of code you write is liable to be copied-and-pasted at some point in the future. And that's good! Consistency is a very valuable quality of large codebases worked on by many engineers. If I want to figure out how to write a unit test for a service call, find an existing example of that pattern and copy that. Resist the temptation to inve…

I work at a FAANG with a monorepo (or nearly so). For anything that’s not blue-sky R&D, stalking around the codebase for working examples and patterns is a big part of the job. I’ve felt that there is a potentially a role missing here: a kind of free-floating code librarian who is not attached to any particular team and could be called upon to perform basic research of existing patterns. Part of this role could be to…

> a kind of free-floating code librarian who is not attached to any particular team and could be called upon to perform basic research of existing patterns

I'm on board with this idea, as long as I don't have to learn Dewey Decimal Classification.

Re: Good coders borrow, great coders steal

#28
I like how the west is worried about copying/pasting some code and whether that would lead to some obscure licensing issue in the future where lawyers battle it out for 4 years, costing $3M in attorney fees; while some engineer in Shenzhen going off and copying stuff without any worries and infact openly teaching others in his team to learn how to cook some copy pasta.

IMO software licensing and patent litigations, all this nonsense of patenting a concept or workflow or some stupid idea someone had, hampers society tremendously.

David Beazley did an amazing and entertaining talk about software licensing litigations and what kind of things happen during this process: https://www.youtube.com/watch?v=RZ4Sn-Y7AP8

When I write any code, I take 2 options: 1) Don't share it publicly or 2) Completely release it as public domain. No need for MIT license or any of that crap. Here, just take the code and go win the world, I don't need any credit. Ask yourself how you've benefited from someone crediting you if at all it comes back to you. The world is a large place and just let it go. I am gonna die in 40 years and whatever I do will be totally irrelevant - if my name appears in COPYRIGHT 2020 MR. FERMI ENRICO. YOU MUST CREDIT ME. in some notice that a lawyer with thick glasses is scanning through after I am dead. What an amazing legacy that I am leaving behind.

Furthermore, we need have some respect for people that want to keep code private. Not everyone is interested in open sourcing their work - but somehow that's looked down upon. Why!? It is their work and respect it, there are so many people with pitch fork entitlement. Closed source is OK. They deserve it and hope they can be financially rewarded for the hard work. I see the open-source ecosystem as a double sword edge - we got some cool stuff out of it and everyone shares that base to build off of. But then there is also socialism of code - no one wants to improve it because its not their job, then the open source volunteers are blamed for the quality of their library where these guys are just doing it for fun in their free time - literally no right to get angry at them. Now, everyone is sharing the same shitty unmaintainable library 8 layers deep in their package.json file. The devs are overloaded, issues are piling up on Github and the dude in Shenzhen has already finished the project and his gadget is in prod.

We gotta be more agile lol.

Post reply on HN