The PHP Spellbook

The PHP Spellbook

Practical Charms for Data Structures & Algorithms

About the Book

My oldest daughter, who started middle school this year, came to me recently with some questions about some extra schoolwork she got. She got to choose a few additional classes and she chose some heavy computer science classes. Her questions concerned data structures, algorithms, and general logic.

I started writing down some things for her, and before I knew it, I had some substantial writing completed. I also noticed that I have been really enjoying writing about these topics for her, so I have decided to keep writing her these and package them together in a cohesive book project (don't worry if you're concerned about it being a "children's book": she's brilliant for her age and has no problem keeping up with some of the more advanced topics, notation and math).

The book aims to be a light-hearted, down-to-earth discussion around algorithms and data types for all PHP developers. While it does not shy away from challenging topics, it works hard to keep things friendly and approachable, regardless of current skill level.

Inside the book, you'll find:

  • An introduction to Big O notation, time complexities (and how to spot them), recursion, and sometimes even the math behind things,
  • Discussions and analysis of well-known (and some lesser-known) algorithms,
  • Practical examples and applications of data types and algorithms,
  • Fun tangents, side quests, and more!

I'm working in the background to make this project approachable and helpful. If this all interests you, sign up to get notified when I have an initial version available! I'm looking to have the initial version available here around March/April.

In the meantime, happy coding!

About the Author

Johnathon Koster
Johnathon Koster

Hello, internet!

My name is John, and I have over fifteen years of professional software development. I've worked on a wide range of projects over the years, from simple websites and critical government reporting applications all the way to high-performance telematics solutions.

During my downtime, I enjoy working on open-source projects, writing posts on my blog, and contributing to the Laravel and Statamic ecosystems.

Some of the recent open-source projects I've worked on include:

  • blade-parser-typescript - a Laravel Blade parser, formatter, reflection library, and linter, written in TypeScript
  • Antlers Toolbox - a Visual Studio Code extension providing syntax highlighting, code auto-complete, intelligent refactoring, and project-aware assistance for Statamic developers
  • Antlers Runtime - an advanced PHP templating engine for the Statamic CMS platform
  • Proteus - a Laravel package that makes it simple to read, write, and modify Laravel configuration files from your application code
  • Primitives - a PHP library that safely parses input strings into native PHP types (string, bool, arrays, etc.) and can optionally be configured with a sandbox for method evaluation

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub