An Interview with Chris Hartjes, Author of The Grumpy Programmer’s Guide To Building Testable PHP Applications

Published Aug 26, 2013 by Len Epp

Chris Hartjes is the author of two Leanpub books, The Grumpy Programmer’s Guide To Building Testable PHP Applications and The Grumpy Programmer’s PHPUnit Cookbook.

Chris is currently Principal Engineer at Synacor. He also has an online presence as the Grumpy Programmer, and often speaks at conferences, usually on the subject of testing applications in PHP frameworks.

This interview was recorded on August 12, 2013.

The full audio for the interview is here. You can subscribe to this podcast in iTunes or add the following podcast URL directly: https://leanpub.com/blog/podcast.xml.

Len Epp: I’m here with Chris Hartjes, a PHP developer and speaker based in Canada in Milton, Ontario. Chris is currently Principal Engineer at Synacor, and has been building web applications of all kinds since 1998, with a particular focus on the importance of testing. Chris has a popular online presence as the Grumpy Programmer, blogging and making products that help developers write better and more maintainable code. He’s also co-organizer of the Greater Toronto Area PHP User Group, and he writes the “At The Keyboard” blog at littlehart.net, and co-hosts a podcast series at devhell.info.

Chris is the author of two Leanpub books, The Grumpy Programmer’s Guide To Building Testable PHP Applications and The Grumpy Programmer’s PHPUnit Cookbook. In this interview, we’re going to talk about Chris’s interests and his two books, how he’s gone about promoting them, and about his experiences using Leanpub. We’ll also talk about ways we can improve Leanpub for him, and for other technical authors.

So, thank you Chris for being on the Lean Publishing Podcast.

Chris Hartjes: I’m glad to be here. You know, when you list all those things, that I did, now I understand why my wife is mad at me for spending so much time on the computer. Wow. You never realize how much time you spend doing stuff until someone collects it all and lists it all out for you.

E: Yeah, and actually I left a couple of things out because the intro was getting a little long!

So, just let me start by asking, in the past you’ve referred to yourself as “an Internet plumber or electrician”. What do you mean by that?

H: Well, when you think of what I would call a modern-day web developer, for lack of a better phrase, they kind of know how to do a little bit of everything, they know some front-end stuff so they’re probably familiar with doing a little bit of design work, they’ll know some HTML, some CSS, they’ll know JavaScript, whereas the vast majority of my experience has been on the plumbing side of things, back-end code. So when I’m explaining what I do to people, I tell people, if you ever go to a website, and you want to go pay for something with a credit card, or you’re signing up for an account, I’m the guy who’s writing all the code that makes sure that that part of the application is flawless. So, in many ways I feel like an electrician. I’m rummaging around in between the walls, and dodging vermin and dirt, and trying to fix peoples’ applications, their plumbing, your virtual plumbing I guess is another way of calling it.

E: I was going to say, it’s a very rich metaphor. As you say, it’s sort of between the walls, but those walls for you, like for a plumber or an electrician, are actually built by somebody else.

H: Yes, generally speaking. I don’t do a lot of kind of, bespoke, I guess is the hipster term, people are using these days…

E: Artisanal.

H: Yeah, artisanal, or artist anal, as I like to call it sometimes. I don’t know if this is a PG podcast. But, yeah, I spend a lot of time screwing around with other peoples’ stuff, and trying to fix it, and make sure that it’s working better.

E: And what’s that like generally as a relationship? With the people who’ve built it? Do you come in mid-way through the process, or are you there from the beginning?

H: I generally find I’m coming on to projects, even ones where like, because I’m a full-time employee where I am, coming into projects that are basically already started, and most of the time the application is working, and it’s live, and it just needs to work better, and the deploy, and you know the pushes to production need to go a little bit better, and the quality of the code needs to get a little bit better. So I’m kind of brought in to help push them along that road. And I try to do it, despite what my Twitter stream sometimes appears like, in kind of a non-adversarial way. I tell people that my Twitter account is, I’m not really like that in person, it’s more a combination of performance art and trying to promote my little marketing brand of being the Grumpy Programmer.

E: That was actually my next question, if you could tell me a little bit about that identity, and why you chose grumpiness?

H: Well, I don’t know. I mean, I’ve been programming web stuff anyway since 1998. I like to joke, one year’s like ten in the real world, so that’s like a hundred and fifty years, fifteen years of programming, so a hundred and fifty years on the internet. There’s lots to be grumpy about if you’re a programmer. There’s lots of poorly-designed applications, difficult-to-use tools, lots of corners cut, taken by developers who haven’t gotten the experience of what it’s like to create a big, especially on the PHP side of things, where it lends itself very easily to the big plate of spaghetti metaphor, with everything all twisted up. So, plenty to be grumpy about, and my wife always would joke about how grumpy I was about programming in general.

And so, when a couple of years ago, when I decided I wanted to start creating things that I could sell, to supplement my income — because a little bit of extra money’s always nice — I knew instinctively that I needed some way to make myself stand out from the crowd. So, I thought about, what am I really when I think about these things? What I really am, is I’m a grumpy programmer. Grumpy about all these things that I have to see, that I have to help fix, and constantly remind people about what they should be doing. So, I hit upon the idea of doing ‘The Grumpy Programmer’s Guide To Whatever”, and a combination of some really aggressive marketing, plus being at the right place at the right time, which seems to be how lots of these things succeed. The idea of a grumpy programmer seems to have really resonated with people, and I’ve just taken the ball and ran with it.

E: That’s great. And do you find that sometimes your grumpiness is kind of, people don’t get the joke, or the idea?

H: Yeah, sarcasm tags are hard to wrap around a tweet.

E: Fair enough! I was wondering, have you always had a special interest in the importance of testing, best practice and automation, or was there a particular experience that led you towards those interests?

H: Yes. About ten years ago, I was working on a project, I was working for an adult dating website. It was a PHP app, and it was a big, humungous mess. I had been on the original team, I was the person who had committed the first line of code into the CVS repository, if that gives you any idea of how long ago that is. We built this thing in a big huge death march to get it done, for what turned out to be a totally arbitrary deadline, and when we were done, we had created a mess. What happened is that we kept running into the situation where we would change a bit of code, and then something elsewhere in the application would break. So we would test, and be like, I don’t understand how this one change over here, messed something up over there.

So, I started looking around, saying, somebody must be dealing with this in a better way than we are. So, I started searching for stuff about testing, and somehow I stumbled across a copy of one of the early Extreme Programming books. I think on of our project managers had a copy. So, I borrowed that over a weekend, and kind of read through it, and oh, this stuff kind of makes sense. The interesting part was, you mean I can write a whole bunch of code, that would test everything and let me know that I’ve broken something before it goes up into production? I was like, why did nobody ever tell me about this before?

Ever since then, I’ve been pushing, with greater intensity of course over ten years, with a really hard press probably for the past three, of trying to get other people understanding the benefits of wrapping your application in automated tests, with the whole goal of finding problems before the users of your application do.

E: And is there something peculiar to PHP, with respect to testing, that makes it more difficult, or is that just a general issue?

H: No, I think, PHP having a really low barrier to entry because it’s so easy to use, beginners aren’t forced to learn any kind of structure. And a lot of what makes testable code testable, is structure. You have to learn about proper object models, and dependency injection, and Demeter’s Law, and what it means to have something that’s tightly coupled. So, all sorts of concepts that I go on and on endlessly with people about. It’s just that PHP makes it so easy to just slam something together and get it working.

Most of the other mainstream scripting languages, I guess if you throw in Ruby, Python, and JavaScript — JavaScript is kind of loosey-goosey, like PHP is, but in a different way. But Ruby and Python, they have a — I’m trying to think of the right phrase here — a smaller funnel. You have less options with Ruby and Python, to do things, whereas PHP, there’s a zillion different ways to do stuff. And you can do it really structured, or you can just slap it all together.

So, PHP by its nature, of being a templating language, one of the first languages designed specifically for the web — people just learn through the “slam everything together” programming methodology. And then later on, when they discover that this thing that they’ve built is no longer maintainable, and they can’t change it without breaking stuff, that’s when they end up like I was, trying to find better ways to make their applications work.

E: You mention in your first book that you, and I’m quoting here, “feel out of sync at times with the ‘mainstream’ PHP community”. Can you explain a little about why you feel that way?

H: I think one of the main reasons that I feel out of sync often, is that for the most part, the PHP community concentrates on using frameworks, to build applications. And I’ve used, probably, if we’re talking professionally, meaning having been paid money, I’ve probably used about a dozen different frameworks. And what happens is that people get focused on the tools, instead of on the techniques. And I’m a big guy on technique, on repeatable processes. I like to keep things simple, and so much of what goes into frameworks that are designed to help you rapidly build stuff, is to me magical, and can be difficult to understand. I often find myself fighting against the framework, to get it do something that I want to do, and I’m one of these people that despite my grumpy demeanor, I don’t enjoy fighting the tools that I’m using.

So I feel like there’s a constant push and pull between people who want to build things quickly, and people who want to try to build things by creating small, simple, easy to understand modules and components, and then mushing those components together to do other things. Most frameworks don’t do that. There’s still tons of coupling. Even with frameworks that promote themselves as being modular, you still end up with a ridiculous number of dependencies, and again that makes it very difficult when you’re debugging, and trying to figure out why something isn’t working. The further you are away from just simple, easy to understand code, the more likely you’re going to end up with a humungous maintenance problem on your hands.

So that’s the way I feel. PHP people all the time are saying, “What frameworks should I use”, and “What tools should I use”, and all the time I’m like, “How about you just learn PHP?”, and learn some good programming practices, and then the rest will take care of itself. Because every PHP programmer that I admire is very much the same way, in that they learn the language first, and frameworks are just a side effect of the things that they do every once in a while. But if they have to do something without a framework, they’re not lost. So many PHP developers are lost without their favorite set of frameworks, libraries, and tools. Whereas I’m more than happy to experiment with stuff and grab new things, just to fit my idea of the thing I want to build at a particular moment.

E: Are there any big controversies in the PHP community at the moment that you have a strong opinion about, that you’d like to have your say on?

H: Not really. I mean I’ve probably vented most of the things that I don’t like on Twitter. I’m not the type that holds grudges, so I let it all out, and then move on to the next thing that happens to be bugging me.

It’s still the fact that testing is a really hard sell, simply because I think, testing is one of these things that you have to get absolutely burned, by not doing it, before you understand why it’s worth the time and effort to put all these things. To build your little continuous integration setups, and to write all the tests, and make sure that every time you’re merging changes together, all your tests get run. All those things are all building up towards what I call my own personal holy grail, which I’ve only ever gotten to do once, which is, the continuous deployment idea, where a developer makes the change, and then it gets run through a whole battery of tests. And then if everything passes, it goes up into production, without any other human touching it. And that means deployments become a non-issue.

And that’s the thing that I see all over the place. Wherever I’ve worked, doesn’t matter whatever the language is, deployments are always stressful, and people seem to want to make it stressful, instead of saying, what can we do to make a deployment of something that’s mission critical, a total non-issue? So that, we can push things, and go to lunch, and no one’s going to be freaking out.

E: Do you see a difference between small companies and big companies with respect to resistance to testing?

H: No, it’s pretty much the same across the board! I think if anything, there’s kind of like a sweet spot, like really small companies, probably it’s a really hard sell to devote resources, to get all that infrastructure in place. And really large companies probably have their own set of processes in place, so those are also incredibly difficult to disrupt. I think there’s kind of a sweet spot, maybe a team of like six or seven developers. I think with that many people in place, you can probably free up enough time, and maybe stall people out while you get all that stuff in place.

Small shops are usually super busy, and you hear the whole “I’m not getting paid to write tests” mantra, which I’ve talked about in presentations. And then large companies usually have their own idea on how things are supposed to be done. I’m extremely lucky and grateful that my current employer, Synacor, they had a humungous commitment to testing already, so, when I started working there, all that stuff was in place already. So, it’s not like I had to start complaining, and getting into conflicts with people, just to get basic testing stuff put in place.

E: Speaking of your conference speaking and book writing and podcasting and all the other parts of your career, I’m sure people would be interested to know, how you go about balancing all of these activities with a day job?

H: With a day job and a family. I’m married and have two kids. The secret is, for me anyway, is really strict use of a calendar. I usually plan things a week at a time, and I’ll literally look at my calendar and say, find out the days where I’m doing something already. Summertime is a perfect example, so I play slo-pitch baseball, my youngest daughter plays softball. One of my hobbies is, I participate in a online simulation baseball league, so if I were to pop into my calendar, for the months of May through August, almost every single day I have a little dot on the calendar, meaning there’s something I’m supposed to be doing.

Without that calendar, to make commitments, firm time commitments, I would never get anything done. I literally plan my week, and say, on this night I’m going to do this thing, and on this night I’m going to do that thing, and then I always try to put a few breaks in there, as well.

E: Speaking again of conferences and speaking, you were in Europe recently — were you there to do any speaking engagements?

H: Yeah. Earlier this year I spoke at PHP Benelux. I did the keynote, which was kind of an awesome experience. I’d done lots of technical talks, but this was more like a soft skills talk, where I talked about what I saw of trends in web development and things like that. And then — they all kind of blur together after a while. I did so many of them, compressed into a short period of time, especially like November, December, January. I think I went to four conferences or something in two months. And then I went to Minneapolis and spoke at a PHP conference there. Then I did the largest community-driven PHP conference, which is php[tek], which is always in May, so yeah, I speak a lot.

I haven’t done so much speaking in the second half of this year. I promised my wife I would actually stay home this summer, instead of travelling all over the place, so it’s been a little bit of a different experience.

E: Did you do any training for speaking, or was it something you just dove into?

H: I sort of did some training. When I was in college, one of our required courses was a public speaking and presentations course. Until that point, I had been one of those people who are like super nervous and didn’t want to do speeches. I’d be the guy up there with a piece of paper in his hand, and I’d be so nervous that the paper would be shaking, you know that type of person?

E: Yes.

H: But when I took that course, something happened where a few bits in my head flipped. And I no longer was scared to get up in front of a group of people, and speak on a topic. So, I don’t know what happened, I really don’t, I wish I could have figured it out, but all I know is, after that point, I never had a problem speaking. So, when opportunities came up to start submitting talks to conferences, I just said, OK, I’m in!, and I did it.

With every talk it gets a little bit easier, a little bit smoother. I mean, I would be lying if I said I wasn’t nervous before giving some talks, but there are some talks — I have a “Building Testable Applications” talk that I’ve given almost a dozen times now. I can almost do that one without any slides. It’s just a combination of, something happened to me in that course, everything lined up in my brain to not freak out when I have to give a presentation. Knowing the material and being passionate about it, I find makes it super easy to talk.

E: Coincidentally that’s a perfect segue into the next question I had, which is more general. There’s a lot of talk these days about the value of online courses, and correspondingly the value of increasingly expensive, traditional university degrees. With the 2013 university year about to start, here in North America anyway, I was just wondering what you think about that issue, particularly in the computer science space. So, what would you say to all the university students starting conventional computer science degrees in the next month?

H: That’s interesting, because, I went through the community college system, here in Ontario, so I went to Sheridan College. I went twice, I liked it so much. So I have diplomas from Sheridan in civil engineering, which was very interesting. And then one in computer science technology. So, not degrees, but diplomas. I have no idea what the US equivalent would be, like a bachelor’s or something, I don’t know what it is.

When I went to college, the internet was there, but it hadn’t been commercialized yet. I remember surfing the web in text, and doing all my email in Pine, so, a much much different world than there is now. And then we did absolutely nothing to do with the web, so everything that I learned about the web was self-taught.

But once in a while, I think back, if I had gone to university, and taken computer science — it just wasn’t in the cards for me for a variety of reasons — what would have been different? I often wonder what would have been different. There is so much stuff out there, that if you’re the type of person that’s self-driven to learn, you can probably fill in a lot of the gaps pretty quickly. But if you’re not, then the collaborative environment of a university will probably help you.

These days, I have no idea what people are being taught at university in computer science. Sometimes I think, did I miss out on some fundamentals that would have given me a shortcut, to be a better programmer in a shorter period of time? Are there some algorithms and design patterns that I would’ve learned at university, that I didn’t learn because I’m self-taught? Those kind of questions creep in every once in a while, but for the most part I’ve been pretty succesful in filling those gaps, either by teaching myself, or finding people who are way smarter than me, who taught me the things that I needed to know.

So, I think that there is value in a computer science education, if you are the kind of person that is not self-directed, if you need that collaborative environment. Because if you need help, you’re never going to learn anything on your own.

E: I was going to say, it’s a very interesting question, partly because, the particular nature of programming, which involves constant learning, all the time -

H: Oh, absolutely. I tell people I feel like a shark, I’ve got to keep swimming or I’m going to die. You know, die not literally, but die in the technology sense. Because things happen so quickly, new and useful tools come up out of nowhere. And if you get complacent, and pick a favorite set of tools and say I never want to do anything else, you’re setting yourself up for a really bumpy ride.

E: And so if someone weren’t — I guess I’m sort of picking up on what you were saying about being self-driven — if you’re not sort of driven, to begin with, it sounds like maybe, programming isn’t the way to go.

H: It depends on what you want. If you just want a job, I’m pretty sure you could pick up enough at university, or even on your own. There are plenty of, not to use it as a derogatory term, workaday programmers. There’s programmers for whom writing code is just a job, and they’re in at nine, and they’re out at five, and when they’re not at work, they’re not touching a computer for any programming purposes. There’s lots of people like that. People have tried to estimate what percentage of people are actually going to conferences, and pursuing sharing knowledge, and they’ve thrown numbers around like one or two percent. I mean, I don’t know, I can see that there’s lots of programmers out there who are just working, and they don’t care about programming as a career, they care about programming as a job. And that’s cool, there’s lots of people who have interests outside of their job, and those interests take precedence over everything else.

Me, computers is the thing I’ve always liked since I was little kid. My first computer was a Vic-20, I was like eight or nine years old. I’m 42, so I’ve had a computer around for over 30 years. I don’t know anything else, other than having a computer around to fool around on. So, for me it’s a very natural thing to do stuff at work, and then in the off hours find other things to do on the computer that I find interesting. Sometimes they’re programming, sometimes they’re not.

E: Just to switch gears, other things to do are write programming books, which you’ve written two of, and I just wanted to ask you a bit about your first book, which was “The Grumpy Programmer’s Guide To Building Testable PHP Applications”. Can you explain a little about what led you to write this book, and who the intended audience is for it?

H: I had been doing presentations on the same topic. So, I thought to myself, I had written a very small self-published book before this one, about how to take a legacy PHP application and refactor it to use a specific framework called KPHP. The framework’s still around, but it’s almost in version three, and when I wrote the book it was a while ago. I kind of liked that experience, and I said, OK, so what’s the next level? I want to start doing info-products, I want to start selling stuff. I’ve been blogging for a long time, so writing is something that I’m comfortable doing, and I can crank out the material when I need to. What can I do to make these two things dovetail together? How about I write a book to help me do better presentations on the same topic?

So I started doing research, into, what are some of the things that people need to know if they want to get their application from this messy, untestable state to one where they can actually start using the tools and frameworks that are available? So that was research to do talks at conferences. Once I started putting that together I thought, that would actually be a pretty decent book. I can do the book, and I can make some money on the side, and help pay for some of my hobbies, and keep my wife off my case with the credit card bills, and all these other wonderful things that come from being passionate about so many things in your life. It just seemed like a natural thing to, the research for the project led to a large number of notes, which made me think, I can easily turn this into a book.

E: And with your second book, you were, I haven’t checked the sales pages lately, but I think you were even more successful, and I know you had a really successful launch. It’s probably a really big question, but can you tell me a little bit about how you managed that launch?

H: I can definitely talk about it. So, last summer, after years of procrastinating and trying to line everything up, I got into a product development course that a friend of mine, Amy Hoy, runs, called 30x500. The whole premise of this course was the idea that, she has been very successful with running several bootstrapped businesses. Her and her husband have a software-as-a-service app called Freckle that does time-tracking, and the two of them have actually been very successful consultants, doing mostly JavaScript and Ruby stuff. She found that she really enjoyed teaching people the things that she did, because she found that she could teach people to do almost the same thing that she was doing.

I looked at my experience with my first book, and I thought, You know what, this went OK — and I know nobody can see this, I’m doing hand motions while we talk — my success was at this low level with the first book, but from what I knew and from the things I had talked to Amy about, because Amy and I have had a friendship for quite a long time, we’re not super good friends, but we’ve known each other for a long time — and after following Amy, I was convinced that I could really crank it up to the next level.

So I went into her course, this 30x500. The idea is that 500 customers paying $30 a month is $180,000 a year, which should be enough to run all but the most really resource-intensive online businesses. So when you look at it that way, this sounds like an achievable number. But, of course, I wasn’t building a platform, or any kind of software thing, because I had a day job and lots of hobbies, and there was literally no room to do something like that. But I could carve out time to make something, like a screencast, or a book. So I went through her course, and did all the exercises.

Her whole thing was, basically, do your research. Too many people are like, “Oh, I have this great idea, what do you think”? It’s more like, “What are the type of problems that people are really having?” So, go do some research, find out the things that programmers of your language of choice are complaining about. And then say, “Can I give them something to solve this problem?” It’s this whole, you know the little tripod that Amy’s stuff sits on is: you have a pain, and a dream, and you’re going to offer them a solution. The whole idea is that you don’t want to build something until you know with 100% certainty that people are going to give you money.

I followed Amy’s process pretty much to the letter. I did research, I started looking around at people who were getting into testing stuff for PHP like I was, and what were the things that they were complaining about? What were the things they were struggling with? And the thing I found the most was, people were struggling just to use the testing framework. So, that’s when I knew, Aha! That’s the thing I should do for my next book.

And then that thing basically wrote itself. People have asked me how long I spent. I imagine from beginning, and including writing the book, doing some edits myself, I got a whole bunch of people to do technical edits, which was incredibly helpful, and setting up the website for the book, and getting the stuff with Leanpub, getting that set up, it took me 100 hours, to crank out that book. So 100 hours, and I’ve made, I don’t even know what the latest number is, probably close to $11,000 off of the book, and if I remember the numbers correctly, like $23,000 or $24,000 in the last two years off the two books together, which is awesome.

E: Were you leveraging any email lists that you had?

H: I used the email list from the first Leanpub book to promote the second one, and of course I tweeted all the time, incessantly, about what I was working on. For me, social media was really the key strategy, to attract people. Even today, where I tweeted about by bundle, the Leanpub bundle that I have, being on sale — and you guys very graciously put it on the front page, which was even better — and every time I tweet, it translates into sales. Because I took the time to learn how to use Twitter as a marketing tool for all these things that I’m working on.

Just to go on a little bit of an aside, people think that, developers often have phobias about talking about money, and promoting themselves. I have no problems talking about money, and you can definitely learn to promote yourself in a positive way, without coming across as a douchebag. I think that sometimes, I get close to that line, of promoting a little bit too hard, but I’m right on that edge, and I don’t think I would have done nearly as much, in terms of book sales. Plus I did some videos which have sold quite well. Plus the recognition that if I do submit to conferences, I get consideration because people know who I am, and they know the message that I’m trying to send out. So all of the things together, the books, plus the incessant marketing on Twitter, have been awesome for my career.

E: Did you publish either of your books while they were still in progress?

H: No, I never did the in progress, I didn’t want to do that. Simply because I wanted to work on it and present it as a finished product. Because I felt that I would be too tempted to go back and screw around all the time, would get too finicky about, This paragraph isn’t quite right, and I want to re-do this chapter.

I’m pretty sure that I could do something like that. I haven’t decided if I’m going to do another book yet or not, but I could do it as the beta thing. But I worry that I would be spending too much time fiddling with the book, and not actually getting stuff done, not actually getting the book to a whole state, where I was happy with pushing that out to people.

E: That’s very interesting. So, have you gone back at all to re-publish any new versions? Like with some bug fixes or typos?

H: Oh, I fix typos and stuff all the time. I’m very open with that. But I didn’t do an outline, and then a couple of chapters, and then say, Hey, you guys, there’s a beta book! I just wanted to make the whole thing available at once. And then I would tell people the benefits to getting a copy through Leanpub, was that, any time I make a change, you’re going to be notified, so you can always know that you can grab the latest and greatest version of the book.

Which has been good, which has been something that you don’t get if you go the total self-publish route, where you use something like — I use E-junkie for my videos, and I think the feedback loop with your customers, to tell them that there’s updates, would be a lot more painful than what it’s been with Leanpub. I love the fact that with Leanpub, any time I made a change, I can notify everybody and say hey. I would always thanks people, and say, So-and-so on Twitter pointed out this problem with this code, I fixed it, thanks so much, you can now grab the updated version of the book.

E: On that topic, I saw that you also have a paperback version of your second book on Lulu.

H: The first book’s up there too.

E: OK, great. Do you update those as well?

H: Yes, every time I make a change, I push an updated version. Of course, which sucks for people that bought copies of it already, but I warn people: when you get the paper copy, I do update the ebook versions, but at some point the updates stop. I think now, for the second book, there’s no more updates. If I were to change anything, maybe if at some point down the road I wanted to do a second edition, I would be adding new material, but I don’t want to go back and change anything. It just feels, I don’t like doing it, it feels kind of weird.

E: Do you sell your ebooks on any platforms other than Leanpub?

H: No, just Leanpub.

E: Is there a particular reason for that?

H: I like it that you guys do all the difficult stuff, of collecting the money, and the cart and all that stuff. Having built several e-commerce systems over the years I know how painful they can be. I think it’s a lot easier now, because I think the payment processors are way easier to work with than even three, four years ago. So I imagine Leanpub’s having a little bit easier of a time than with stuff I’ve tried to do in the past.

I found Leanpub was the easiest way for me to — I could concentrate on writing the book, because I wasn’t going to be worried about building the website that goes with the book, worrying about, do I have a merchant account set up? And, is PayPal going to screw me and hold onto my money? And all these other horror stories that you hear about people dealing with stuff with PayPal, where PayPal at times appears to be very arbitrary and capricious, in holding onto people’s money, and I was like, I don’t want that happening to me at all. So, that was a whole thing I didn’t have to worry about.

E: That’s very interesting, because we do use PayPal, but we take care of all the complications, I guess, for you.

H: Oh, absolutely. That’s been the easiest — Leanpub has been the thing that let me do — I’m big on figuring out shortcuts, to help you get things done faster, and Leanpub has been the best shortcut for my products. Because I can just work on the book, and not have to worry about setting up anything else. I don’t have to worry about marketing messages. Everything else, Leanpub does for me, which is awesome.

E: Thank you very much for saying that. What you’re describing is one of the reasons that Peter and Scott founded Leanpub in the first place — it was to get people focusing on writing.

H: Absolutely. I don’t want to have to — like I said, the first time when I was thinking about this, before I discovered Leanpub — who I think I discovered through Reg Braithwaite — I was like, man, so I’m going to write the book, and then I’ve got to figure out how to put together a toolchain to turn the text into PDF, and then I’ve got to build a shopping cart, and I’m like, oh, man, do I really want to do all this? And then when I found Leanpub, I was like, that’s like 75% of the stuff I was worrying about, gone. And then I could just concentrate on writing the book.

E: That’s great to hear. With respect to selling, I’d like to ask you about your approach to pricing. How do you decide the price for your books?

H: I think of a price that makes me personally uncomfortable, and I set it right there. I have found, and this is one of the things that Amy talks about as well, that generally speaking, programmers undervalue their time, and charge way too less for the things that they’ve produced. It’s not like writing books, writing Leanpub books, could replace all my income from my day job, because it couldn’t, but if I’m going to charge people money, I don’t want to give away.

Because I look at it in terms of, like if you look at my books, the two of them together, even with the bundle, 40 bucks. If you’re a decent programmer, that’s less than an hour of what your time would cost as a freelancer, and you will earn yourself, I don’t think this is a hyperbole, tens of thousands of dollars extra, by learning to do those things.

So, that’s how I convince people. If you’re so cheap that you can’t spend 40 bucks, then probably nothing I’m going to say to you is going to matter. But if you look at it in terms of, here’s the skills that I’m going to learn that are probably going to get me a better job, or if I’m a freelancer, make me more money, 40 bucks is nothing. Most people waste 40 bucks on stupid stuff every week anyway. Unless they’re cash-strapped, which, you know, that’s how it is, but I look at it in terms of, I want to charge what I think is the right price for my stuff, and if people complain about the price of my book, well, I have lots of evidence to show that people are more than happy to give me that amount of money.

E: Have you experimented with the variable pricing at all? Where you can change the suggested and minimum prices for your books?

H: For the first book I had a minimum and suggested price, and it was probably, about half the people went with the minimum. For the second book I just said, no, I’m going to have a hard price. And if I want to offer different pricing, I just do promotions, and discounts, and things like that. I believe very strongly that I have a minimum value that I put on the book, and I would like to get that minimum.

E: I can probably guess the answer to my next question, since you’re selling your books on Leanpub, but do you have any particular opinion about digital rights management for books in general?

H: I think that — I’m trying to think of the right way to put this — I don’t worry about people stealing my stuff, and putting it up on BitTorrent, or trading copies of my books around, because I’m more interested in getting people to understand the ideas, and concepts. If someone learns it by borrowing a copy of my book from somebody, or getting someone to send them a copy, I don’t have a huge problem with that.

I think that if books were my only source of income, I might be a little bit more strict about it, but for the most part, I can make more than enough money to offset what I believe is the low percentage of unauthorized copies of my books, because — I’ve told people about other stuff, I don’t put DRM on my books, and I don’t put any of that stuff on it, because I’m willing to trust people. Just respect that I’ve put a bunch of work into this book, and just don’t give away copies. I’ve offered people discounts on bulk companies, I’ve offered company-wide licenses and things like that. Simply because it’s easier to tell someone, if you want this thing, OK, I can cut you a deal. If it’s really that important to you.

Because, with digital stuff, the cost of making a copy is minimal it’s pennies, pennies worth of bandwidth, or server time, or whatever. I don’t feel like the movie industry, or the music industry, who are treating every single downloaded copy as a lost sale, when there’s absolutely zero proof that the person was going to buy it anyway.

I’m just more interested in getting my name out, building my career, and making more and more people aware that there is a better way to build PHP applications that lets you go home from work on time. I work from home, and I love at the end of the day, saying, OK, I’m done. And I don’t have to stay late because I really work hard to wrap tests around everything and set clear boundaries on when I’m going to work and when I’m not going to work. Testing and automated systems has been one way for me to really enforce that.

E: I have a couple of Leanpub-specific questions to ask. We’d like to know your ideas about these kinds of things, since you’ve written two of our more successful books. I know that you mentioned that you’re selling some DRM-free videos, I think they’re called the “PHP Testing Bootcamp Sessions” on your Grumpy Learning website.

H: Correct.

E: I was wondering what you’re doing to drive sales there, and if there’s anything Leanpub could to do help you with that? Or do you prefer to keep your book and video sales separate?

H: Well, I am trying to kind of get everything under the one umbrella of Grumpy Learning, because it helps a little bit from the branding point of view — again, with the marketing stuff, right?

Leanpub seems to — screencasts and ebooks are two completely different beasts. I think Leanpub does a really good job of promoting to people that, if you have a niche technical idea, Leanpub is a great way to validate that idea, because you can start working on something, and get money in, while you’re working on building the book out. I’m probably the rarity amongst your authors, who doesn’t release the book until it’s done. I get the impression that most people are doing the beta thing: they’re starting off with a couple of chapters, and they’re just writing as they find time, and people are happy to give them money, and follow them along on the process. I found myself, when I got involved in one of these beta book things, that you kind of feel like you’re there with the author, and you’re helping to participate and shape the book in some way, even if it’s only dropping them a note about a chapter and saying, I really liked this part, or, I found this part confusing.

There is really no market for in-progress screencasts. If there is one thing, that Leanpub, again does a great job of managing the sales part of things, and if I ever wanted to do a subscription-based type thing, you know, crank out the content and sell subscriptions, having a party that could handle the digital distribution and the collection of money, and doing all the recurring billing, because you can do all that stuff yourself, with PayPal and other payment processes. But again, like I mentioned before, if someone else gives me a shortcut that they can handle all that stuff, then I can concentrate on making sure that the content gets done.

I don’t know — “Lean Screencasts”? I don’t know what the next step with that, infrastructure to handle digital delivery and subscriptions, that would be the thing that would make me want to use Leanpub for the screencasts. I’m ok to keep them separate, just simply because Leanpub’s not set up to handle that stuff. I can handle the collection of money and setting things up with E-junkie and stuff like that, but if I got into like a subscription-based model, I may have to do something myself, and that’s when I would start looking and saying, who has already done the infrastructure for me?

E: That’s very interesting, especially because the idea of in-progress publishing corresponds to serial publishing, or one version of in-progress publishing corresponds to serial publishing, and books often, novels were often written in the past, published serially in magazines, so there is a possible fit there, I think.

H: It would be kind of interesting. I’ve thought about doing stuff like email courses. Take a bunch of material, chop it up, and get people to sign up, and then you drip stuff — they’re called “drip courses”, you just drip stuff out to them over time. The thing I never figured out was, how do you make money off of that? Unless you’re just using it as a marketing thing, that, every email is loaded with all your marketing messages, buy my books, buy my videos, all that stuff. The idea of doing serial technical books is an interesting one. A time-intensive one, a labor-intensive one, to be sure. But again, since I’m big on this stuff, with the right amount of research, and the right content, it’s probably something I could make money at too.

E: Is there anything in particular that we could do to help you engage with people who’ve already bought your books? We do have, as you mentioned earlier, that you used, when you were starting to promote your second book, you were emailing the readers of your first book, using our email readers feature — but is there something else that you were thinking, did anything else occur to you, along those lines of engaging existing readers, that we don’t have, that we could have?

H: One of the things that I found interesting was, I know that Leanpub has the unconditional money-back guarantee, and I had somebody ask for a refund, because he happened to find the GitHub repo that I’d been using for the book. I had it public. So they found it, and then said, well I don’t see why I should pay, when the author’s making the material available for free on GitHub. And I blew a gasket, because I didn’t like that. I didn’t like throwing away, even though it’s a relatively minor amount of money, I didn’t like the fact that somebody got a refund because they happened to figure out where the repo was. And so, one of the things that I’m finding I’m not getting is, it would be nice, if there’s feedback, that the author gets copied on it. It would’ve been nice if I would’ve, a refund has been given, and here’s their explanation why.

And now, I understand, I wasn’t intending to put the screws to Leanpub and say, I don’t want you issuing refunds, because that’s part of, you guys want to issue refunds, that’s cool. I file it under the same thing as with DRM. An extremely small percentage of people that have bought my book decided they didn’t like it, and that’s ok. I tried to make the book targeted to a certain group of people, and if it’s not working for them, and you want your money back, no problem. I would rather have people who are interested in what I want, giving me money, instead of people being resentful that they’ve bought something and there’s no way, if they feel that they’ve got ripped off, that there’s no way for them to recoup that stuff. I don’t know how much feedback Leanpub gets from people who have bought the books, because I encourage people to hit me up on Twitter and email, so I’ve had people tell me, they didn’t like the book, for whatever reasons, and I always tell people the same thing: I appreciate the feedback, if it’s a problem I can fix, I’ll fix it. If it’s not, if it’s just like a philosophical thing, then, I’m sorry that the book wasn’t for you, and you can always go hit up Leanpub for a refund.

E: The good news is we actually do have a feedback feature for refunds, so when people are requesting their refund, they have an opportunity to leave a comment. We made it light-touch, so you don’t have to leave a comment, but if you go to your book’s URL, at Leanpub, and just put /refunds, you’ll see a column of comments.

H: I think it’s more along the lines of, what I would’ve wanted, is just an email, saying, hey, someone just got a refund, and here’s their comment, just so, again, all about shortcuts, right? If I can get little shortcuts that pop up reminders that tell me things, then my to-do list every day gets smaller and smaller, because over time I slowly replace manual systems with automated ones that let me know when things have happened. So, again, I don’t have to worry about it.

I’m a big believer, I’m not a neat freak by any stretch of the imagination, you should see what the desk that I’m sitting at looks like, it’s covered with junk, because I play that collectible card game Magic, so there’s Magic cards at my desk. But I’m always a big believer in repeatable processes and putting things in the same place all the time. So, if I always knew that refund comments were going to be sent to my email, I never have to remember, oh yeah, I need to go to Leanpub today, or, this is my weekly check to see what’s going on with the refunds. Systems that notify me always prompt me to do better action than systems I have to remember to go see. But just a minor quibble.

I will say, and this is not just because I’m on the podcast, I’ve been extremely, extremely happy with everything that Leanpub has done for me. And I feel like my books couldn’t have been as big a success without Leanpub providing all the infrastructure shortcuts for me. I would’ve had to do it all myself, and who knows what problems I could’ve run into. I could’ve had problems getting payments, getting money out of PayPal, and all these other things. Leanpub has eliminated that problem for me.

E: Well, thank you very much, it’s very validating. Leanpub was and is being built on the Customer Development model, where you launch something that you know isn’t perfect, but you do it in order to see if you’re actually addressing problems people have. And then, the people with those problems, you build the product based on their actual needs, rather than some kind of formal vision of what you think the world should be like.

H: Shortcuts people, it’s all about the shortcuts. It’s how I get so much stuff done, because I don’t do everything manually. That’s the secret, that’s what I tell people my secret is: shortcuts. Automate everything you can.

E: That idea of getting an email when someone requests a refund is excellent, because it also corresponds to the idea that when you’re managing a book, it’s a relationship with your readers, that’s changing, and so getting little alerts that something’s going on would increase that sense of engaging.

H: It’s not like I’m looking to pick a fistfight with people who want a refund or anything, I just want to know, if you didn’t like it, ok, that’s cool, I can respect that, I just want to know why, so that I don’t make that second mistake. Or if it’s not even a mistake, it’s just like, well I didn’t like it because of reasons X, Y, Z, and I happened not to agree with them, then now I know why some people don’t like it. I mean, I do look, from time to time, and I am happy that the percentage of people who have requested refunds is like really really small.

E: Yeah, that’s definitely true, it’s true of your books, and it’s actually true of most Leanpub books. The rate of refund requests is very low, which we think is a sign of the quality of our books, but also the fact that if you trust people, they’re often trustworthy.

H: Absolutely.

E: And refunds, they also serve an important function. Our two-click refund feature is very important feature because, when you’re doing self-publishing, in-progress, when you’re a platform for mostly self-published, in-progress books, giving people the security when they’re buying it that they’re not taking a risk, at all, except maybe with a little bit of time, on this book, is a really key part of what we’re doing.

H: I feel like Leanpub lets me be a little bit closer to everyone that’s bought my books, or wants to know more about the stuff that I’m doing. I feel like there’s not all these layers of middlemen, for lack of a better — I wanted to say rent-seeker, but that’s probably being mean — I mean, I had people telling me stuff like, oh, a self-published book isn’t legit. And I’m like, well, I don’t know about you, but I know people who’ve written books for O’Reilly, and I’ve made way more money off of way fewer units, than what they got from O’Reilly. It’s more like, if you’re doing it for notoriety, OK, but wouldn’t you rather make more money, with the same amount of effort? You look at O’Reilly, you have the publisher, and then you have an editor, and you have a PR person, and sometimes, you know, those are too many layers, for people to go through, who want to actually just talk to you.

It’s interesting, when I meet people who’ve bought my book, and they kind of get awkward, about, it’s actually me, and, oh, I had your book, and I just felt kind of weird coming up and talking to you, and I’m like, yeah I get that, but behind all this stuff, behind the book, and Twitter, and all the other nonsense that I do, I’m just, I’m still, just a person, or speakers, and all that stuff, I’m just a person who happens to have worked very hard at promoting themselves. And at the end of the day, I feel like Leanpub lets me be closer to those people. Way less of things getting in the way of when people want to ask about the book, and then buy it, and want to talk to me about things that are in it.

I always feel like a book done through a more traditional tech publisher, more like a, more obstacles in your way of actually getting to talk to the person, and seeing that your suggestions are being acted upon in the book. Which I imagine is something that happens a lot more often for the people that are doing the in-progress books, that that early feedback from the early adopters is probably really really good. But like I said, I didn’t want to do it that way, I didn’t want to publish it until it was complete, and I didn’t want to share it until it was at a place where I had everything done. I don’t know if that’s some sort of insecurity that belies my outrageousness on Twitter, but no. People are complicated.

E: Do you have any other feature requests, something that, if you could magically snap your fingers, Leanpub would do it, that came out of your experience using our services?

H: I do know one thing that you guys actually did for me, way back in the day, early on, in the, I think it was the first book. I noticed there was no way to download sales data. You guys didn’t have an export feature. So, I remember asking Peter, I want to graph how my book’s been doing, to give people a chart to show them over time, and within a couple of days, Leanpub implemented export sales as .csv, so that I could take it and put it in a spreadsheet, and look at it.

If there is one thing, something that I learned out of my experience with the product development course, which may be a touchy subject for Leanpub, is the exporting of email addresses. Now I know you guys have opt-in, where they can agree to share their email address with me, and I can see it for every sale, but just from a marketing of future products, and trying to engage people who have bought stuff, to see maybe if you’re interested in some of the other things that I’ve done, something that might be outside of Leanpub, the ability to export email addresses, of people who’ve bought stuff, if they’ve wanted to share them.

E: If they’ve opted in.

H: If they’ve opted in. Clearly I don’t want to just take everyone’s email addresses. If they’ve agreed to share, just from the way that I do things, it would be immensely helpful, because I can then turn around and combine things into a list, and again, just focus on making sure that people who are interested in things that I want to talk about, are getting that message. So, the ability to export lists of email addresses that have opted in would be something that I’d like to see.

E: That sounds reasonable to me. If people opt in to show you their email address, we are already showing it to you, and allowing you to export that would just make it more useful. But we are, as you know, we’re very protective of things like that, so we’ll discuss it internally, but it sounds quite reasonable.

H: If I want to send a message, to people who’ve bought my book, I can just do it via the form. And maybe you can answer this question for me: If I go to my second book and I go to send an email to all my readers, is every single person that bought my book getting that email, or just the ones that opted in?

E: I believe, that they have to opt in, but just let me check something here.

H: I’ve always been curious about that. Because if that’s the case, then the export email is a nice thing, that just lets me take their email addresses and put it into a mailing list manager, like MailChimp or something like that. I’ve always been curious, because I’ve always thought that every single person who’s ever bought my book will get an email, if I send it via that.

E: I’ve just checked, that is the case. They’re automatically opted in to new release announcements, and author email sent from Leanpub. But that doesn’t mean that you actually see the email addresses of the people that you’re sending to.

H: Because I have sent emails saying, hey, I have this email list and I would really appreciate if you sign up for it. And, yeah, a large number of people have signed up, but it’s not the same number of people that bought the book. So clearly, there are some people reluctant to hand out their email addresses. And again, that’s cool, it’s just that from the product development perspective that I’ve gone on, it would be nice to actually have those email addresses.

Not that I would, and to make it 100% clear, I would never, ever, ever in a billion years sell those email lists to anybody, because I hate spam just as much as the next person. I’m just interested in having people who want to hear from me, hear from me. And if you don’t want to hear from me, then please, I don’t want to waste any time sending you a message.

So, that’s just one thing that would be nice, the ability to export that list of emails from people who have already agreed to share it.

That’s about it. I know that sounds like a pro-Leanpub commercial, but I’ve been extremely happy. I’m extremely happy, and extremely grateful that I found you guys, because like I said, it’s made me worry about the books, and not worry about all the infrastructure.

E: On that positive note, I’m actually at the end of my questions, but is there anything you’d like to add?

H: I don’t think so. I mean I do, anytime that people talk about wanting to do a book, I always recommended that they use Leanpub for all those reasons. The infrastructure’s taken care of, the tools to convert Markdown to PDF, EPUB and MOBI are awesome. Again, it’s just stuff I don’t have to worry about. I write the book once, and somebody else takes care of making sure it looks right, and again, since I’m all about automating and shortcuts, that’s perfect for somebody like me.

E: OK, great. Thanks for a great interview, thanks very much for being on the Lean Publishing Podcast, and for being a Leanpub author!

H: Thank you, I enjoyed our talk.


Originally published at leanpub.com.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.