Live data from Hacker News

Ask HN: How do you get over the fear of sharing code?

news.ycombinator.com

61–70 of 100 posts

Re: Ask HN: How do you get over the fear of sharing code?

#61
Think about it for a moment, what do you lose from someone copying your stuff ? What do they lose ?

If people insist on staying ignorant, let them, it won't hurt you, but it will them.

Just put your stuff out there if you think someone might find it interesting or useful.

Re: Ask HN: How do you get over the fear of sharing code?

#62
Most code is throwaway, even to you.

Most code will quickly be obsolete anyways, even for you.

Most code you write will be torn apart by often the harshest critic: yourself.

People who chase others' code just to copy it and not to understand it will not get anywhere, especially today.

Share for your benefit first, and share often. That's how I have found my gems, even for code I've written.

Re: Ask HN: How do you get over the fear of sharing code?

#64
post #50

I wouldn’t worry about students. They won’t be hurting you, only themselves. If the goal is to learn, they aren’t learning. This will either mean programming is a random class they’re taking, not their career, so who cares… or they’ll have a really hard time later in life when they will need to sink or swim in a real job, having not first developed the skills. That’s not a problem for you. It’s also much more likely…

It's considered my responsibility to protect my labwork at my school, and I could get in trouble if someone else plagiarized it from GitHub.

Your school lab work is only valuable to yourself and other students who wish to plagiarize, there's not really a compelling reason to share that code.

If you're writing other software beyond classwork that you wish to share, the school has no say over it, no more than they would if you chose to write a book while in school.

Re: Ask HN: How do you get over the fear of sharing code?

#65
I just got off of a few years at a FAANG and perhaps my greatest learning is that code is just table stakes. That is, it hardly matters and for a well functioning business it is best for it to be malleable and to not get too attached. It’s just code, the product is what actually matters.

Really just a long winded way of saying no one cares. Anybody who is looking at your portfolio is going to care more about what you built than how you built it. Anyone trying to rip you off it’s just hurting themselves more than anything

Re: Ask HN: How do you get over the fear of sharing code?

#66
post #7

I’ve had several people steal my open-source code for different projects before. I’m talking copying (not cloning) the whole thing, changing the credit to their name, making no other modifications, and then republishing on their account. Fortunately they never gained much traction. The ones I know about I blocked on GitHub with a note. No idea if they ever found out or if they tried workarounds, but I figured there’s…

do u find it typically only happened on projects that gained traction in the first place?

They all had some traction, probably a few thousand users but nothing crazy.

Re: Ask HN: How do you get over the fear of sharing code?

#67
I fear sharing code for a different reason. I'm a perfectionist with tendency toward procrastination and anxiety, and sometimes I overestimate my abilities. So when I submit a PR, I want to make sure the code is clean, well organized, and covers all corner cases and hidden feature details. This works well most of the time. I put effort to think about design, structure, and implementation more than coworkers. And after a decade of experience I can code quickly for tedious tasks.

But sometimes, when implementing non-trivial features, I struggle to come up with good implementation. This prevents submitting working code early. And when I feel I'm delayed, my anxiety kicks in, and I have this urge to implement cleaner code and more features than expected even though all of my coworkers just want working code. And I feel more pressure, more urge to implement well, more anxiety, but it makes me procrastinate (I'm working from home so I can just lie down on the bed when I'm depressed). Sometimes I manage to implement, sometimes I give up and the feature is not implemented or assigned to a coworker. But in few cases I end up with severe depression, stop functioning, and finally quit the job.

I can handle this better than before after making same mistakes again and again, but still happens sometimes.

Re: Ask HN: How do you get over the fear of sharing code?

#69
Literally no one reads your code. No one! Not other engineers, not annoyed people on HN, not even people for whom it would probably be a pretty good idea. There is a common misconception that published code can build your portfolio; this is basically entirely false. I've had conversations like this:

Recruiter: "We want you to do a take home so we can get a sense of how well you can code."

Me: "I have a repo on Github with 10M downloads, 10k stars, and about 50k lines of my own code. Would that be useful to make an assessment?"

Recruiter: "Haha, no. Please do this take home that has you render a few divs in a tedious way."

So if people who are even financially incentivized to read your code don't do it, I'd say that the chances of anyone reading your code is virtually nil.

Re: Ask HN: How do you get over the fear of sharing code?

#70
post #50

Earlier quoted context omitted.

It's considered my responsibility to protect my labwork at my school, and I could get in trouble if someone else plagiarized it from GitHub.

Your school lab work is only valuable to yourself and other students who wish to plagiarize, there's not really a compelling reason to share that code. If you're writing other software beyond classwork that you wish to share, the school has no say over it, no more than they would if you chose to write a book while in school.

This incentivizes me to minimum effort school projects so I can focus on personal projects.

But most professors want students to be creative and inventive on classwork.

I get that this isn't a problem if I treat my schoolwork as having no utility beyond the course I made it for, but that isn't the ideal.

Post reply on HN