Blogging is a great thing! This is my recommendation/algorithm.
1. think about distribution - you want a platform like medium that helps you distributing, you want to post on HN (maybe for a few days), you want to tweet it.
2. if you use medium, focus on reads/week as your primary metric. your first goal is to reach 100 reads/week (it's easier than you think). you need to do step 1. in order to get more reads, which in turn will motivate you to keep writing.
(you can check my own medium [1] - it's really bad, I'm not writing since last summer, I'm still getting almost 100 reads/week)
3. make sure you write as you like to read. be concise, focus on the result, short code snippets / leave the rest on github, don't over explain, etc.
4. one of the most important things imo. write for SEO. title should be keyword reach, and make sure to check the keywords of your article with any of the online keyword counters, e.g. [2]. It's a must to maintain the longterm reads/week.
5. as for the topic, don't worry and feel free to be hyper-specific. My most efficient recipe is:
- monitor yourself while working (or studying, experimenting)
- there are times where you search something on google/stackoverflow and the solution doesn't exist in 1 single page, but you have to combine 2-3 different results
- as soon as you have a solution, write it down in a blog post. It shouldn't take more than 1-2h. (examples among my posts: aws policy, kafka offsets, airflow on centos, beam on docker...)
Hope this helps!
[1] https://medium.com/@0x0ece
[2] http://tools.seobook.com/general/keyword-density/