Phil Sturgeon — Building APIs, PyroCMS, and Lean Publishing

Phil Sturgeon is a software engineer at the New York City-based carpooling app Ride. A core contributor to CodeIgniter and FuelPHP, he founded and later sold PyroCMS, and is the author of the Leanpub book Build APIs You Won’t Hate and co-author of PHP: The “Right” Way. In this interview he talks with Len Epp about his career, his books, immigration and remote work, and his experience lean 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, and how did you end up in New York?

Phil Sturgeon: I’ve been programming for a really long time. I started when I was about 11 years old, interestingly, with HTML and CSS, and was making a big games review website, and it was a very complicated manual process just using HTML all the time. So in the end, someone taught me all about PHP, and that was when a whole new world of opportunities opened itself up for me. So I’ve been hacking around with various content management systems, building my own systems and frameworks and all that sort of stuff for a really long time.

Not entirely sure how I ended up in NYC. It just happened. A company reached out. They were looking for somebody to CTO for them. They were interested in PHP after recently having a bit of a mess of a Rails app made for them, and they just wanted to not have to do Rails anymore, and they reached out to me after seeing my work with FuelPHP, which was a relatively popular PHP framework, and they thought that I’d be a good fit for that job. And now I’m here.

Len: And one question I’d like to ask people is if you got a computer science degree or something like that along the way, because I find about half the people I ask say no.

Phil: I don’t have a degree, annoyingly, and it’s an interesting story. I have a higher national diploma from the UK, which is like the first two years of what a degree would be. An extra third year would turn that into a degree. But the year after I got my HND, they changed it from being the higher national diploma to being the foundation degree. It literally changed the name, not the meaning of it, but because everyone hears the word degree, they think it’s much better. So one extra year and I would have technically had a degree.

Len: When did you found PyroCMS, and what motivated you to do that?

Phil: I’m a little fuzzy on the dates, but basically when I came out of college, I started my own company, just a really small four or five person development agency. We did a lot of five page websites, really basic websites. If this is a hotel booking system, it would be the same blog, the same contact us page, the same page manager, and then this extra module that would be a booking module. Or it would be a car showroom website, which would be the same stuff and then this one extra module. So we kept building the same stuff over and over again, and we realized that it was a bit daft.

At the time I’d been working with a lot of other content management systems and I really didn’t like any of them. Most of them have made huge improvements in the last couple of years, but at the time there wasn’t a PHP CMS around that was simple enough or free or cheap enough to make a lot of sense. We could have used ExpressionEngine, but the budgets were small and with ExpressionEngine you need to pay about $1,000 just to get started. So I ended up turning the code that we had into a really basic CMS for use at that company, and then literally every single project we did was just deploy the CMS and add in a new module. When we had another hotel booking website it would be install the hotel booking module. And every project made this whole collection of code better.

Then the recession hit in about 2009, maybe 2010, and my clients just stopped paying, so the company didn’t last very much longer than that. And I had all this code and I thought it’s a shame to just throw this away. So I open sourced it, and initially it had terrible feedback. It looked terrible. It was using the CodeIgniter framework, which was very popular, and so that got it some points, but it looked awful. And luckily at that point some friends of mine, we all contributed together and made it much better over the next few versions. About six months later we had a version we were really happy with.

About another year after that of just seeing a lot of usage, we got on GitHub and it was the most watched PHP CMS on GitHub apart from WordPress, which was just a mirror, it wasn’t even on GitHub. So it got pretty popular, and based off the back of that we made a professional distribution which for $80 you could get some extra functionality and some pretty cool stuff. You could white label it and all that. So that’s how PyroCMS ended up coming about. It’s a bit of a natural evolution story as opposed to I’m going to make a CMS, because the CMS market is so insanely flooded that no one’s going to go this is where I can make some money, this is going to be the next big catch.

Len: And did you do anything specific to get a lot of attention eventually, when you were happy with how it looked on GitHub?

Phil: That was also a bit of a natural evolution, as well as a lot of luck. It was built using CodeIgniter. And at the time there wasn’t a finished CodeIgniter CMS. There were a lot of half done attempts, but there weren’t any like that. It was also when the whole concept of PHP frameworks was quite new. They’d been around since 2006. Most of them weren’t great or weren’t publicly used for a couple of years after that.

Around about 2009-2010, we were the first CodeIgniter CMS that was completely done, that had the features that people needed. That combined with the fact that I was very active in the community, I blogged a lot, I wrote about CodeIgniter a lot, I had a relatively large following of people that liked that framework. Because of that, people would see about PyroCMS and that was it. There wasn’t an AdWords campaign or anything. It was just naturally people started using it.

Len: That’s a great answer. I think a lot of people, when they’re telling stories about how something became a success, they’re like I was working in the movie store and then I won an Oscar. It’s really good to hear the details of how people get from A to B. On that note, I know that you’re quite a popular conference speaker. Do you have any advice for anyone looking to make that move?

Phil: The way that it worked for me might not be how it works for other people. The first few conferences I spoke at, I organized myself. I ran the CodeIgniter conference. I took it over from somebody else because they did a terrible job the first time around, and the next couple I organized, and I spoke at those to give myself a little bit of practice. But apart from that, I did a few meetups and user groups and things like that. And that’s a great place to get the confidence to speak. Because if you have a local user group, and there’s maybe 20, maybe 60, maybe 100 people that go, if you can go and speak there, then unless you’ve done a few things wrong, they’re going to be your friends, they’re going to be people that you know, and therefore the feedback will be much better. It will be less scary because you’re looking back at familiar faces, and it’s much easier to dip your toe in at the local user group than it is the conference stage.

And then once you’ve done that a couple of times, you just apply. Most conferences have a call for papers website. Just apply and make a good abstract, ask your friends for feedback, put it up on Twitter, see what they say, and just apply and go. The other approach, really quickly, is most conferences you attend will have an uncon track. The Uncon is usually just a room that has a stage and a microphone just like the main stage, but they won’t have a planned schedule for it. So you can just go there, sign up and say, I’ve done this one at my local user group and I want to do it now and I think it’ll be good, and do it there. And then if people like it, you’ll get good feedback and then maybe you can apply for a proper one at a different conference soon.

Len: I saw that you’re involved with an organization called the League of Extraordinary Packages, or the PHP League. I love the name, by the way — obviously it comes from League of Extraordinary Gentlemen. Could you talk a little bit about what the league does and how it got formed?

Phil: I’d been quite used to releasing code under CodeIgniter or PyroCMS or FuelPHP or under the names of any of the open source projects that I’d been managing. But when I moved to New York and became CTO of a tech startup, I had a fair few responsibilities, and I didn’t have the time or the ability or the need to work on CodeIgniter, FuelPHP or PyroCMS. So I ended up quitting all of those things, which left me in a really weird position when I was releasing some code. I was building this code for use at the startup called Capture, and I realized that I should release it as a package because it was actually really useful and it didn’t exist as far as I knew in the PHP world. So I wanted to work out where to put it.

With PHP these days you need to have a namespace for it. A namespace can just be your surname or your company name or a nickname or anything else. And I started thinking, what would that namespace be? Would it be Phil Sturgeon? Seems really egotistical to make people write my name into their code, and Sturgeon is a bit weird. Do I come up with a nickname? I used to be called Squared.

Oh, Squared’s another company, I can’t be called that. And I just had this really hard time doing it, and I asked my friends if they’d ever thought of it and they’d had the exact same problem. So in the end me and a few friends started coming up with some names that we could use. The PHP super best friends club was in there, that was a winner for a while, but the namespace was hard. Would you call it besties or PHP SBF or whatever? Eventually somebody suggested the League of Extraordinary Packages. My concern was that people would think it was an indecent joke, but luckily that one hasn’t been the feedback so far.

And we basically just released a bunch of code under this name. It’s me and a few of my friends. We’ve got OAuth2 servers and OAuth2 clients and Flysystem, which is a PHP package that helps you use one standard interface and you can work with different file systems like the local file system, S3, FTP, all these different things. They’re just really unique packages that focus as much as they can on quality without taking shortcuts, and we all work on them together and share responsibilities, and it’s a fun little group of people.

Len: I also have a question about Ride, where you’re working now. It’s such an interesting space. What’s Ride’s larger mission?

Phil: It’s an interesting space and there’s a lot of competition. We’ve managed to find ourselves a little niche that isn’t being fulfilled already. So when people say carpooling and it’s an iPhone app, everyone thinks that’s like Uber and Lyft. But things like Uber and Lyft, all of those similar apps, they are basically, I am currently at point A, I would like to get to point B. Can you get me there now, please? And somebody will come and pick you up. There’s a paid driver and they will take you to where you’re going. Now that’s fine as a one-off, but imagine if you lived in a town where there’s 10,000 people and you had a one hour long commute to work every day. There’s no way that you can just stop using your car and request an Uber every single day, because what if you’ve only got a few Uber drivers in that town, what if they take the day off, what if they’re busy, what if they’re not near you?

So trying to use Uber or Lyft or Via or Gett or anything else for schedule based, repetitive, literal carpooling, like back in the good old days of carpooling, it is quite hard with those services. So we help people that already know each other invite each other, and then it just helps you manage the money sharing. And if you don’t know people that want to carpool then we’ll help you be matched with people automatically. Based on your schedules and based on where you’re going, we’ll find you a really efficient match that helps get you from home to work and back again every single day on the same schedule. And so far, no one else is doing that.

Len: It’s really interesting. One of the divides that products fall on one side or the other side of is, is it something that you can rely on when you need it for something serious? So in the world of arranging rides, Ride is on the side of the divide where it’s getting to work. You can’t be late.

Phil: For now it’s definitively getting to work. You sign up and you put in your itineraries and it’s the same time every day, and then it will go to and back every day, which is a little bit rigid, which is why we’re rolling out a few cool new features in the future to make it a bit more organic. Like we’re going to ride today, we’re going over there, and you can have a bit more control about where you’re going and what you’re doing. Because there’s been a few times where me and my friends go paintballing over in Staten Island, it’s quite a drive away. There’s 10 of us, we need to take two cars, and we all live all over the place, so us trying to arrange who goes in what car and where, when we don’t all necessarily know each other or where each other lives, is a bit of a pain in the backside. So if we could just all jump into Ride and be like we want to go to this paintball place and it just matches us all up, then that would be really handy. And then money’s paid for, and you don’t have a situation where two people have Venmo and one person has Square Cash and the other one doesn’t like technology so he just gives you a fiver and you forget about it. That whole thing could be solved with apps quite well, I think.

Len: Does Ride have an enterprise version for companies?

Phil: We don’t have any of that fancy stuff just yet, but that would be interesting. Most of our users are accumulated in a B2B fashion. So we do work with a lot of larger companies providing their carpooling for them. I can’t think of one I’m allowed to mention, so I won’t. But a big company will give us a certain amount of money per year, and then we will provide them with statistics and information on how many tons of CO2 they’re saving and how many cars are no longer going to be in their car park, so that they know they can sell off one of their car parks to a Starbucks or whatever. And the whole know how much CO2 you’re saving will get you money off your taxes or whatever because you’re doing a good thing.

Len: It’s kind of an obvious question, but I suppose Ride’s relationship to the foretold switch to autonomous cars would be less controversial than for other ride-sharing apps, right?

Phil: Yeah, makes zero difference to us if you happen to be interacting with the car or not. We have four people, they’re in a Ride, any one of them can be the driver, they can swap halfway, none of this stuff really matters because we don’t have paid drivers. We don’t lose out if no one’s actually got their arms on the wheel, so that’s okay.

Len: I wanted to ask about something you were involved in recently called, I think, Geeks Giving for AIDS, where you went on a really long bike ride, like 285 miles, and in addition to doing that to raise funds, you included discounts to your books and even books by other Leanpub authors if people would donate, and you also went a month without drinking. Was it easy to get other Leanpub authors to contribute books to your plan?

Phil: I’ve actually done this twice. I did this once in the past and I just did the discounts, and it was roughly the same plan and the same bike ride. I asked my friends if they’d do me a favor the first time, and I mostly only approached people that I knew pretty well, people I’ve met at conferences and had a drink with. And then I realized that it was actually quite good marketing for them, so the second time I didn’t feel quite so bad running around asking other people, purely because a lot of the time getting any sort of coupons out there is pretty helpful. Some people say don’t overdo the coupons, but I really find that they help. Another little trick I found is that if you can stay in the top 10 on Leanpub then you get a lot of sales just by being on the top 10. So quite often throwing out some coupons, you might make a little bit less money that way but you get more money when you’re up top. So most of my friends are happy to give out a couple of coupons, especially if it means the money’s all going to charity. And it worked out really well.

And it was because I’d done it twice that the second time I thought I’ll throw in an extra bonus, I’ll do a month no booze, because I like to party, I like to have fun, I go out with my friends a fair bit. And that was the extra clincher for a lot of people, because a lot of people were like, “we’re not going to keep paying Phil to ride bikes, Phil just likes riding bikes, we’re not going to keep putting our hand in our pocket for this.” So in the end I was like well okay, if I also don’t drink, they were like, “whoa, he’s serious, we should put some money in there.”

Len: I’m really curious — I had a friend who did that once and he said the unexpected consequence was that he was tired all the time and slept a lot more than normal. Did it have that effect on you?

Phil: I got a fair amount of sleep and I also started a few side projects which I now don’t have the time to maintain. So I was just hyper productive for a month, and it was really fun. I wrote a few articles. I think I started working on a video course along the same lines as my API book. I did a whole bunch of things that I’m going to have to finish up now instead of drink.

Len: I was wondering also about the charity angle. We’ve got the Leanpub for Causes program, where Leanpub authors can share royalties from their sales with various causes that have signed up, including PHP Women, I think, which is a cause that you’re familiar with.

Phil: I haven’t seen that on there. When I was selecting my group, I’ve been donating to the EFF for the entirety of the time I’ve had the book on there. At one point when the EFF were really losing I put it up to 20 and I think even to 30 percent, but now that they’re winning a few more battles it’s back down to 10 because I need the money myself. But I didn’t know PHP Women was on there. That’s great news.

Len: I wanted to ask you a question related to Build APIs You Won’t Hate, which is one of the big Leanpub bestsellers. I know that over the summer you wrote an article about some difficulty you had with getting a work visa to the States. It’s a really long story, so I’m not going to ask you to repeat it, and I’ll post the links to your blog post, but I know that your book actually played a role in that story, and I was wondering if you could tell us a little bit about that.

Phil: I don’t think it’d be too much of an exaggeration to say that it stopped me from being dead or homeless. I was going through a really tough time where the startup that brought me over to the United States ran out of money without warning me about it. One day everyone was just fired and the company was bankrupt, and it was pretty terrible. And the type of visa I have makes you tied to the one specific job. I popped off out of the country to go and speak at a conference in Barcelona some friends of mine were running, and I didn’t want to cancel on them, and then I wasn’t allowed back in to the United States unless I came back on holiday. And it was one of these ridiculous situations where I was not allowed to work, so I couldn’t do any freelance stuff really, but I also couldn’t get rid of my apartment because my apartment was on a lease that they wouldn’t let me out of.

For the three months I was there on holiday before I ended up having to get the heck out of the country entirely, my only source of income was actually Leanpub. Perfect timing in that the first month I collected royalties from Leanpub started right at the start of that. So the whole time, the only money I had coming in was Leanpub royalties, because that’s not working, I can do that legally. Eventually I managed to get rid of my apartment and I went international for a while. There was a conference in South Africa and a conference in Turkey, so I was like I’m just gonna hang out in South Africa for a while and I’m just gonna mess around in Turkey.

So it sounds like a first world problems situation of being like I had to go to these places, it was amazing. And I finished off the book on this rooftop bar, a really cheap hostel in Turkey. And it was scarily, whilst the Taksim Square riots were happening, I could hear them all happening, and I was like I’m just gonna stay over here and drink my martini while that all happens and finish working on my book. It was really weird. But it was really helpful. Without Leanpub making me that income, I really don’t know what I would have done.

Len: Well, I was really glad to read about that, and it was fascinating hearing that a book can play a role like that in someone’s life. I myself have lived and worked abroad — I lived in the UK for nine years — and you’re in the States right now. I was wondering what your take is on the discussion around immigration that’s happening in the Republican primary. Is that something that has an effect on you at all?

Phil: It’s really interesting because most of these people that are complaining about immigration just haven’t quite realized that they’re racist yet. There’s a number of times I’ve been in a bar or somewhere sat around in public and you hear people say, “are all these immigrants coming over here and taking our jobs,” or whatever, and I’ll be like, “hey, excuse me, I’m an immigrant. I don’t believe I was taking anyone’s job, because they tried for months to find somebody and then eventually they had to bring me over at great expense to them and the nation and some lawyers just so that the job could be done. Are you mad at me as well?” And they’ll be like, “oh, no, we don’t mean people like you, I mean people from other countries.” Oh, you don’t like people that happen to be a different color to you? Oh, I see. And then they slowly start to realize that they’ve just been racist.

The whole stuff on immigration right now is pretty mad because America is notoriously hard to get visas in. I’ve had a really hard time getting a visa and staying and working in the country, and I’m making a reasonable salary, and if they gave me a visa or a green card then they would be getting quite a reasonable amount of tax every year. And there’s a lot of smart people that want to get into the country that want to work and contribute to society and they just can’t. And it’s really daft. I know you can’t just throw open the floodgates and let everyone in, but it really blows my mind that it’s so difficult to get and work here.

Because the very basic version, if you’re trying to get a visa to work in America, you either have to get an O1 visa, which is the alien of extraordinary ability — great name, right? But to get those is really hard. You have to have books out and conference speaking or be a judge on a panel at some big whatever, and you have to get articles on Nettuts and wherever, and then they’ll give you a visa, and that costs about ten thousand dollars to obtain and it takes months to work on.

But that is often a better option and is quicker than trying to apply for an H-1B visa, which used to be a case of first come, first serve, but now it’s a lottery and it might take you three years to get the visa. So if you’re trying to get an H-1B, you have to apply in April, you might get one in October or next October or next October. And it’s ridiculous. Who’s going to a job interview saying, “yeah, no, I’m happy to work for you, when can I start? Any point in the next three years, to be honest, probably around October.” It never works, it never makes any sense. So how the hell are people meant to get visas and come and work in the country when the option is pay an insane amount of money which you probably don’t have, or just wait forever? Or marry someone illegally.

One thing to add into that is that unfortunately people often conflate the idea of making it easier to obtain a work visa with, we should just let people work remote. I’m a massive fan of remote working and it definitely has its place. Some companies are 100% remote and that works for them, and I’d like to experience a company that can be 100% remote successfully someday. But the important thing to remember is that most companies, even that do have a large number of remote staff, do have people on the site. This is the startup I’ve worked at now, we have 20, 25 engineers and two of them are in the New York office, the rest of them are in South America, they’re in Argentina, Brazil, Colombia. That’s a pretty spread out team, but the benefit is that we have two engineers and a few people in the office so that we can have those important meetings that can’t be done via Slack.

And the thing that people forget about remote employees is that you still have to see each other sometimes. If you never met your staff or the people you work with, you have this really gross weird isolated feeling at work, and it’s not something that people stick around with very long. They’ll do a year there and they’ll wander off. We often fly the Americans down to South America or them up to us, and we find flying people around quite a lot is a good way to fix that remote distance situation, but it’s also really expensive.

In every instance where you need someone to work in the office where you might end up getting them a visa, they’re not going to be the correct person for remote working. So they’re really not the same thing. And whenever you try to have a conversation about making it easier for immigration and visas to happen for tech employees, you always get people run out and go, “well, remote work, I have remote work and you should do that more often.” You’re like, it’s not the same. Stop it.

Len: Yeah, and one of the consequences people often don’t think about until they’ve done it is that you can end up with the cool kids and the not cool kids, and the cool kids are the ones who are at HQ and see each other and hang out all the time. Even little things like not getting the invite, or having to have a joke explained to you, can build up into a narrative that you’re completely outside of over time. It’s also interesting, from a perspective of immigration policy, you probably want fewer remote workers because they don’t pay taxes in your country.

Phil: Absolutely, the money’s just going straight out to some other random country and you never see it again.

Len: Moving on to APIs You Won’t Hate — maybe money aside, what was your motivation to write a book on that topic?

Phil: Interestingly, I never really thought it would make that much money. I’m pleasantly surprised that it’s done okay. I blog a lot and I really enjoy writing, and I originally did this really silly little blog post of just bullet points of things you should think about, and it was a bit flippant and jovialistically rude, but it was just like do this, do that, yeah you muppet, really rapid fire like that. And it was actually really well received. People were like, “I hadn’t thought about this, could you expand on this, could you explain this more?” And I used that bullet point list to notch out some sections and chapters, and it was originally nine chapters long. As I started writing I realized it was going to be more like 13 chapters long, and it took me a couple of weeks to really finish up the first post, and I thought, oh god, if it’s gonna take me a couple of weeks or a month for every single one of these chapters, it’s gonna take me a year to get this blog series done.

I’ve never put adverts on my blog. I don’t like to try and monetize everything I ever do. And I also worried about the quality — if I take on this project that’s going to take me a year and a half of just writing these articles, firstly I’m not going to get to write about anything else, which is going to be really boring, but secondly I worry that the quality would be much lower. Whereas if I was to make it as a book then I could actually put even more time in and even more effort and maybe get an editor later on, which unfortunately I did too late. A lot of the reviews happened before I got the editor involved, so I got a four out of five instead of a five. But that was the motivation really. I don’t want to just knock out this nonsense and I don’t want it to take forever for nothing, and I don’t want to have to jam adverts on my website to cover it, so I’ll just do it as a book and see what people are willing to pay. And happily people were willing to pay quite a decent amount and they were happy to buy it early on as well, so I could fuel the development of the book with the early sales.

Len: And is that one of the reasons you chose Leanpub? Was it the ability to hit the publish button before it was done done?

Phil: Yeah, that was exactly it. A lot of people just said, “you’re an idiot, why are you giving them 20% or whatever of your royalties?” And that was never the point. I could make 100% of not much. I could wait until I finished the entire book and then a year later or six months later I could get 100% of the sales, or I could do it earlier on and do it better. And just having this group of people that were used to the concept of books being developed on the go meant that people wouldn’t be shocked or annoyed when they got a half done book, and being able to send out email updates, all that sort of thing. I did the first chapter as a blog, I think, so I already had that one there for free, and the next two chapters I did in the space of another month, and then I put those three chapters on Leanpub and put the price for like $8.99 or something, and then just went, go, you can buy it now, see what happens. And luckily people started buying it, and the more people that bought it the quicker I worked on it and the more time I devoted to it, and then it was done.

Len: That’s a great story. And just one comment — our royalty rate is 90% minus 50 cents per sale, so it’s about 10%. One of the values a lot of authors find is actually the feedback they get from the community when their book isn’t finished, because often the very first people you attract are the ones who most desperately need whatever answers you’re providing. They would rather have their problem partially solved now than never solved. Was interacting with those people something you were engaged in actively, or did things just come to you, or did you just ignore it?

Phil: All three. Some people got in touch with feedback that was absolutely on the money and I implemented it as it came. Some people gave me suggestions for things to add or links to include. So there was a certain amount of user participation, which was really helpful that I wouldn’t have got if I was doing it in an echo chamber. And I don’t like to advocate the users will be your beta testers, but a lot of people noticed mistakes. I’m terrible at spelling, I’m terrible at grammar. That’s kind of the reason that you’re getting this cheaper book, is that it’s not finished.

When it’s done it’ll be spot on, but if you need this information soon, if you want it at a discounted price, you might have some mistakes to deal with. But luckily people were really understanding about that. And a lot of people even sent me pull requests. Once you started supporting GitHub, there were a certain number of people that were like, “please add me to this, I promise I won’t do anything messed up, just let me make a pull request to the book.” And someone fixed like a hundred spelling mistakes in one pull request, which was amazing.

The users helped out more than some of my friends did, because everyone’s busy, and a few people did say, “I’ll definitely take a look at that book for you,” and then life got in the way, and I completely understand why. But there are a few users that helped more than everyone, so it’s impressive.

Len: I was wondering also about PHP the Right Way. Could you explain a little bit about that project? That’s been quite successful in terms of number of downloads on Leanpub.

Phil: PHP the Right Way is actually a really interesting project because to say that me and my co-author, Josh Lockhart, are co-authors is an interesting way of looking at it. Basically, we started a website called PHP the Right Way, which is a community-built set of resources, tutorials, guides, tips, advice on how to write PHP in a more modern way. If you Google search pretty much anything, like how do I upload files with PHP, one of the first things you get is some absolute piece of garbage that’s going to make your website be instantly hacked. And it’s really unfortunate that that’s the way a lot of people see PHP — because there’s all this garbage out there that’s years old, completely irrelevant, they think that is what it still is. So we decided to make this website that would be kind of a link to resource. You could just link to this section, this is how you install it, this is how you use Composer, there’s loads of information in there.

I wrote probably about 30% of it, maybe only 20%, but I’m one of the top two, three contributors on there. And Josh Lockhart did another really huge amount, but it’s very much a community built website — it’s a couple of hundred of contributors, it might be like 300 or 400. My contribution apart from writing a whole bunch of the website was that I built a tiny little PHP script that would pull in the website, which is all written in Markdown, and convert it into Leanpub Markdown or Markua. It was built in Jekyll originally, so it would take the very specific Jekyll tags and then do a little bit of find and replace and turn them into Markua, which wasn’t much of a big deal at all. But I turned that into a book and then released it on my account, just because it had to go somewhere and Josh didn’t want to do it. So now it’s up there and every now and then I rerun the script and all the updates from the website get put up on the Leanpub book version. And people have really enjoyed it. I don’t know if they want it for their Kindle or whether they like to print it out or they just wanted a version that wasn’t a big website, but people really seem to have gone for it. It’s got like 3,000 downloads or something silly, I can’t remember.

Len: You mentioned that towards the end of APIs You Won’t Hate you got an editor. On that note, when people are thinking about should I publish a book, one of the things they wonder about is marketing. Did you do any specific marketing around the book?

Phil: I’m really bad at marketing. So luckily my editor, Ashley, is also my marketing helper advisor friend. A couple of things I started to do. I have a relatively big blog, so I blog about API related things, and then if the post is tagged with API, at the bottom there’ll be a little section that says and if you like this there’s a book over there. That’s got me a couple of sales. I don’t track how many, but I saw a noticeable bump when I put it on there.

Other than that, I found that just trying to make a useful community, a useful resource out of the website — I made apisyouwonthate.com be its own website, and then people can go there and buy stuff, but I’m trying to turn that into more of a community and less of just a marketing page for a book, because that actually makes people want to link to it more. We now have a Slack group, which is something I added fairly recently, and that got about 500 people in it already just by, I sent out a little blast to the mailing list which I accrued via Leanpub, and just said, “hey everybody, if you liked the book and want to talk about stuff to do with APIs in general, come on over to our Slack group.” And that’s got a lot of people talking and a lot of people have invited their friends, and then people were like, “oh, there’s a lot of good information here, I should probably go and check out this book.” And when I see people posting really cool links to articles I can then post those from the Twitter account for the book. So it’s beneficial for everyone. People get this great place that they can talk, and that surfaces information I haven’t thought of, gives me ideas for blogs to write and for things to maybe add to the book in a later edition, and then other people get to see that and it brings them back to the book and back to the Slack group.

Len: That’s really helpful to hear, because one of our big plans for 2016 at Leanpub is to do more to help people build community around a central piece of content, especially one that can evolve. One Leanpub question I would have is, if there’s one thing we could do for you that would make Leanpub better, what is it? Something that always bugged you, or some fantasy feature?

Phil: If you’d have asked me a month ago, I would have said Bitcoin support. I was really interested in that because I felt like there was this whole world of people out there that wanted to buy books with Bitcoin and didn’t have access to PayPal and stuff. And I was like, oh, I’m missing out on so many potential sales. But I ended up hacking together something myself, and in the space of three months I’ve had two sales with Bitcoin, so it’s a complete waste of time. I really don’t think it matters based on my very rudimentary experiment there.

The one thing, coming from someone who’s very technically minded — if more of Leanpub was open source. I don’t mean anything too core to your business, but something like the Markua itself, and the systems that help turn my Markdown in this GitHub folder into the book. I have found and reported a few bugs over the last year or two, and most of them were fixed, but there have been a few things that I would have just loved to have jumped in and been like, “here’s the fix for this, here’s how you do that.” Because there’s certain things that Markdown in general will support but Leanpub Markdown won’t, and it can always be worked around, but there’s a lot of people that don’t want to have to think about the differences. When I was importing the PHP the Right Way website and converting it, I found myself changing Markdown on the Jekyll website just so that it would work in the book. So that’s one thing I would like to see more of, but I know that stuff is quite hard to open source really.

Len: Well, on that note — and I don’t want to go into too much detail about it because I’ll probably get something wrong and then Peter, my co-founder, will be mad at me — he has been working very hard on finishing up the complete spec for Markua, which is going to be published relatively soon. So the whole thing will be publicly available, and people will be free to take that and use it to build whatever they want. And Markua, while it grew out of Leanpub-Flavored Markdown, is actually a standalone thing. Markdown was written for easily writing web pages — a simplified syntax for output in HTML. Markua, the idea is that it’s for producing documents like books. When that comes out, we’re going to be really interested to know what authors like you and people in the publishing industry have to say, because no one’s done for book production what John Gruber did for HTML yet. We would say anyway.

Phil: There are a few around and people often say like, oh, you should have done it in reST or LaTeX or stuff. And I’ve worked with a lot of those and they’re just gross.

Len: That’s kind of what I’m getting at — no one’s done it in a way that worked so well, so easily, for so many people.

Phil: Yeah, it’s tough, because that’s one of the reasons I started doing it with Markdown as well. I started building it as a blog post and then I ended up taking that blog post and turning it into a book, which was a great start. But if I had had to have learned reST or some complicated system — a lot of software for these things you have to install Windows for, and I don’t want to do that. There was a lot of stuff around that seemed way over the top and really complicated. And then with Markdown, or Markua which is based on Markdown, the learning curve is nothing. You just start writing text, you know how to do links. A lot of people know how to do some Markdown, even my non-technical friends. So by not enforcing this really complex standard on them, Leanpub is just so easy to get into working with. So there’s definitely a benefit.

Len: Oh, I’m so glad to hear that, because that was one of the reasons that Peter and Scott chose to go down that route in the first place. It was a long-term bet, because changing people’s writing and publishing practices takes a very long time — a very long-term vision for whether something along the lines of Markdown would end up being used for writing books. And it looks like that is starting to happen, which is just great. Thanks a lot for chatting — it’s been a great conversation — and thanks for being a Leanpub author.

Phil: Yeah, thanks for having me on the show. It’s been fun talking to you.