Your blog has to be very popular if you want it to profitable.
Unless you have enough traffic it is not even worth to monetize it as the result will be relatively poor and the effort big.
I am not saying it is not possible, as it is and for some, blogging has become a lifestyle.
Once your blog gets all the attention, you can get money out of it through various channels.
The first way to make money as a blogger is being a publisher in one of some advertising networks. My advice here is to choose a reputable and famous partner here. Google Adsense for instance, allows you to fully configure the outlook and the topic of the ads. Also the pay is very nice. İt is pay-per-click network and you might get something between .05 and 1€ when somebody clicks on your ad unit. İt is a very easy and quick way to start doing the first income.
Secondly, sell ad space on your page. If you do not know how to get people to buy it, just put a banner with the offer on your page and make the proccess of uploading the banners easy. For managing payments you can use Braintree or Stripe. This will work only for these who know their way and have some experience in programming as you still need to do some image proccessing and implementing the gateways by yourself.
İf you are able to implement the above, you will probably get the most value from your blog indirectly.
You write about stuff, programming, passion and your expertise. Others will see it, talk about it and repeat. Your friends, family and co-workers. Eventually somebody will contact you and ask for help. And that is not going to be a freebie.
İf you have a firm, it will attract customers and show everybody your skills. You are becoming reliable and trustworthy. The blog serves just as a notepad for the ideas and thoughts you want to share. Also, it enables the would-be customers to make a thoughtful decision.