Get the latest tech news
The economics of writing technical books
Yes, you can make money writing books. But never do it for that.
Rental property or investment income are common examples (tax authorities have their own definition as the classification may impact taxation, especially the handling of losses). Gumroad is often touted by the How I made a lot of money posts, some of which self-referentially describe the success of books that supposedly help you sell more copies (no links to those provided). My books usually begin with a series of blog posts (great for fast feedback), then progress to Leanpub, then to Kindle / KDP, and can then graduate to a traditional publisher.
Or read this on Hacker News