As we write and publish books on programming, we were very interested to read Tim O'Reilly's recent article about the demographics of books sales with respect to programming languages:
Although this obviously took quite a bit of analysis, it is interesting that the article only counts cheap books and disregards profits.
If you recount in terms of profits and include books for professionals like OCaml for Scientists then the results are completely different. Looking at OCaml books, the inclusion of Flying Frog Consultancy doubles the sales figures quoted by O'Reilly and increases profits ten fold.
This is a very interesting result for authors because it indicates that mainstream publishers like O'Reilly are not suitable for books covering non-mainstream programming languages like OCaml. We would advise authors to seek more specialist publishers like APress, or found their own publishing house as we did.
Moreover, books are often used as an advertising medium by authors wanting to promote themselves and their other products. In this case, it is worth noting that the readership of journals, magazines and newspapers is vastly higher than the top-selling O'Reilly books. So writing a few magazine articles is not only easier but is also a more effective way to increase visibility.