Live data from Hacker News

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

news.ycombinator.com

91–100 of 100 posts

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

#91
post #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 afte…

> "I put effort to think about design, structure, and implementation more than coworkers." Everybody thinks the same.

[deleted]

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

#92
> worry about other students being lazy and just ripping my hard work and claiming it as their own

Lets say that happened. So what? What did you lose?

And another thing - your code is probably not something unique or particularly excellent. This not to berate/discourage you but just to perhaps nudge you to see things objectively.

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

#93
post #57

Truth: no-one really cares about your code We publish code so others can see it , the lazy and the productive. Lazy people do not prosper, so don't waste your energy thinking about them. Why do you want to publish yours, just as a portfolio? Then make a portfolio.

See I see this a different way. People only read your code when something is wrong, which means they’re already annoyed before they get to your bit and if your bit is also annoying you’re going to either hear about it or get frozen out because if it. This is at least 4x more true of tests. I’ve witnessed too many PRs where obvious problems in the tests get missed and are then found during the RCA that covers the outa…

> People only read your code when something is wrong, which means they’re already annoyed before they get to your bit and if your bit is also annoying you’re going to either hear about it or get frozen out because if it.

If you’re talking about angry issues in FOSS, then there’s another positive way to look at this.

Not only did at least 1 person run your code somehow, they also cared enough to find the source and report it to you. Which means your code has value!!

But generally people are pretty nice when reporting issues to small projects

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

#94
post #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 afte…

> "I put effort to think about design, structure, and implementation more than coworkers." Everybody thinks the same.

Have you ever worked on a PHP codebase that’s 15 years old, has over a million LoC, provides business-critical functionality, has seen hundreds of developers come and go, and has absolutely nothing that could be interpreted as either being the result of design, or having actual software architecture, or even a consistent structure?

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

#95
post #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 afte…

> implementing non-trivial features, I struggle to come up with good implementation

In my experience, the best solution for this is to just schedule a 30min call with your team's most senior dev and hammer out a solution together. You probably won't even have to pair program, just some bullet points.

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

#96

Truth: no-one really cares about your code We publish code so others can see it , the lazy and the productive. Lazy people do not prosper, so don't waste your energy thinking about them. Why do you want to publish yours, just as a portfolio? Then make a portfolio.

Do you see no value in publishing the code behind items in your portfolio?

I'm not the guy wary of publishing his code.

Mine's out there. In Gitub, in plan9 contrib, on my website - the good, the broken and the cringe.

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

#98
post #93
post #57

Earlier quoted context omitted.

See I see this a different way. People only read your code when something is wrong, which means they’re already annoyed before they get to your bit and if your bit is also annoying you’re going to either hear about it or get frozen out because if it. This is at least 4x more true of tests. I’ve witnessed too many PRs where obvious problems in the tests get missed and are then found during the RCA that covers the outa…

> People only read your code when something is wrong, which means they’re already annoyed before they get to your bit and if your bit is also annoying you’re going to either hear about it or get frozen out because if it. If you’re talking about angry issues in FOSS, then there’s another positive way to look at this. Not only did at least 1 person run your code somehow, they also cared enough to find the source and re…

OSS has its own set of problems but I was talking more of commercial projects. Ones where people are being paid to care and when they don’t we have a problem.

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

#99
Totally fair concern. Sharing code publicly can feel risky, but it’s also one of the best ways to learn and build credibility. If plagiarism worries you, start by open-sourcing smaller or older projects, or parts of a larger one that aren’t critical.

People rarely gain much from just copying code; what stands out is your process, documentation, and improvement over time. Eventually, the benefits of visibility usually outweigh the risks.

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

#100
I’d say don’t even think about this at all

Put all that questioning energy into asking yourself if your code is solving problems well and if there’s a way you can improve what you’ve built based on any issues you encounter along the way. Robust solutions exist for most problems, and when you find a problem in those and contribute or work around them, then you can say that you’re good.

Have your good friends look at your code, you can find great friendships in tech at work, or on X, discords/slacks. Share it in those spaces.

Post reply on HN