Paul M. Jones — Modernizing Legacy PHP and Self-Publishing

Paul M. Jones is an internationally recognized PHP expert, lead developer of the Solar PHP framework and lead on the Aura for PHP project, and a former operations intelligence specialist for the U.S. Air Force. In this Leanpub Podcast interview with Len Epp, he talks about how he got into programming and PHP, his Leanpub books Modernizing Legacy Applications in PHP and Solving the N+1 Problem in PHP, and his experience self-publishing.

Len Epp: I usually like to start these interviews by asking people for their origin story. How did you first become interested in programming?

Paul M. Jones: This is actually one of my favorite topics. A lot of people go through life and never find their true calling. I got my true calling very early in life. When I was just shy of 13, my dad brought home a TI-99/4A Texas Instruments computer. And if anyone out there knows what one of those is, you know exactly how long ago that was. I sat down with that thing for a couple of weeks and by the end of that time I knew what I was going to be doing for the rest of my life. Started out programming in TI BASIC when you had to save the program to a tape cassette recorder and then you had to play it back to load it back into memory. So that’s how I got started and it’s been a wonderful experience since then, learning how to program, learning the craft and the skill that goes along with it and all the communities that go along with it as well.

Len: So was your father a programmer himself?

Paul: No, my father was, first he was an army chaplain, then he was a Methodist minister, and then he became a certified financial planner, which is a minor version of a stockbroker. So he himself was not especially technical. I ended up having to help him out a lot with the various computers that we ended up buying for his businesses. And for good or bad, I still have to help them out with a lot of computers.

Len: It’s interesting, a lot of people that I’ve spoken to, their first introduction to computers is playing games, but it sounds like you just dove right in and started messing around with the machine.

Paul: Of course there were video games at the time, but they were stand-up coin-operated things. You did not download the latest version of whatever it was to your iPhone. If you wanted to play a game on your home computer, most of the time what you had to do was go buy a magazine, a physical paper magazine. Look for a code listing in the magazine and then type it in by hand from the magazine into the computer that you’re working on and then save it and then try to figure out how to debug it from there. We were not super wealthy back then, and games were pretty expensive comparatively speaking. So if you were going to buy a game, you had to shell out $20 or $30 for it and wait for it to come in the mail. It was easier to spend the time than it was to spend the money.

Len: And you ended up with a focus on PHP in your career. Can you explain a little bit about your path to that specialty?

Paul: When I was in the Air Force, I did some programming there as well. I worked with databases a lot, with FoxPro. And then around 1994, we got a copy of the original Mosaic browser that we used on internal classified networks. And of course to program that you would have to write up pages using plain old HTML. So I started doing that, realized I liked it. When I got out of the Air Force, I continued working with web pages and trying to attach databases to them. One of the first database systems that I worked with attaching it to the web was FileMaker Pro.

Again, that should give you an idea of how long ago this was, using, I think they called it CDML, Claris Dynamic Markup Language. I did that for the college that I was working at at the time. And then I heard about this thing called MySQL, which is a real SQL database system, and this language called PHP that you could use to interact with that and then generate a web page from it. And that sounded interesting. So I started on that. That was in 1999 and I’ve just kept doing it since then.

Len: I saw from your bio that you’ve worked for a number of different types of organizations. Is there any sort of stark difference between coding in a military organization and coding for a company or a nonprofit?

Paul: My programming work in the military was secondary to the work that I was doing. My primary work was as what’s called an operations intelligence specialist as an enlisted guy. But they put me in charge of training other people who were in the organization, and to keep track of that training I ended up with, like I said, FoxPro and a couple of other things. Programming there did not strike me as especially different than programming for any other client on the outside, but then that’s because it was a small, local client compared to the rest of the military, it was just for my organization. So I have not found any dramatic differences other than the need to make sure that whatever you did in the military stayed in the military. There was no open source, anything like that. So everything you did had to be kept under wraps, whereas out here in the civilian world, you’ve got all this open source stuff, which is fantastic to work with, and you can share both your solutions and your problems with everyone else and have everyone else look at what you’re doing to tell you what you’re doing wrong and maybe help other people figure out what they’re doing wrong. So there was that difference.

Len: There’s obviously been quite a bit of press lately about U.S. personnel hacks and things like that. Do you have an opinion in general about security of data in the U.S. systems?

Paul: We’ve all heard of Murphy’s Law. Anything that can go wrong will. There are military variations on that law. One of them is always remember that your weapon was built by the lowest bidder. Unfortunately, the same thing is true for government data programs. Anything that’s related to data, it’s built by the lowest bidder. So I think this is an example of where that comes back to bite you really fast.

Len: When the Obamacare website fiasco unfolded, I had this joke that winning a government contract is an entirely different set of skills from actually making a website or doing anything. So I always thought of the problem in terms of just procurement. But that’s pretty straightforward criticism when you say the lowest bidder wins.

Paul: Yeah, that’s pretty much it. In fact, when you talk about Obamacare, it doesn’t matter what your political affiliation is, how you felt about it at all. As a project management case study, it is fascinating. It’s almost a list of everything you could possibly do wrong all combined into one project. There’s a guy named Arnold Kling who is an economist. He’s blogged about that in the past as well if you’re interested in an economist’s point of view, from a guy who’s not only an economist but was also a programmer and built websites during the boom. So does Megan McArdle, I think she works for Bloomberg now, who is also a technical person, wrote a lot about the Obamacare fiasco, again from a production point of view, all really good stuff.

Len: Do you think the government has learned a lesson from that, or are procurement processes just so difficult to change?

Paul: It’s my guess that the inertia is not in favor of things getting better. None of the incentives are right. With government, again, this is an economics thing, when you are taking someone else’s money to spend money on something that you yourself are not personally vested in, then you’re not going to be careful with how much money you take and you’re not necessarily going to be careful how you spend the money. And you’re not necessarily going to hold any of the right people accountable for how it gets spent. And that’s regardless of where you stand politically, it’s just a set of economic incentives.

Len: Moving back to PHP, I know that it’s gone up and down in terms of reputation in the last 10 years or so. What’s your take on that and how things have changed maybe in the last couple of years?

Paul: So depending on how you felt about PHP ten years ago, it had nowhere to go but up in terms of security. There were obviously some security flaws in the language itself, but the primary problem was not the language itself in my opinion. The primary problem was that people who were drawn to PHP were not necessarily professional programmers. They were not people who had security concerns at heart, they just wanted to get something done quick, get it on the web because either it was going to make them money or they needed to do it for their own internal organizations. And so they weren’t necessarily thinking about security concerns right off the bat because they weren’t targets. And then a couple years later, suddenly everyone’s a target with cross-site scripting exploits or SQL injections that can take over your machine.

That’s the point at which the community started standing up and paying attention to those kinds of things. You started seeing things like the filter extension put in place. I think that was Pierre-Alain Joye who did that, which was a great boon. But in addition to that, there was widespread education, if by no other means than by word of mouth among developers, that these kinds of security flaws existed and you needed to watch out for them. So I think that security concerns have been addressed by the language, but it’s been primarily addressed by the better education of the people working in the language.

Len: You’re the lead developer for something called the Solar PHP framework. Can you explain a little bit about how you got into that and what it is?

Paul: Solar is actually an older one at this point. Way back when in 2002 or 2003, I became aware of a project called PEAR, that’s P-E-A-R, a collection of libraries, and I wrote a small, what I call a foundation, not a framework because back then the word framework was a bad word to use in PHP communities. So I called it a foundation and it was a collection of libraries from PEAR to do all the basic things that you needed to do like database connection, authentication, caching, logging, stuff like that. And I realized when putting this together from those other libraries that none of the libraries really worked the same way even though they were all part of the same project. They were all from different authors under one banner, so they didn’t look the same way, they didn’t feel the same way, you didn’t call them the same way. So with that in mind I decided that I wanted to start another project where those individual libraries would all look and feel the same way.

This was right around the time that PHP 5 came out, so I figured it’d be a good time to make a break with that older system and start putting together a new set of libraries. Solar originally stood for Simple Object Library and Application Repository, but it ended up being this monolithic thing where you downloaded everything all at once and used all of it whether you wanted to or not. That turned out to be the standard for framework projects at the time. It was nowhere near as popular as say the Zend Framework or Symfony 1 at the time, but it did have what I would call a small but committed community. And I learned a ton from writing it and I learned a ton from the people who provided patches and helped to work on it as well.

Len: And the Aura for PHP project, that’s a newer thing that you’re working on?

Paul: That’s exactly right. Aura is essentially Solar version 2. One of the problems that we had with Solar, first of all, was the name. It’s S-O-L-A-R. At some time thereafter, the Apache Solr project came out and people started confusing the two. So when Solar, the PHP project, went 1.0, we started discussing how we’re going to do the 2.0 project. The first thing we decided was that we needed to change the name. So we settled on Aura as a pun on the name. AU is gold, a sun symbol, and Ra is a sun god. So Aura.

And we decided that the new project should adhere more closely to the original ideas that we had had when we started, that is a series of individual libraries, not something that’s made to deliver it as a monolithic framework. So our primary goal was to take the Solar stuff and split it off into individual independent decoupled components where they would be independent not only from a particular framework but also independent of each other. I think it’s worked out pretty well. We moved away from a universal service locator to using dependency injection and providing a dependency injection container that you could use if you wanted to. And then in the various versions thereafter, we’ve been able to split those into even smaller components.

So for example, the Aura SQL component used to be a database connection, a connection manager, an SQL query builder, and a gateway and mapper system. We’ve actually split that out so that in version two the SQL query builder is its own thing. It’ll work with any database connection at all. You don’t even need one. You can just build queries at random if you feel like it. And the SQL connection portion just does that, the mapper and gateway are split off into their own components as well. So it’s been a story of reducing the size of the individual packages so they can be recombined in any way you like.

Len: I was wondering what motivated you to write Modernizing Legacy Applications in PHP on Leanpub?

Paul: The first motivation was I wrote a talk subtitled steps toward modernizing legacy code bases. The motivation for that talk was that I had been in several organizations where we had these really old code bases. They were tough to work with. And over the course of several years, over several different organizations, I came up with a list of steps and notes for myself on how to reorganize these code bases and make them easier to work with so that we could add features more quickly, fix bugs more easily, and isolate things more easily. So the talk came out of a generalized version of a story that I heard over and over again, where when you go into an organization and you look at the code base, it’s horrible. You ask the people who are already there, “how did it get to be this bad?” And they look at you and they say, “I don’t know how it got to be this bad. It was like that when I got here. We’ve just dealt with it since then.” Of course, that’s a lot of suffering in our daily lives. That’s a lot of pain and anguish. And you end up having this relationship with the code base that is adversarial, and you walk into work and you’re always kind of scared, “what’s gonna break today after I try to fix something?” You spend a lot of hours late at night trying to make sure that things are gonna work because if you touch one piece of code over in one place then something else somewhere else breaks and it’s not really your fault but you’re the programmer, you’re supposed to know what’s going on.

I gave the talk the first time and it was well received. I gave the talk the second time and it was well received. Third time I gave the talk, some people came up to me who had attended the first one and they said, “yeah, we’ve done it all. We’ve done everything you said. What’s next? Because it’s not really where it needs to be yet.” Well, I had this huge list of notes already, and it turned out that the timing was right for me to sit down and take all of those notes and compile them into hopefully a good how-to instruction manual on exactly how to follow these steps, through a series of baby steps, and end up on the other side with a code base that has gone from the spaghetti mass to something that is auto-loaded, dependency injected, unit tested, layer separated, and front controlled. And based on the feedback, I think it’s been a success in those terms.

Len: In the introduction to the book you define legacy applications, but you make some comments specifically about the nature of PHP legacy applications. Could you say a little bit about that?

Paul: So first of all, the word legacy carries a lot of baggage with it. Normally when we think of legacy code, we think of something that is merely old, it’s five years or 10 years old, or it’s developed according to old principles, or it was merely there before I got here. And so by definition, every programmer who comes onto a job looks at all the code that was already there as legacy no matter how good it might actually be. But in the work that led me to write the book, I discovered certain patterns cropping up over and over again as to how these applications had been constructed. Some of those patterns included things like globals being everywhere, or there being evidence of having attempted to rewrite it using a framework more than once.

So you’ll walk in and you’ll see a code base where you can see they’ve tried to apply one framework and it never really finished, and then another programmer came in later and tried to apply another framework and that one never really finished, and so you’ve got this code base with a mess of idioms in it from different systems. Or there is a poor separation of concerns, and this is especially true in PHP, a page script that sits in the document root that has a lot of includes in it to execute logic, and those includes when you combine them all end up combining the concerns of the model and the view and the controller all into the same scope, they’re all sharing each other’s variables.

So the typical PHP application in those cases ends up looking like what I call an include oriented system rather than a class oriented or object oriented or even procedural system, and it’s page based, because you browse to these pages that are sitting directly in the document root and each page is responsible for setting itself up and tearing itself down. Those and other factors are the terms that I use to determine whether or not something is a legacy application in PHP land or not.

Len: And you talk about how the way that people come to PHP in the first place has a specific impact on legacy applications in PHP.

Paul: That’s exactly right. One of the great things about PHP is that you do not need to be a professional programmer in order to use it. If you’ve got a business idea, or if you’re just working for your organization and you’re not necessarily a technical person to begin with, you hear about this language PHP, you know that you can type in a few lines of code and get something actually running on a server, and that’s fantastic. It allows you to make money very quickly. So the great thing about PHP is that pretty much anyone can use it. But the great thing about PHP is also the terrible thing about PHP, and that is that anyone can use it, whether they are professional or not.

So the people who write these programs, even if they are junior developers who will end up being professional programmers, PHP allows you to do a lot of stuff that maybe you shouldn’t ought to be doing in the first place, like combining concerns. But it lets you get up and running so that you can get something productive on the web. And then you turn away and you go to do your next thing. Unfortunately, what’s left behind is something that’s a security and maintenance headache, because you weren’t necessarily thinking about good architecture in advance, you weren’t thinking about whether you’d be able to test it automatically or not. Testing, who needs that? I can look at the page and I can see that it’s working, clearly it’s all right. And that’s great until your first SQL injection hits or until your first cross-site scripting problem hits and then you’re left with this horrible mess.

In reading a book called The Inmates Are Running the Asylum by Alan Cooper, I found what I think is the right analogy for this. When you look at these code bases, it’s like looking at a dancing bear. When you look at a dancing bear, you’re not thinking that maybe its pirouette is off balance or that its plié is not at full extension. You’re just amazed the thing dances at all in the first place. And looking at the code bases is a lot like that. You wonder how this ever worked.

Len: That’s a really good image. You also talk about how, faced with terrible legacy code, developers often have a desire to rewrite the whole thing, and you write specifically about developers who have the desire to become one’s own customer. Could you explain that image of wanting to be your own customer and why that’s a problem?

Paul: First of all, no developer ever looks at anyone else’s code and says this code is fine the way it is, we’re going to leave it alone. The first instinct of every developer when they look at someone else’s program, no matter how good it is, is this is not the way I would have done it. It needs a rewrite. So because we have that first initial instinct every time, we need to be suspicious of that. It turns out that that instinct is very self-serving in a lot of ways. We’re not necessarily looking at it to rewrite it to make things serve the customer better or for the program to be better.

We want it for ourselves, and if we want it for ourselves, that means that we get to be the customer then, and I get to determine what the needs are for it, and it should be done the way I want it to be done. So we use ourselves as a reference point instead of using some external concern as a reference point. And treating oneself as the customer includes things like, well, I want to use this new framework X because that’s the newest, hottest thing, so clearly it should be rewritten in that. Rather than looking at it and saying, well, it’s serving its purpose pretty well. Other people are paying for it. Maybe we should mostly leave this alone and only tinker with it around the edges, or make sure that it keeps working the same way, but just improve the quality of what’s going on under the hood.

The neat thing about being your own customer is that, if you’ll pardon the phrasing, it feels very sexy to do a complete rewrite because then you get to do it, quote unquote, the right way, the way it should have been done. The problem is that that makes you very optimistic as to how well it’s going to go. The joke that I make about rewrites is you’re going to estimate that it’s going to take a certain amount of time. Everyone’s got their favorite estimation techniques. Normally it’s pick some estimate and then double it, and that’s how long it’ll really take because you’ve got some buffer. But when it comes to a rewrite, it’s not enough to just double it. You also have to convert it to the next higher units, so that if you think it’s going to be a six-week rewrite, it’s really going to be about 12 months. And that’s because there’s so much going on in the system that your optimism blinds you to. And then when you’re 12 weeks into what was going to be a six-week rewrite, you realize how long it’s really going to be. You start cutting corners, you start taking shortcuts again, and you end up with a system that’s just as bad as the old one, just in different ways.

Len: I think you mentioned Netscape as an example in your book.

Paul: I cribbed that one from Joel Spolsky. The idea is that Netscape looked at their code base and said, we need to completely redo this, and maybe that was true. But they went out of business doing the rewrite. They’re Mozilla now. They had to completely change everything about their business in order to make that happen. And if you’re in a position where you can afford to do that, maybe your rewrite is for you.

But most people that I know do not have either the money or the time to actually go through with that kind of thing. So I hope that this book, if nothing else, will save people from thinking that a rewrite is going to save them. Nuking it from orbit feels great, and refactoring feels a lot like work, and so we don’t want to do that. But it turns out refactoring, even though it feels like work, has the benefit of actually working, whereas a rewrite, most of the time, is just going to blow you up.

Len: You recently held an online boot camp walking people through the modernizing process. Can you explain the motivation for setting up that boot camp and how it went?

Paul: When I was invited to speak at the Zend Conference, I don’t remember if it was last year or the year before, they wanted a tutorial session on basically working through the book. So I put it together and it ended up being something like 380 slides worth of information for a three-hour slot. I presented it to a full room. I was very happy about it. Unfortunately, I had to cut out about a third of the information in it and I had to skip one entire chapter because it’s just too much to go over at once. So I figured that if I could present it online to a committed audience over the course of a weekend rather than in one three-hour session, that would be a better way of delivering the information. It turns out to have been true. We worked through essentially the same set of information, but I was able to spend a lot more time showing examples, and people could ask questions while I was doing it. It took the full eight hours to get through it, so I really don’t remember quite how I got through any amount of slides in three hours previously. But it was very well received.

Len: And is it something you’ll be doing again?

Paul: It is something that I would love to do again. This was a good first run, but I saw some mistakes and flaws in how I did the presentation and there were some things missing, so I had to hem and haw and add those in on the fly. I expect the second version of it to have a lot more to it and to go a little more smoothly.

Len: I have a question about your second Leanpub book, Solving the N+1 Problem in PHP. Could you explain what that problem is and why it’s important?

Paul: The N+1 problem essentially is a number of queries problem when you’re putting together your objects. It’s not something that applies just to PHP. This will happen in any language. In fact, when I first encountered it, it was happening as a series of stored procedures in Postgres. The idea is this. If you’ve got a series of blog posts and you want to get all of the comments for all of those blog posts, generally what happens is developers will first get the list of blog posts, so they get a list of 10 posts, and then they loop through that list to get the comments on each post and attach the comments to the post objects.

What happens in that case is you end up making 11 queries, one to get the original set of 10 posts and then one query for each of the 10 posts that are in that collection. Maybe that by itself is not such a big performance problem. But when you’re putting together a collection of, say, 20,000 objects with five relations each, you end up with 200,000 queries and a web page that doesn’t load for three hours. That’s a pretty serious performance problem. And it doesn’t even need to be in terms of 20,000 objects. It could be in terms of 20,000 requests being made against your system. If you can reduce by an order of magnitude or more the number of queries that are being made coming out of an application, as a scalability concern, then you need a lot fewer machines in order to scale up.

So that’s the base of the N+1 problem, where the one is the initial query and the N is the multiple number of queries that have to happen to populate those other objects. And the book of course is about how to recognize that that’s going on, why it happens in the first place, how to solve it, and then some automated ways of solving it after you figured out how to do it by hand.

Len: Switching gears a little bit to your publishing process, how did you find out about Leanpub in the first place, and why did you choose to use us to publish your book?

Paul: Leanpub was highly recommended by a colleague of mine, a guy named Chris Hartjes, the Grumpy Programmer. He had published once through a traditional publisher and then again through Leanpub and had nothing but praises to sing for Leanpub. And the joke that I have made, and I think he’s heard this before, is that I figured if Chris Hartjes could write a book on Leanpub, then by God, so could I.

Len: I’d like to ask what your opinion is about the book market and how it’s evolving, maybe even specifically the computer book market. Do you see more authors doing what you and Chris chose to do and self-publish programming books, and are there market and technology based reasons for doing that, or is it something with the publishing industry itself that’s driving those choices?

Paul: I’m going to take the easy way out and say there’s a series of different concerns all playing back and forth with each other on that one. One of the things that people in general like is to feel like they have been chosen. So when a publisher comes to you and says, “we have seen you, we like you, we want you to publish a book with us,” it has that aspect of feeling like you’ve been chosen by someone else. It makes you feel good about yourself. So that right there is a very powerful driver that favors the traditional market. It’s a status symbol, if nothing else.

The primary driver that I see in favor of self-publishing is that you get to keep more money. And frankly, I am a cheap little man with a mercenary heart, and I like that idea. It also means that I get to be in control, for good or bad, of everything about the process. I get to choose the art, I get to choose the font, I get to choose everything about the book, I get to choose the process for writing, I get to choose in all but the broadest general sense how it’s going to be published. So for people who have a very, I’m not going to call them people who are control freaks, I’m going to call them people who are control enthusiasts. For the control enthusiast, self-publishing is a wonderful thing.

Len: One thing in particular with technology books is that having control over timing seems to be really important to people, especially if they’re talking about something that’s meant to solve a problem that people have right now. I think it’s in particular hard for people who think in a technical way to say, I’ve got the solution to problems that exist right now, but now I need to subject myself to an arbitrary process that means it’s going to take a year or two for my solution to get out there. There’s a certain type of person that finds that to be an unbearable situation.

Paul: I completely agree. And as a follow on to that, it may be that your solution when written down is only 30 or 40 or 50 pages. It’s going to be tough to find a publisher who’s going to find that a profitable concern to follow, whereas with individual publishing you can do small one-off pieces that address as narrow or as broad a topic as you like. Being highly focused you can spend all your time working on that one thing, get it out of your brain and have it published. And that’s a fantastic thing. In fact, the N+1 book that we talked about before, I think that’s a pretty good example of that kind of thing. It didn’t really fit in the modernizing book, even though we reference it. But it’s not something that would be a full-sized book on its own either. So publishing it as, I think it’s like 60 pages, its own standalone thing turned out to be really nice. You just can’t do that with a traditional publisher, not at a profit anyway.

Len: And did you publish either of your books in progress? That is, publish the first version before all the chapters had been edited.

Paul: I did, and that was another real benefit of self-publishing and specifically the model that Leanpub presents. I was able to write the first three chapters, which frankly were the hardest three chapters to write with one exception, and then put them out there on Leanpub to say, “hey, this is here. If you’re interested, come and get it. If you like, please give me feedback so that I can fix typos and address other concerns.” The feedback was phenomenal, right off the bat, it wasn’t even finished yet. So being able to publish it in installments in that way was super helpful to me as an author, but it was also super helpful to me as a perfectionist, because you get a lot of feedback from a lot of people who are paying attention, who will all find some small detail that you never noticed, and you can put it in and have it go out on the next iteration. It’s fantastic.

Len: And how did you receive feedback?

Paul: Again, one of the wonderful things about the Leanpub process was as you release iterations, you are able to send an email to everyone who had already bought it and say, “here’s the next version. If you notice problems, here’s how to contact me.” So people would send me emails, where someone would say, “hey, I noticed on page X that you’ve got this right here and that’s not quite right. You should probably say this instead.” That communication mechanism just from hitting the publish button was fantastic. And then in addition to that, there were several people who knew me or who already knew my address and so could buy the book or download a sample and then give me feedback just privately.

Len: Just for anyone listening, the way our emailing readers feature works, when someone publishes a new version of their book they can send a message to all readers, but the author doesn’t see your email address and you don’t see theirs, although it is possible for you to share your email address with the author. And this is my question to you, Paul: did you feel that it was a loss that you didn’t have email addresses for all your readers, or did that sort of blind communication system work just fine for you?

Paul: It worked just fine for me, but that was mostly because when people would contact me through the Leanpub system, they recognized that it was essentially a double-blind system. So if they felt like giving their email addresses, they would, and if they didn’t feel like it, they wouldn’t. But in every case, I can’t think of a single case where this wasn’t true, everyone wanted to provide their email address as part of that communication. So I did not feel like I was missing out on anything, and if nothing else, it felt more valid that they were not required to put an email address, that they wanted to actually have this communication back and forth. And that was very satisfying.

Len: As you were saying about control enthusiasts, a lot of authors who use Leanpub are very opinionated about their writing and publishing tools. From your perspective, is there anything that stood out that you think we could improve?

Paul: That’s a really good question. I can’t think of anything offhand in terms of the tooling. I just use a text editor and work in Markdown. I use Markdown for everything personally anyway, so that was not such a big deal to me. Having the Markua superset of Markdown was also very nice. If there was one thing that I think could be improved on Leanpub’s side, and I think I’ve mentioned this to Scott and one of the other guys at Leanpub, it would be nice to be able to publish the sample separately from the main book, so that if you want to make a change to the sample or add or remove things from it, you could do that independently. I am aware that the back end production process for those two things is probably closely tied together, and so decoupling them might be a very difficult thing to do. But even so, as an author, I personally would find that pretty useful. Having said that, that is the only thing that I’ve run into that’s been even mildly inconvenient. Everything else about the Leanpub publishing process has been very straightforward and very easy to use.

Len: The only question I have left is, are you planning on writing another book, and is there anything in the pipeline right now?

Paul: There’s nothing in the pipeline right now. I do have some general, vague, ethereal ideas about what I would like to do next. One of them is to write a book about action domain responder, which is a refinement of the model view controller pattern that applies more specifically to web applications than it does other kinds of applications. That would likely be a very small book. Another one that I’ve got in mind is, there is a culture of what are called preppers, people who like to be ready for emergencies. And I have considered the idea of writing a book specific to my experiences in putting together my own little stash of stuff and how I went about doing it in a step-by-step way so that it didn’t have to be this gigantic expense all at once. It could be this small step-by-step thing, sort of like the modernizing process was for applications.

Len: That’s really interesting to connect those two things. That would be great to see.