Those who put down others or leave nonconstructive feedback, even HN commenters, are not worth your time worrying over.
Anyways, you should see some code that gets submitted as homework tasks in interviews from enterprise programmers. That is the stuff that programmers do not publish, and the range of code quality and code understanding is large. There are working professionals with multi-year experience in C++ who cannot describe in their own words the relationship between a raw pointer and a memory address. I don't have a strong opinion on that, I've seen it all. But the quality bar to feel good enough about your work is not as high as you think it is, probably.
Also... there is a lot of fanaticism and brash comments about programming online. There is a reason why the "very online" group of people doesn't overlap with experts in any almost any industry. Opinions of most experts on things like code quality are very measured, they don't earn a lot of karma or upvotes, or likes. So don't put too much weight on what you see online when choosing to publish or not publish code, a lot of online comments are for shock value.
When I first started pushing out shit code on GitHub, I did it under a pseudonym and never tied it to my real identity. I think that really helps when first getting started since you know it’ll never affect you personally. After getting the hang of it, then perhaps tie that to yourself.
But to be honest, I doubt anyone cares much about your/my code nor would they bother judging it.
Of course, I’ve only been programming for ~5 years so I might be missing stuff.
There is some source code I've looked at that I thought was clear and easy to understand (at the time at least. I also like simple C/C++ code that compiles with "make", ideally with minimal #ifdefs and without lengthy configure scripts.) This is very rare in my experience, although I really like to see it!
Seriously, building things that are fun and interesting to you and getting them to work is one of the best things you can do. Once you have something working then you can decide whether you can just clean up your existing implementation or whether you want to reorganize it or rewrite it completely, but you'll be at the point where you understand your problem and its solution.