The best return on ads is advertising your own products.
That way, rather than getting paid per 1,000 views or a percentage of an affiliate sale, you get all of the sale.
You should advertise on the blog side-bar, within the copy of the tutorial, and at the end of the tutorial.
The in-copy ad should look and feel like part of the tutorial.
The side-bar and after content ad can look like an ad.
A top-of-page banner ad can be used on special occasions like a sale or launch of a new book.
The internet is awash with ads and many developers use ad blockers.
Ads annoy developers. I would recommend not running them.
That being said, once "the machine" is up and running, run an experiment with ads for a month or two and see how it impacts review and the amount of additional revenue it contributes.
It might be better to develop a direct relationship with advertisers and have custom ads. More work load.