Royalty economics versus traditional publishing
Programmers are not heavy book buyers, and programming titles by and large sell poorly—rarely more than 4,000 copies. Traditional royalties reflect that: John Resig made $7,500 on his first 4,000 copies, with a rate starting at 10% for print and 20% for digital. Randall Kanna's summary of the traditional route: "Nothing comes from a tech book. Just the credibility." Exceptions exist—Martin Kleppmann's machine learning book was O'Reilly's second most popular seller in 2019 and earned $478,000 in its first three years, across 108,000 copies at 10% royalty on print and 25% on digital. The Pragmatic Bookshelf stands out among publishers by paying 50% of gross profit; in its first 10 years, 42% of its authors made over $50,000 and 12% over $100,000.
Self-publishing raises the rates substantially:
- Amazon: 70% for e-books, and 60% minus printing cost for printed books
- Leanpub: 80%
- Gumroad: 96.5%, with a $10 monthly membership fee
- Your own site: 97%
At the top end, Discover Meteor brought in roughly $500,000 from about 9,000 copies between its 2013 launch and 2018, when it was made free; Sacha Grief and Tom Coleman marketed it heavily and it became the recommended learning resource in the Meteor community. Refactoring UI by Adam Wathan and Steve Schoger is the current best-seller, believed to have passed $2 million in 2020, helped by strong marketing and a broad audience need—practical UI design for front-end developers.
Courses: platforms and self-hosting
Video courses follow a similar pattern of options. Some book publishers, O'Reilly among them, run video platforms. YouTube is popular: Florin Pop gained 74,000 subscribers and made $4,500 in ads from 1.6 million views in his first year. Dedicated course platforms include Egghead (which uses a royalty formula), Frontend Masters, Pluralsight, LinkedIn Learning (formerly Lynda), and Udemy (97% royalty on customers you refer, 37% on those who arrive through the platform). Wes Bos's model of selling his own courses—"Wes Bos as a Service"—produces offerings like Epic React, and hosting content behind a paywall on your own site is another route. Level Up Tutorials, Kent C. Dodds and Wes Bos don't publish revenue numbers, but Wes had sold his courses to over 140,000 people at the time of writing.
These are outliers. Most self-published books in the GraphQL space the authors were entering earned considerably less:
| Title (Author) | Sales | Price | Estimated Revenue |
|---|---|---|---|
| Production Ready GraphQL (Marc-André Giroux) | 3,000 (this is a guess) | $49–$79 | $147,000–$237,000 |
| The Road to GraphQL (Robin Wieruch) | 2,250 | $30–$80 | $67,500–$180,000 |
| The GraphQL Guide (John Resig and Loren Sands-Ramshaw) | 1,000 | $30–$279 | $78,000 in sales; $68,000 in sponsorships |
| Advanced GraphQL with Apollo & React (Mandi Wise) | 200 | $30–$45 | $10,000+ |
| Fullstack GraphQL (Julian Mayorga) | 100 | $39 | $3,000 |
The potential is large, but it is not a guarantee.
What self-publishing gives you—and asks of you
| Pros | Cons |
|---|---|
| Potential for more revenue. You get to set the price, sell different packages, and receive a larger cut. | It’s much harder. A publisher does a ton of things for you: editing, gathering feedback from technical reviewers, the build toolchain, translating, an online store, getting it on Amazon and other bookstores, customer service, tracking errata, etc. Doing all of these things yourself takes a lot of time, especially if you also decide to build a Gatsby site to display the text online. 😜 |
| Flexibility. You get to decide what goes into the book as well as how it’s formatted and sold. | No built-in marketing or distribution. The success of your own book completely depends on your ability to market it. This is hard, as you can read in swyx’s notes on the topic. Books published traditionally usually sell more copies. |
| Updates. You have the email addresses of your readers, and can send them updated versions of the book. | No print edition. While you can print on demand with some services, like Kindle Direct Publishing, most people don’t put in that effort. |
The trade-offs are much the same for courses, which face the same opportunities and challenges. Whether you should take them on depends on several conditions:
- Writing ability. You need to explain complex concepts in simple terms that anyone can grasp—a high bar, especially where good content already exists.
- Willingness to market. Nobody will spread the word for you, at least at first, and self-promotion takes guts.
- Worth to you. Do impact, knowledge and reputation motivate you? Without a motivation that matters to you, momentum can fade and the project can go unfinished.
- Opportunity cost. What else would you do with that time and energy, and would missing it be a regret?
The upside, if it lands: income from an asset that keeps earning while it is available; leverage, where creating something with X resources and distributing it to a thousand people who each gain Y in utility produces 1000 * Y, potentially far beyond X; reputation that can win jobs, clients and teaching work (Eve Porcello found publishing boosted her credibility and brought readers who hire her for workshops); knowledge, since writing forces you to read the spec, learn adjacent tools and languages like Vue and Android, and work through countless bugs and conference talks; and the enjoyment some people take in the creative process itself.
For me, the opportunity cost was lower income compared with more consulting work, but the book brought positive impact, deeper knowledge of a subject I care about, reputation and an enjoyable process—and it feels great when someone says they were "blown away" by it.



