Friday, November 1, 2013

Pragmatic Royalties—2013 Edition

Back in 2009, I posted a summary of the breakdown of the royalties we paid on our titles. Susannah, our managing editor, has been suggesting for a while that I should update it. I was surprised by what I found.


Here are the 2009 numbers:


image



Compare with 2013:


image



Below $10k, the numbers are about the same. That’s not surprising—mostly they reflect the vanity titles that were around in 2009. But above the $10k mark, things are a little different.


In 2009, 70% of titles made more than $25k. By 2013, that number has grown to 74%.


In 2009, 41% of titles made over $50k. By 2013, it’s 46%.


And while roughly the same percentage of titles made between $75k and $100k (12% in  2009, 13% now), there’s a big increase in the $100–$200k wedge, up from 4% to 12%. The only drop at the top is the >$400k wedge, and that simply reflects that we haven’t had a title as big as the Rails and Ruby books recently, while the overall number of titles has grown.


These numbers were pleasantly surprising. I know that as a business we are insulated from the plummeting fortunes of more conventional publishers. But I hadn’t realized that were were even more attractive to authors now than back in 2009.


Maybe it’s time for you to consider writing a book…

Wednesday, February 1, 2012

Smart Constants

I’ve been really enjoying James Edward Gray II’s Rubies in the Rough articles. Every couple of weeks, he publishes something that is guaranteed to get me thinking about some aspect of coding I hadn’t considered before.


His latest article is part I of an exploration of an algorithm for the Hitting Rock Bottom problem posed by  by Gregory Brown & Andrea Singh. At its core, the problem asks you to simulate pouring water into a 2D container, filling it using a simple set of rules.


As I was coding up my solution, I found I had code like


case 
when cave.cell_below == " " then cave.move_down
when cave.cell_to_the_right == " " then cave.move_right
# ...
else
cave.move_up
cave.move_left until cave.cell == "~"
# ...

Here ” “ is a cell containing air, and ”~” a watery cell. So clearly we should create some named constants for that:


AIR   = " "
WATER = "~"

case
when cave.cell_below == AIR then cave.move_down
when cave.cell_to_the_right == AIR then cave.move_right
# ...
else
cave.move_up
cave.move_left until cave.cell == WATER
# ...

But it occurred to me that we could use Ruby’s singleton methods to give AIR and WATER a little smarts:


WATER = "~"
AIR = " "
[WATER, AIR].each do |content|
def content.in?(cell)
cell == self
end
end

# ...
case
when AIR.in?(cave.cell_below) then cave.move_down
when AIR.in?(cave.cell_to_the_right) then cave.move_right
# ...
else
# ...
cave.move_left until WATER.in?(cave.cell) if AIR.in?(cave.cell)

Now you could argue that the cave object should do this: cave.watery?, or that the individual elements in the cave should be objects that know their moisture content, rather than simply characters. I don’t agree with the first (simply because the cave is the container, and the water/air is the separate stuff that goes into that container). I have a lot of sympathy for the second, and I’d probably end up there given a sufficiently large nudge during a refactoring. 


WATER = "~"
AIR = " "
[WATER, AIR].each do |content|
def content.in?(cell)
cell == self
end
end

# ...
case
when AIR.in?(cave.cell_below) then cave.move_down
when AIR.in?(cave.cell_to_the_right) then cave.move_right
# ...
else
# ...
cave.move_left until WATER.in?(cave.cell) if AIR.in?(cave.cell)

But, for the problem at hand, simply decorating the two constants with a domain method seems to result in code that is a lot more readable. It isn’t a technique I’d used before, so I thought I’d share.


(And remember to check out Rubies in the Rough…)

Saturday, November 12, 2011

Followup to my EMail experiment

So the Hacker News folks are having a discussion about my email experiment last April. Many interesting points were raised. One fair question is “how did the experiment work out?” 


In short, it worked incredibly well.


I was mostly worried about annoying the folks sending me email. But the only feedback I got was positive. 


I was also a little worried about folks abusing the [urgent] flag. But that didn’t happen, either. I had perhaps 5 or 6 urgent emails, and they were indeed things I needed to handle when I got back. Maybe I’m just lucky when it comes to the people who correspond with me.


The experiment had two positive effects on my life. First, the vacation was genuinely a lot nicer not having to worry about the sacks full of mail piling up for me when I got back. Was that selfish of me? Perhaps a little. 


I wasn’t expecting the other side effect. Since I returned from vacation, the quality of email I receive has improved, and the quantity I receive has dropped. I still enjoy interacting with all the people I need to interact with, and I still get to answer all the questions that need answering. It just seems that my inbox is somehow more focussed.


I have a theory. I think that, during the course of the preceding few years, I’d become something of a slave to my email. I’d answer stuff as it arrived. And those rapid responses would in turn trigger another round of email, and another. There was almost an adreneline rush to it.


So my vacation broke that cycle. And now things are sane (or at least closer to sane).

Thursday, April 14, 2011

So I'm trying an email experiment

For the next 2 weeks, here’s my vacation message:




Subject: I’m on vacation, and I’ve deleted your message—really


I know this sounds brutal, but here’s the deal.


I can’t remember the last time I took a vacation where I didn’t actually end up working a few hours each day handling e-mail. I felt I had to, because if I didn’t, the Inbox would just grow and grow, waiting for me when I got back—the idea that I’d be flying home to 5,000 messages would always be nagging at me, detracting from my holiday. So I worked (which also detracted from the holiday).


 This time, I’m taking a different approach. I’m asking for your help to make my break more enjoyable.


 I’m going to be discarding email I receive. That’s right—your email will be recycled into warm, fluffy bit-jackets for underprivileged children. I won’t see it.


If it’s something you think I really, really need to know, you can bypass this brutality by putting “urgent” in the subject line. But before you do:


  • if it is something that can be handled by the wonderful Pragprog support folk, could you send your message to support@pragprog.com

  • if it can wait until I get back on April 25, please resend your message then.


It’s an experiment. Bon voyage à moi!




Dave

Monday, October 19, 2009





When we started the Bookshelf, we wanted our authors to share in the success of their books, so we set our royalty rates to between 40% and 50%. That is, an author will receive between 40% and 50% of whatever gross profit we make on a book. We felt back then, and we still feel, that this is the highest overall royalty offered by any technical publisher (most publishers offer something in the 10–18% range).


But it isn’t always easy to compare different publishers, because the definitions of gross profit (or whatever they use) differ wildly. Our definition is that we take whatever money we receive from the sale of a book (in whatever form), deduct the direct cost of production (which is zero for eBooks, and a couple of dollars for paper books), and then split what’s left according to the royalty rate. We also account for our costs of copy edit, indexing, and typesetting by splitting them (again according to the royalty rate) between the author and us. So if a book costs $5,000 to copy edit, index, and typeset, and we’re paying 50% royalties, then the author’s royalty account starts with a $2,500 negative balance.


We don’t pay advances, but we do pay royalties quarterly. If a book enters our beta program, the author starts receiving the royalties at the end of the quarter.


In the last few years, we’re had a number of prospective authors tell us that other publishers woo them by saying that our 40–50% royalties are somehow illusory—that by the time the author gets a payment the figures have somehow been shaved down to the point where we pay the same as everyone else. And that’s just FUD.


So, in order to help people compare, attached is a chart. It shows the royalties we’ve paid so far on our titles that have been in print for at least a year. Eight percent of the titles have earned less than $10k. Several of these are vanity titles we produced on behalf of private companies, the others are books that sold into very specific, narrow niches (because we felt someone should do it, and even at these low volumes we can do so profitably).  Ninety-two percent of our titles paid more than $10k in royalties, and forty-two percent paid more than $50k. Twelve percent earned into six figures.


I’d welcome publishers who talk down our royalty payment schedules to publish their figures. I know many will have some titles that earn a lot more than $400k. But I’d be most interested in the distribution—how much does a typical author make? I’m proud of the fact that we’ve set up an environment where authors of good books can earn back at least a reasonable portion of the investment they made in writing.

Thursday, June 11, 2009



Here’s another piece of music I wrote. This one I started over a year ago, but then put down for a while. I think it really wants to be a lot longer piece—maybe one day.

Monday, May 11, 2009



In my ongoing attempt to keep myself honest, here’s another piece I wrote, again played by Mike Springer. I’m not sure how to categorize this one—I wanted to play around with 7/8, and ended up with what I think are some interesting patterns.