I Wrote A Paperback Book With Code






Book Pages

Stop putting authors on pedestals

This book was written with a thesis, It's not that hard to write a book. We should stop putting authors on pedestals just because they have published a book - they should have to earn it.

Self-Imposing ridiculous constraints

As always we have two constraints, time and money which often interchangeable. Because this is a side project I have a severe lack of both. I decided my constraints were to write and publish a book in 20 hours or less, spending no more than $50.

Life Pro Tips: An Addendum To Life. Book Promo

Skip or automate as much as possible

With what seems like an impossibly large task, you must break it down into smaller problems. Then, my next and favorite step is to remove everything in the way so you can to reach the final goal. This approach works very well with building software prototypes, which I have built many, so I decided to apply it to the book. Automation is a life saver, being a software developer helps a lot.

Deconstructing an author

I broke down authoring in smaller tasks, activities an author would need to do to sell a book. Then I tried to skip or automate everything:

  • Inspiration/ideation I would need to think of an initial topic, but I could automate collection or formatting the data to write about.
  • Writing I could automate some of this, but I needed to produce something original to have the copyrights, which likely meant a human touch.
  • Reviewing I would skip - A spell checker is good enough.
  • Publishing/Printing I would automate with Amazon, I hear they're good with books.
  • Distributing only on e-commerce. I don't have money to invest in printing thousands of books and I don't want to spend time pitching for investment.

Scraping Reddit for inspiration

For ideation, I used the Life Pro Tips subreddit. Convenient, Reddit has an API that returns posts in JSON format. I created a Rails 5 app to help me scrape and manipulate the data. Rails was definitely overkill for what I needed, but I wanted to do a project with the latest Rails 5 release, so this seemed like a good opportunity.

I created a rake task that would scrape the top posts of a subreddit. While doing this I noticed that subreddits have flair, which is similar to a category. The categories included, Careers & Work, Travelling, School & College, Social, etc. perfect to make chapters of in the book.

I ended up with ~900 posts in my database of the top posts in the Life Pro Tips subreddit. Inspiration is go.

Life Pro Tips: An Addendum To Life. Book Promo

Writing to avoid copyright

Ideally I would have just taken the top Life Pro Tips from Reddit, downloaded it as PDF and uploaded it to Amazon, however, there was one glaring issue: Copyright. According to Reddit's Terms of Use, the poster of the content owns the copyright to their post, and gives Reddit the opportunity to distribute it. This is reasonable, however I don't have time to ask every user for use and I don't want to infringe on anyone's copyright, so I couldn't use the actual posts, I would have to actually write my own.

When cleverness fails, Grind

My initial thought was to use a paraphrasing API to consume the posts and return an original work. Unfortunately the posts were mangled and some didn't have the opportunity to use synonyms etc. so I took the hard path. I grinded out reading each post, choosing my favorites and making sure to put them in my own words. This part of the project took longer than expected but at least I would avoid any copyright issues.


Initially I was going to use CreateSpace to publish my book, however, it turned out to be more work than Kindle Direct Publishing. Both use Amazon for distribution however, KDP was easier to use. The biggest downside is that KDP doesn't allow for purchase from Amazon.ca.

In terms of paperwork and taxes, I decided to use my person instead of my freelancing company for convenience even though I'll pay more in taxes.

Uploading was very simple, KDP has a clear specification on their website for cover artwork and formatting. I tried using HTML/CSS for my formating but ended up using Google Docs for flexibility and exporting to PDF. My inspiration for the cover was from Cards Against Humanity, a simple modern theme which I applied throughout the book.


  • Didn't take the extra time to publish through CreateSpace to be able to distribute through Amazon.ca. Most of my network is in Canada so this would have been useful.
  • Didn't print my name anywhere in the book, you can find it through ISBN though.
  • Sales goal. I have yet to commit to a sales goal for the book, I was more entirely focused on its creation.

Check Out The Book On Amazon

In case you have your ad blocker on and can't see the link, here's the direct link to the book on Amazon!

Zach Levy

Entrepreneur and Developer in Toronto, Canada

Want to find out about my latest blog posts?

I send out an email every few months with what I'm up to.