Publishing Books
And using LLMs to help
I recently posted this image to social media with a caption saying I had received proof copies of “real” books. I got some mild pushback from people wondering if they counted as real books if they had a large amount of AI input.
I hope it’s obvious that I meant “real books” as opposed to ebooks - which is what I’ve mostly been publishing over the last decade. But the conversation got me wondering about what people consider an appropriate level of AI assistance when publishing books. Everyone draws the line at different points, of course. Let me explain where I draw it. Actually, as you’ll see, I think it can be drawn at different points for different projects.
The first thing to consider is the content of the book. There are a number of ways you could use an LLM to help create the actual text and images inside the book.
You could brainstorm the subject with the LLM and use it to come up with a list of subjects you need to cover. The equivalent for a novel would be using the LLM to sketch out the skeleton of the plot.
You could use the LLM to actually produce the text that makes up the book. And, having done that, you could make various levels of manual edits in order to give the text something that is closer to your voice.
Or you could do the opposite. You could write the text yourself and then ask the LLM to proofread it, to ensure that your grammar was accurate and your prose makes sense.
Then there’s graphics. You could use an LLM to create images to illustrate your book. Or to produce the cover.
Let’s look at the three books in the photo.
On the left, we have What to Ask Your Website Company. I’m hoping this is going to become something that introduces me to potential clients. The idea is that it helps small businesses work through the process of working with a web design company to get a website that they’re happy with. It contains checklists of questions that they should ask to avoid the kind of cowboy companies that I’m sure we’ve all come across. And there’s an offer that, if the book isn’t enough, they can engage me to manage the project for them. For this, I knew the kinds of things that I needed to cover, but I was happy to brainstorm the concept with ChatGPT to ensure that I had everything covered. It’s also a very visual book. It contains about a dozen images that were generated for me by Midjourney. As was the cover.
In the middle, we have Reimagining Diana. This is based on an experiment I carried out last year. I wanted to know if ChatGPT was capable of following a thread for long enough to create a novel. It turned out that it wasn’t. So we tried again by asking it to map out the plot first and then writing the novel a chapter at a time, sticking closely to the plot outline. This second attempt was rather more successful, and it’s that version that has ended up on Amazon. The cover was generated using ChatGPT. I suspect this is the book that will have the highest proportion of you thinking I’ve gone too far down the AI route.
Then, on the right, we have Design Patterns in Modern Perl - the latest book from Perl School Publishing. This isn’t written by me; it’s by Mohammad Sajid Anwar. And, to be honest, I don’t know how much use he made of AI while writing it (I strongly suspect none). Maybe I should ask the Perl School authors to declare that. But, honestly, if we get good books, I’m not sure how much I care. Oh, if you look carefully at the cover of this book, you’ll see there’s a light green pattern traced out. Mohammad sent me that, and I think he said he had asked ChatGPT to generate that for him. The rest of the cover (the layout of the text and the logo) is all down to my own meagre design skills. It’s pretty much the same layout that I’ve been using since long before any of us had heard about LLMs.
Another example. I’m (still!) working on the second edition of Data Munging with Perl. For various reasons, I’ve been working on it in a very disjointed fashion, which means I sometimes forget what I’ve done and what is left. The last time I returned to it, I generated a PDF from the most up-to-date version I had, handed that to Claude and asked it what still needed to be done to update the book to modern Perl - and it gave me a to-do list. I’m not going to ask the LLM to write any of the updates, but it’s steering how I work on the book. Oh, and yes, I got ChatGPT to draw the robot on the new cover.
So, the Data Munging example shows that LLMs can be useful, even if you’re not using them to actually create the content. They can be useful for planning your work. But the books in the photo are the result of another use I’ve recently found for an LLM in the publication process.
Claude Cowork makes a cracking publisher’s assistant.
Until now, most of the books I’ve published have been ebooks. That’s for a number of reasons (that we’ll get into below), but one of the most important is that it’s far easier to format a manuscript for an ebook. Grab any book from your bookshelf and browse through the bits at the start of the book. That’s called the “front matter”. It’s the bits that come before the book really starts. You’ll find a half-title page (that just contains the title), a title page (containing the title and the author’s name), a copyright page (including all sorts of obscure publication details), a table of contents and, perhaps, a dedication.
Of course, you don’t need to have all of those pages. But if you want people to think they’ve got a “real book” in their hands, then those extra pages all signal that this book has gone through a proper publication process.
Then there are the pages that make up the content of the book. The sections and chapters. The chapters all start on a right-hand page (called “recto” in publishing parlance). Odd- and even-numbered pages have different headers - book title on the even-numbered (“verso”) pages and chapter title on the odd-numbered (“recto”) pages. And the header might be skipped on the first page of a chapter. The page numbers go in the footer - but they’re left-justified on verso pages and right-justified on recto pages.
Again, this isn’t all essential. But it all makes the book look more professional. We’ve been trained to expect books to be formatted that way. If you have a book that you’ve always thought looked a bit off, then take a closer look. I’ll bet it’s missing one or more of the features I’ve just mentioned.
And getting all of that right is not trivial. It takes a lot of trial and error. But that’s where Claude Cowork comes in (I bet other LLMs can do this too). It was Claude who explained all of these requirements to me. And it was Claude who, within a couple of hours of work, had taken Mohammad’s Markdown files and turned them into a PDF that I could upload directly to Amazon’s Kindle Direct Publishing (KDP) system. Honestly, I think it saved me a week of work. And, because I’m a developer (and Claude knows that), it gave me a shell script that can regenerate both the ebook version and the paperback print-ready PDF. Which is, of course, now wired into a GitHub Action that fires whenever the input files change.
And the books look great. Feel free to buy one and have a closer look.
Last minute update: Before I move on from this subject (and onto another, closely related one), I just wanted to point out that I’ve been making some real progress on the second edition of Data Munging with Perl over the last week. I know it has taken rather longer than I originally promised, but you can buy the “work in progress” version from LeanPub and I hope to have the finished version available in a couple of months. I’ve even relaunched the book’s web site at datamungingwithperl.com.
Why publish paperbacks?
You might be wondering why I’m suddenly publishing loads of paperbacks. When I was interviewed by brian d foy about Perl School for Perl.com in 2020, I was pretty adamant that Perl School was an ebook-only publishing house. What has changed? A few things.
Firstly, and most importantly, ebooks haven’t changed the world in quite the way I thought they would. While I’ve been pretty much ebook-only for over a decade, I seem to be a bit of an anomaly. There are still plenty of people (the majority, I think) who want paper books that they can put on their shelves. To be fair to myself, I never thought ebooks would take over in the popular fiction category, but I expected that technical books would be one area where they would quickly become dominant. I was wrong. What has actually happened is that the technical books industry has become a shadow of its former self as people turn to websites and videos instead of books that are often out of date before they hit the bookshop shelves.
Secondly, I don’t often get to talk face-to-face with Perl School customers, but on the few occasions that has happened over the last five or six years, someone has always specifically asked for a paperback edition of one of the books. Sometimes it’s because they just like physical books, but, often, it’s because they find physical books easier to read for some reason. I want Perl School books to be as accessible as possible, so I’ve known for a while that I needed to look into this at some point.
Thirdly, the economics have changed. In that Perl.com interview, I talked about how it was easy for Perl School to publish an ebook, without all the upfront costs of a traditional publisher. Well, that has pretty much become true for paperbacks too. Amazon’s KDP system now has an interface with an international print-on-demand service - and that’s what I use to print the paperbacks. It’s just a case of uploading a print-ready PDF of the manuscript (and remember what I wrote above about Claude making that incredibly easy).
And, finally, there’s Mohammad. Mohammad is the author of Design Patterns in Modern Perl (as seen above). We published the ebook edition back in November 2025, but I always got the impression that he wouldn’t consider himself a “real” author until he held a physical copy in his hand. So, soon after the ebook was released, I promised him a paperback copy “in a few months”. Which is why I made the effort to get it out a couple of months ago. And, honestly, he seems far more excited about the paperback than he did when the book was originally published for the first time. He has certainly told more people about it this time - even building a website about it.
All in all, I feel I’ve learned a valuable marketing lesson here - “you are not your customers”. I was sure that Perl School’s target audience would want ebooks because they were all like me - and I wanted ebooks. It turns out that’s not true, and the only way to find out what your customers want is to actually ask them. What a radical idea!
So there will almost certainly be more Perl School paperbacks in the future. I certainly want a paperback edition of Data Munging with Perl. And I might well revisit some of the older books too. Have I mentioned I’m also setting up a wider technical publishing house called Clapham Technical Press? That’s how my book, GitHub Actions Essentials was published. Maybe some of those books need to be paperbacks too.
And maybe this time next year we’ll all be millionaires.
Some blog posts
Usually, I like to include links to a few blog posts that I’ve written since the last newsletter. But because it’s been six(!) months this time, there have been quite a few of them. Here is a selection:
The one about MCPs is going to be turned into an online presentation for Perl Maven in October. Registration is already open.
The two on “CGI to Containers” and “Database Abstraction” form a matching pair about how the recent history of programming is largely a story of moving our abstractions to higher and higher levels. I’m considering using them as the basis of a talk at the London Perl Workshop this year.
But, of course, what’s more interesting is other people’s blog posts. Here are a few that I particularly enjoyed:
I Went on Maternity Leave and Came Back to a World of Vibe Coding
Irina was a colleague many years ago. This post amused me, but also had me wondering how many other women had got back to work after maternity leave to find the industry had completely changed while they were awayEight years of wanting, three months of building with AI
An interesting example of how AI-aided coding can be a force for good. I have so many new little tools that I would never have got round to writing if I had had to do it all myselfHighlights from my conversation about agentic engineering on Lenny’s Podcast
Sometimes when the speed of change in the industry gets too much for me, I just go looking for Simon Willison’s most recent blog post that includes some kind of summary that he’s been asked to present. It always helpsI got a private lesson on Claude Cowork & Claude Code
How Boris Cherny, the inventor of Claude Code, uses his inventionLearn How to Write Production-Quality Code with AI
Curtis Poe is an old friend from the Perl community and one of the few people who seems to be working hard to port the “engineering” part of Software Engineering to AI-aided coding
Something completely different
All work and no play and all that…
I’ve mentioned Oneirina, my AI music project, previously. I continue to work on her music in my spare time. She now has a website (oneirina.com) that I’m pretty pleased with. I’ve also started making videos for her songs - so she has a YouTube channel too.
And songs from her debut album are starting to be released on Spotify.
That’s all for now. Tomorrow, I’m off to the Edinburgh Fringe Festival for a few days. But I’ll be back with another newsletter in (hopefully) a few weeks.
Cheers,
Dave…

