blogging, self development

The Importance of Tech Blogging

I have a lot to share when it comes to blogging. This is actually my third tech blog and a pretty successful one. Yay, finally! :) It's a shame that really good engineers, with a lot to share often find excuses to not start blogging. Usually, you will hear things like "I have no time for writing" or they just don't see the point. They don't understand how the blog can help them professionally among other things. Now, more than ever it's important for you to do something that will be shared with the whole world. And, we as a tech people should be a role model.

Why to Start Blogging?

First I need to answer this question. Why? There are numerous reasons, but it all comes to the most important one, exposure. As software engineers, we are operating globally and while there are a lot of jobs/projects out there we are competing with the whole world. You should think and act globally!

CV in a tech world is dead, almost. This is why exposure is important. People will find you, read what you are doing and usually offer you something later. From my personal experience as a DevOps engineer, I rarely send a CV anymore. Actually, I cannot remember when I did that last time. You will find my articles everywhere, and because of that recruiters or companies directly contact me on a weekly basis. Opportunities are coming to me instead of me chasing them.

Keeping all the above in mind, you will also learn a lot more about the things you write.

Where to Start?

You can write about interesting things you did recently or to write about something you want to understand better. Don't wait to find a perfect title. While learning Kubernetes I was struggling to find good articles that should help me to get started and here we are. I'm writing about Kubernetes a lot. To give you another example, my fiancee waited for years to start blogging. She didn't believe that her content would be interesting to someone and that held her back the whole time. I'm proud that she started and she is writing more than me now. I recommend you to read those two blog posts from her on how to master a life change:

Don't spend too much time on thinking what to write and how your blog should look like. Basically, you could start writing right away in some Google doc. While writing you will get some new ideas as well. You will not be going to like your first post after some time anyway, and it doesn't matter how much effort you put into it. That is OK. You will master your skills over time.

I mentioned that this is my third blog. I was writing about FreeBSD tips and tricks because it was my preferred OS. That didn't go well (who would guess) and then while researching OpenShift a few years ago I decided to write a blog post on how to run a Wordpress blog for free on that platform. I quickly created the new blog called TechBar and started writing. The new blog didn't go well either. The problem was that I wasn't consistent and I stopped writing completely after some time. Consistency is a key when it comes to blogging.

Technical Stuff

Maybe you already wrote something, but now you need to choose the things like the name of your blog, domain name, where to host it and other technical stuff. You could be pretty lost with all a lot of decisions to make. It could be really simple or really complex, depending on a path you choose. I recommend using some ready to use hosting platform with Wordpress or Ghost. A Medium is also an option, but I'm not a fan.

There are a lot of ready to use hosting providers. For Wordpress, you could use Bluehost which is just $3.95/month and for Ghost, there are official Ghost pro plans where cheapest is $79/month. Ghost pro is too expensive for starters in my opinion. I used both platforms and I like Ghost more. Just my personal preference. I deployed Ghost on a DigitalOcean and it costs me only $6/month with the backup using the smallest VM. It is on idle most of the time with 1k of daily users thanks to Cloudflare.

Me being a DevOps guy, I couldn't help myself to not create Terraform files to start a VM, create firewall rules, enable backup, setup Cloudflare, copy all files and start a Ghost blog in a Docker. Of course, using goodies like Docker and Let's Encrypt - because HTTPS is a must. My Terraform files are still not ready to share, but here is the docker compose file which you could use to start Ghost blog and to get free SSL cert with Let's Encrypt:

⚡ cat > docker-compose.yml <<EOF
version: '3'
services:
   nginx:
     image: nginx
     container_name: nginx-proxy
     restart: always
     volumes:
       - certs:/etc/nginx/certs:ro
       - nginx_conf.d:/etc/nginx/conf.d
       - nginx_vhost.d:/etc/nginx/vhost.d
       - nginx_html:/usr/share/nginx/html
     labels:
       - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
     ports:
       - "80:80"
       - "443:443"

   nginx-gen:
     image: jwilder/docker-gen
     restart: always
     command: -notify-sighup nginx-proxy -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
     volumes:
       - ./files/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - certs:/etc/nginx/certs:ro
       - nginx_conf.d:/etc/nginx/conf.d
       - nginx_vhost.d:/etc/nginx/vhost.d
     depends_on:
       - nginx
     labels:
       - "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen"

   nginx-letsencrypt:
     image: jrcs/letsencrypt-nginx-proxy-companion:stable
     restart: always
     volumes:
       - certs:/etc/nginx/certs
       - nginx_vhost.d:/etc/nginx/vhost.d
       - nginx_html:/usr/share/nginx/html
       - /var/run/docker.sock:/var/run/docker.sock:ro
     depends_on:
       - nginx
       - nginx-gen

   ghost:
     image: ghost:1.24.7-alpine
     restart: always
     volumes:
       - ./data:/var/lib/ghost/content
       - ./files/config.production.json:/var/lib/ghost/config.production.json
     environment:
       - VIRTUAL_HOST=<YOUR_DOMAIN>, www.<YOUR_DOMAIN>
       - LETSENCRYPT_HOST=<YOUR_DOMAIN>, www.<YOUR_DOMAIN>
       - LETSENCRYPT_EMAIL=<YOUR_EMAIL>

volumes:
  nginx_vhost.d:
  nginx_conf.d:
  nginx_html:
  certs:
EOF

Before using this file, you need to have your domain ready and to do some preparation steps:

⚡ mkdir files

⚡ curl https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl > files/nginx.tmpl

⚡ cat > files/config.production.json <<EOF
{
  "url": "http://<YOUR_DOMAIN>/",
  "server": {
    "port": 2368,
    "host": "0.0.0.0"
  },
  "database": {
    "client": "sqlite3",
    "connection": {
      "filename": "/var/lib/ghost/content/data/ghost.db"
    }
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/lib/ghost/content"
  }
}
EOF

⚡ docker-compose.yml up -d

This is what I use for this blog and also did the same for my fiancee's blog Gatta Brava with the help of Terraform which is not included here.

For both blogs, I put more effort than needed. I bought a custom theme and made some customization. I have no idea what I'm doing when it comes to CSS, but I tried and I'm happy with the end result. You will be fine with the default Ghost Casper theme as long as you stick with writing. You can always change it later, so no worries there.

90% of all visits to my blog are from organic search. I learned a lot along the way when it comes to SEO and marketing. All those things cannot be learned overnight, so write and learn how to promote your content. Sometimes you will get great feedback which will boost your confidence. The blog is your personal project. You will make all the decisions and there is some beauty in that.

I recommend watching Troy Hunt's presentation on how to hack your career. Such a great presentation which will probably give you some ideas:

Summary

Maybe you still have some doubts or questions, but you need to try. For any questions I'm here to help, so don't hesitate to reach me @alenkomljen. Stay tuned for the next one.