That's probably a unique case because in the beginning the documentation was so bad, but especially in new and esoteric programming languages/methods $50 is no big deal, and there are lots of willing buyers. I'd bet the HaskellBook authors pulled in 100k+ too.
It's true that market opportunities are hard to find, but you'll never find one if all you see is the "yes, buts". You miss 100% of the shots you don't take.
Search for the things that no one else sees or has the vision or boldness to turn into an outlandish success.
Take a chance. Live a little. Dig deep down for your inner crazy.
https://s3.amazonaws.com/gumroad/blog/DiscoverMeteorCaseStud...
I know a half dozen other authors of technical/programming books who have probably made between $50k to $100k over the life of their books.
So there's a lot more money potential for the average programming book than there is for the average novel. (Bestselling novels make much more, but only a few books get that status)
If you give me a system that will help me become a full-time programmer in 12 months, making $75/hour, then I'll gladly give you hundreds of dollars for the book.
Out of 100, at least 3 people will see that value. If you charge $50/month for the book/course, and have a list of 3,000 people, you are effectively looking at a full-time income
I co-wrote a book on "growth hacking" (https://secretsaucenow.com), which really serves as a hand-held, step-by-step guide to user acquisition. (I originally called it "user acquisition" but unfortunately "growth hacking" performed 4x better in A/B tests). It was really hard to do, but wow. Sometimes the self-promotional marketing feels kind of cheesy to me, but man, it's so worth it.
First there's the cash. We've sold over $120,000 worth in the past 9 months, and did it direct without any publisher, so that's all straight into our pockets (after fees). I now have 2-3 people reaching out per week asking me if I can work for them, including big/successful YC companies.
I'm turning all of those down, but I feel like if I ever needed a job again or wanted to go freelance I could do it 100x easier because of a book.
I'm pretty proud of the book; I think the book is really good, and so far as I've found it's the only actionable Internet marketing guide out there. I put a ton of thought, effort, and energy into it. But I had no idea that a book could have such an effect in a day and age that's seemingly flooded with this kind of information.