Build Your Own Spreadsheet

Look behind the curtain and learn how one of the most used tools in the world works.

And learn more about test-driven development in the process!

Image of the book cover

Build Your Own Spreadsheet is a text-based pairing session that takes you from design mockups to a fully functioning spreadsheet that supports formulas! It shows a practical example of test-driven development with TypeScript and React.

In the book you'll pair up with me, Christoph, and together we'll discuss several aspects of the test-driven development cycle. We come across trade-offs, refactorings and how to deal with tensions of new requirements that break expectations of older tests. We also discuss when it's good to stick to the process of writing tests first and when other techniques can be more helpful.

Available in PDF (ePub and mobi are coming).

Clicking the button above will open a popup. Purchases go through Gumroad, but you don't need an account there.

Powered by Buttondown.

Not sure yet?

Please download and read the example chapters to get a sense of what the rest of the book is like. The example chapters cover the initial project setup and the first three tests of the spreadsheet that is built throughout the book.

What's Inside

Have you read about test-driven development and are now wondering how to write anything real with it?

Or maybe you're experienced with it already but now getting into React and want to learn more about approaches and tools to test-drive a non-trivial React component.

Fear not, Build Your Own Spreadsheet has you covered either way!

This is the full table of contents:

Table of contents page 1 of 2 Table of contents page 2 of 2

The spreadsheet in the book is going to be built with TypeScript and React. For testing we'll use Jest as our test runner and React Testing Library for the React specific testing.

After the main spreadsheet component is built, the book continues to test-drive spreadsheet formulas. All the way from the lexical analysis of user input, to parsing it and interpreting formulas like =A3 * 42. Basic arithmetic is supported (including operator precedence) and you can also reference other cell values!

You can try it yourself below, where the final version of the spreadsheet is available!

What is Required?

In order to get the most out of the book, a basic level of JavaScript and React is helpful. Not required, but knowing React, JSX and core hooks like useState will be used without a longer explanation of how they work. But even when you're at the beginning of your React journey, I think from the context of how we're building the component, you'll be able to follow along. If you're unsure, please check the example chapters you can download.

What we're Building

This is the final component that we're building in the book. Go ahead and double click a cell to change its value and see what it does!

Supported Features include:

  • Displaying tabular data.
  • Highlighting of the currently selected cell.
  • Double clicking of a cell to edit its content.
  • Basic keyboard support to confirm or cancel editing(Enter/Escape key).
  • Formulas containing arithmetic (+,-,*,/).
  • Formulas that concatenate strings (&).

About the Author

Image of the author, Christoph

Hi, I'm Christoph!
This picture of me was taken at a Global Day of Coderetreat some time ago, but as you can see, we can't escape Spreadsheets. They're everywhere!

Since an early age I've been curious about how stuff works. I loved disassembling and reassembling things like my bicyle as a kid and slowly progressing further to other appliances like telephones and radios. Often times, however, the reassembling part came with mixed results of success I have to admit. But that didn't stop my curiosity.

When I started to learn more about computers (and eventually programming) I was amazed by how flexible and powerful spreadsheets can be.

Fast forward a couple of years and I thought I could share my curiosity about spreadsheets by helping explain some core concepts in the form of a book.

If you're still unsure whether this is for you, please check out the example chapters you can download for free.

I hope you enjoy it,

Handwritten name Christoph

Frequently Asked Questions

I bought the book, but what happens when there's an update? How do I get access to the latest version of the book and its source code?
First of all, thank for purchasing! Every update I provide to the book will be available free of charge. You can always find the latest download content in your Gumroad library. Alternatively, if you don't have an account with Gumroad, you can continue to use the “Download the Book” link you received in the confirmation email of your purchase. Additionally I will also send an email to all customers when there's been an update to the content. If all else fails, please reach out to me via email.
There's only the option to download a PDF file. What about ePub, Kindle or something else?
I focused on only the PDF format to start with. Now that the book is released I am working on the ePub version of it and Kindle will be the next format after that. You will receive an email for new formats if you've purchased the book already and any new format will be available to you free of charge.
£15+ is a lot from where I come from. What about purchasing power parity (PPP)?
That is totally understandable and I am committed to provide discounts for this. I use ParityDeals to automate the handling of voucher codes. When you visit from a country that is eligible for a discount you'll automatically see a banner appear at the top of this page providing you with the necessary code to be used during checkout. In case you run into problems with that, please don't hesitate to reach out to me via email or Twitter.
I don't like the book. It's not what I was expecting and I'd like a refund.
I'm sorry to hear that! But I respect it. Please get in touch with me via email and I'll issue a refund. No questions asked.