This resonates with me. I had a recent stint of not writing due to very intense discouragement and feeling like a bit of a fraud. Like Jonas, I was writing for myself and kind of lived in a bubble where my posts had no comment system and I saw around 5 visitors per day on average with the odd boom to hundreds to thousands for a day or two. This was rare. I didn't worry much about what I wrote so much as how much I enjoyed writing it.
Eventually I was struggling in the job market and someone suggested that my writing was hurting my prospects. They found the odd typo and grammar mistake, thought the content wasn't particularly good, that it was hard to follow/disjointed, etc.
I immediately took it all down and felt like a bit of a fool to have thought anyone would actually find it useful. Maybe I should have written it but kept it offline like a personal journal, I thought.
After a year or so it occurred to me how incredibly wrong all of that was. I never should have taken anything offline. I've hired people before, many times, and not once did I stumble across a candidate's personal blog and think "ugh, typos. grammar mistakes. no thanks". These things are a signal of a person's character, curiosity, ability, and all kinds of other factors that matter a lot. Almost always these things helped people I was hiring more than it hurt. There's the odd case where I could tell the site wasn't followed through on and that's not great, but it's very relatable too.
I took a while but started writing again, started sharing it in an attempt to shake the self-doubt out of myself, and it has been an incredibly refreshing and rejuvenating experience. Writing reminds me of what I love about programming, because I primarily write about the things I find fascinating or engaging. It gives me a greater sense of knowledge and ability as I've covered a topic so thoroughly. It's a mental exercise not only in writing itself, but understanding.
Jonas says this and I couldn't agree more: something about it is just fun. I can't put my finger on it. When I'm writing, I'm in a focused and engaged state almost instantly. It's where I want to be.
If you doubt yourself and feel like writing isn't for you—even though you enjoy it—I hope you can take something from my experience and realize that it's still worth it. No one cares if you don't write like an acclaimed author. No one cares if there's the odd typo or bad grammar. The point is to enjoy it, and share that with people who are curious. The more you do it, the better you'll get. It can become a real source of joy in your life.