I had been approached many times by tech publishers to write books from scratch, but I never found the process and economics attractive.
Then I spotted LeanPub--quite possibly on HN--and I thought, "Hmmm, there is nearly zero barrier to entry." They accepted Markdown, and I already had my entire blog in Markdown on GitHub.
So I published a collection of essays (https://leanpub.com/shippingsoftware), and launched it with a "Show HN" style post, making the book free. LeanPub allows people to pay more if they want, and an amazing number of people paid more, I made $2,000 in one day just from being on the front page of HN.
I've written a few other books since then, but I firmly believe that writing is a side project, not my profession, so I make a lot less than other authors who really put their backs into it.
But I'm happy, and my readers are happy, and I get a little money every month from people I like.
---
A few observations that may be valuable for other side-projects, whether media or software:
Some of my biggest wins were the books I didn't write. LeanPub has a feature where you can cobble together a book title and a cover image, and it creates a landing page that collects emails from interested readers.
Several times, I have created landing pages for books I was interested in writing and when I promoted the landing pages... Crickets. I didn't write those books.
Another thing that worked for me is that when I decided to write the original JavaScript Allongé (https://leanpub.com/javascriptallongesix), I was going to write my first long-form book from scratch. My previous books were collections of essays with additional linking and filler material.
I resolved to write a trial book first, so I wrote CoffeeScript Ristretto. I had a rough idea that the market for a CoffeeScript book was about 10% of the market for a JavaScript book, so I didn't have big expectations for revenue, but I figured I could gain experience writing the book and a lot of valuable feedback.
The secret was, when I then published JavaScript Allongé, it was basically the same book, just in JavaScript. The big differences had to do with the differences between CoffeeScript and javaScript, obviously, but most of the chapters were identical.
I found this process was a really big win, when JavaScript Allongé first hit, it was already refined by all the feedback I got from CoffeeScript Ristretto. If I was doing a software side project, I might take the same approach: Start in a smaller market where I can refine the software and business, then repurpose into the target market.
JM2C, YMMCV, &c.