Readit News logoReadit News
Posted by u/sodokuwizard a month ago
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.

hamasho · a month ago
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.

davman · a month ago
Is this an alt account I didn’t know I had?
begueradj · a month ago
> "I put effort to think about design, structure, and implementation more than coworkers."

Everybody thinks the same.

cluckindan · a month ago
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?

Deleted Comment

joenot443 · a month ago
> 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.

delaminator · a month ago
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.

hinkley · a month ago
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 outage the shitty tests didn’t prevent. Trying to fix a bug in someone else’s code and discovering just how terrible they are at writing tests is salt in the wounds.

gitgud · a month ago
> 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

hirako2000 · a month ago
Do you see no value in publishing the code behind items in your portfolio?
delaminator · a month ago
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.

numpy-thagoras · a month ago
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.

noir_lord · a month ago
One of the things you learn as you get older is other people don't think about you (or at all) as much you think they do/will.

We 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.

sodokuwizard · a month ago
thank you , yeah I think im overthinking this
tchalla · a month ago
It’s a well studied psychological phenomena too.

https://en.wikipedia.org/wiki/Spotlight_effect

lelandbatey · a month ago
Echoing what others have said: just post your stuff. If you're not intentionally publicizing yourself or your work, I can nearly guarantee that no one will ever even look at your work. I've been putting up my little personal projects up on my GitHub for over ten years, and yet no one's ever come around to look at them except when I intentionally posted links to those projects on places like HN.

No one's going to look unless you ask them to look. If you already have a big audience (over 100+ people daily using things you've built) no one is going to "get curious" about your projects. So just post them so folks can see them.

beej71 · a month ago
As an instructor, I think you should have your stuff private while you're a student in a particular class. Just share the repo with the instructor. The reasoning is that if someone steals your stuff, it's often hard for an instructor to tell who stole from whom. And that's just trouble you don't need. Yes, you can argue commit histories and all that, but why bother?

Once you're out of the class, there's no reason to keep it private in my humble opinion. The answers to everything every instructor gives in school is out there somewhere. And AI can solve most of them.

softwaredoug · a month ago
> 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.

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.

benoau · a month ago
Reminds of the thought experiment, "if a tree falls in a forest and no one is around to hear it, does it make a sound?"...

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.

sodokuwizard · a month ago
thats very true , and a good way of looking at it from a practical perspective

thank you

reactordev · a month ago
With LLM’s now, odds are, they’ll just copy pasta that code. Yours may be similar but if you slap a license on it, most people respect that and will adhere to 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.

Pannoniae · a month ago
"there isn’t really anything novel we produce anymore."

Sorry for the somewhat snide comment but not with that attitude.... I know, end of history and all but it's not like we ran out of problems to solve, we maybe just don't bother solving them anymore. But we should!

reactordev · a month ago
Of course, there’s still problems to solve. Odds are you’ll use a pattern that’s been used before is all I’m saying.