Ask HN: How do you get over the fear of sharing code?
I'm a junior. Truth be told, I don't really care if professionals/adults see my code or pick it apart/mock it/fork it or whatever. All my repos are private just because I worry about other students being lazy and just ripping my hard work and claiming it as their own. That really pisses me off when I hear some horror stories like that.
Is this unfounded? Or do I have a right for some concern? It's obviously easier for viewers to just see public code repos and browse without ever requesting access so I know I'm losing some traffic (from my portfolio site)
I was thinking the alternative would be just linking my demo on my portfolio site as a proof of concept that yes I made it, yes it works, and if you're curious , here's a link to the code u can request independently of github.
Thank you in advance.
67 comments
[ 3.2 ms ] story [ 61.4 ms ] threadWe are often our own worst critics - put your stuff out there, there is little to lose and some upside, if someone likes your demo and clicks through to see the code and can see it then that's a low friction path, by having to request access most people won't or will - but forget all about it etc.
People you never heard of are open-sourcing projects you'll never find every day, there are hundreds of millions of repositories on GitHub and very few of them will ever be seen by humans who didn't write them, let alone humans looking to pretend they did.
Presumably someone looking at your portfolio will be reviewing CVs to hire? I think throwing up a barrier on them evaluating your code will hurt you much more than the rest of the world being able to see it.
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 not a lot more I could do about it and it’s not worth the headache.
I continue to share openly.
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.
Make the code part of your professional marketing. It’s not code for code sake but to enable you to blog, speak, etc about something interesting. Then there’s little chance some theoretical thief is also communicating those ideas. And if you’re good at evangelizing yourself it SHOULD happen that someone steals your code. If anyone looks up the ideas, they’ll be inundated by content you created. The code is secondary.
Especially true when working as an employee where you don't own your code.
If you're not going to do a startup with your code, you probably need to focus on a mix of learning and self-promotion. With the market prioritizing self-promotion. Which probably means just trying to make sure that code that reflects well on you, does so.
Which probably means making it it open source, even if AI training data companies will steal it and give it away.
Is the main concern that you have a class project you don't want other people taking credit for as their own? I wouldn't bother sharing standardized class projects that future classes may give again, and those projects don't mean much anyways. Your portfolio should ideally be projects that are something more uniquely created by you.
Also, what's specifically the issue with other students taking credit for your work as their own? In a school setting, it should be pretty clear who committed their code first. If it's for future employers, the most important thing is demonstrating full understanding of the project while being able to discuss it.
That said, fear of someone stealing your code is completely unfounded as there isn’t really anything novel we produce anymore. If you are on the bleeding edge, you welcome input and PR’s from others to make it better. Only wise men know they know nothing. Collectively, we can build some amazing software.
Now, if you’re trying to build a business off of your software, you may want to keep that to yourself and not share it. If your business isn’t the software but your service, there’s no harm.
But in reality the original is often the best updated and the forks will fall behind because they have to merge your changes and you don't have to do that.
https://en.wikipedia.org/wiki/Exposure_therapy
There's really no other successful approach I've seen for curing anxiety. You have to just steel yourself and do the thing you're afraid of. It gets easier every time.
https://youtu.be/MJzV0CX0q8o?si=aVmlJNuSlSyjomQa
Keep in mind that you are in control of what people are allowed to do with your software. By default, your code is unlicensed even if it is public, which means no one else can distribute it or change it or do much of anything with it. Thus, if someone uses it and claims it to be theirs, you can sue them if you want to.
However, instead of leaving your code unlicensed, I would recommend choosing an open source license and applying it to your code when you make it public. There are many to choose from!
By applying a license to your code, you are establishing a clear framework for what other people are and aren’t allowed to do with it. And it’s legally enforceable. In fact, there are organizations that may step in to help you if someone violates your license or challenges it in court. For example, my preferred license is the Mozilla Public License. If someone tried to challenge me on any part of that license, Mozilla would have a vested interest in defending it, since it’s their license and they use it, too. Their lawyer is even available to chat with over email. I once reached out to ask if I could make a small tweak to the license without causing headaches. They got back to me within a few days and said it would be fine. That gave me a lot of confidence to continue using it.
Some licenses are very permissive, such as MIT. Others are much more restrictive, such as GPL. The MPL, which I use, is somewhere in between.
What’s right for you really just depends on what you consider to be fair. And every project can be different. Maybe you build some small tools that you release under MIT, essentially donating them to all of humanity. Meanwhile, you create a startup and build a product where you keep some of it private and release parts of it publicly, licensed under the GPL, because you don’t want huge corporations stealing the work for your day job without reciprocating. That’s a relatively common approach.
Whatever you decide, just make some of your code public. The feedback and experience will be well worth it. Good luck!