Yes. The internet is a huge part of this issue.
Just don't take the losers on the internet seriously and you're good to go.
Always keep in mind that a good deal of the people you come across on forums and social media are chronically online. They can't function in the real world with real consequences, so they are stuck acting like an idiot to strangers.
Really? I have almost the exact opposite experience when I look at my old code.
I'm usually afraid that it's junk and I could've done better, but then I'm routinely impressed by what I've written and go "Man, I did a good job with this."