Share this project

Done

Share this project

Done
#{project_title}'s video poster

A short but helpful guide to effectively testing and benchmarking JavaScript performance using jsPerf.com and Benchmark.js. Read more

Austin, TX Nonfiction
Share this project
184
backers
$3,062
pledged of $5,000 goal
0
seconds to go

Funding Unsuccessful

This project's funding goal was not reached on February 26, 2013.

A short but helpful guide to effectively testing and benchmarking JavaScript performance using jsPerf.com and Benchmark.js.

Austin, TX Nonfiction
Share this project

About this project

NOTE: International and wanting a printed book shipped to you? See the FAQ down below! :)

I am humbly asking for your support in writing a book called "The jsPerf Guide". Your generous donations will help me write and deliver the book in a timely fashion, as well as keep it updated in the future.

Why for?

It's no secret that how you write your JavaScript code will likely affect (sometimes significantly!) how it performs. Unfortunately, it's far too common that how we make those decisions is based on "cult wisdom" or anecdotal evidence, at best.

As if lack of information didn't make it hard enough to get it right, the makers of the JS engines are constantly improving and optimizing how the engine works. So, what was faster in your code last week may not be faster anymore. Good luck keeping up with that!

No surprise then that jsPerf.com received such high praise when it launched. The site allows you to easily (almost too much so! -- more on that below) create head-to-head tests of different code approaches, then "crowd-source" distribute the testing across a wide variety of browsers and devices, to find which approach is indeed faster.

One of the most useful results from such a test is to see how a particular approach may work fine and similar in most browsers but have a major downside in performance in a particular browser/device scenario. That kind of information was previously almost impossible to reliably gather.

So...a book?

Why on earth do I need to write a book about jsPerf.com, then? Should be pretty simple and self-explanatory, right?

Turns out that with much power comes much responsibility. The site is so powerful and so easy, that it's too easy to set up bogus and invalid tests which give you, often quite convincingly, totally wrong conclusions.

You've heard of GIGO (garbage-in-garbage-out), right? Same goes with this site. Set up a garbage test (on purpose or by accident), you'll get garbage results. That's not so terrible, except that some unsuspecting dev will find your test results 6 months from now, and won't realize the mistake, and the misleading will continue to propagate.

The most important point of this book is to dive deep into what it takes to actually create valid, useful, effective head-to-head performance tests. This won't just be academic minutia, but we'll go over a whole bunch of tests already in jsPerf.com and examine common patterns for how people are creating good tests and how others are really bad.

Besides learning how to use jsPerf.com effectively, we're going to actually look at how jsPerf works, with the underlying Benchmark.js library. This library is phenomenally detailed in its statistically-sound approach to accurately testing even the slimmest of performance differences in tests.

But it's a little known jewel that this library can be used outside of the site, and that will be the second half of the book. We'll look at how you can use Benchmark.js in your own build processes (via node.js or other server-side JS environments) to setup and run automated performance regression tests for critical pieces of your code. Never again get surprised when a code-push to production shows a 10% drop in customer conversions because of a slow site!

OK...the plan?

The book will include a brief history of how jsPerf.com and Benchmark.js were built and evolved, as well as a Q&A "interview" with the respective authors. Expect plenty of coverage of all your favorite "wtfjs" moments!

Then we'll cover in-depth how to write tests that get the results you want and need, avoiding the dreaded bogus-test fairy.

We'll then talk about how to integrate Benchmark.js into our processes so we can automatically test code performance just like we lint it for code quality.

That's useful for a quick, short guide book, right? You're sure to learn some new things about performance optimizations in JavaScript.

"Fine Print"

If this project is fully funded, I will write the book, and O'Reilly has agreed to publish it and take care of all digital and physical fulfillment of the books. If it's not funded, I guess I'll probably cry in the corner for a few days, then I'll move on to another book project. But let's not test that outcome, OK? Let's fund this baby!

The book is planned to be about 50 pages in length, and will be primarily published in ebook format. However, if you're keen for a print copy of the book, donating here on Kickstarter is your best chance to get one hot off the O'Reilly presses.

Neither the author/maintainer of jsPerf.com nor Benchmark.js wish to consider this book an "official" endorsed project, but they're both happy and excited to see the book written! All opinions expressed in the book (with the exception of the Q&A quotes, which will be properly attributed) will be solely mine, and will not reflect the opinions of jsPerf.com, Benchmark.js or its authors or maintainers.

The "jsPerf"-printed USB sticks are planned to be promotional-gift grade 1GB swivel-type USB drives with the jsPerf name custom printed on them. The point is so you can show your jsPerf pride, not have a super mega awesome USB stick, which we all already own ourselves.

The reward levels which include consultation sessions will be fulfilled entirely by Kyle Simpson through Getify Solutions, Inc, and are neither affiliated with, warrantied by, nor endorsed by O'Reilly, jsPerf, or Benchmark.js.

Remote consultations will be provided via standard online conferencing (Skype, etc). On-site consultations will be provided at the location of your choosing, solely at my cost. All scheduling for consultation sessions are subject to availability.

Excess Proceeds (Hopefully!)

All excess proceeds above the funding goal will be used in the following way:

  • 50% of the excess proceeds will help future updates of this book and then be rolled into the next book project I do (coming soon)!
  • The rest will be used for awesome. More on that later.

Who am I?

Want to know more about me? http://getify.me lists everything there could possibly be about me online. I've written 2 books for O'Reilly (HTML5 Cookbook and JavaScript and HTML5 Now) so far. I run a number of open-source projects on my github account. I also speak at web tech conferences all over.

Risks and challenges

The biggest risk/challenge is the time it takes to write such a book. I've set the funding of this project to cover enough of my time (instead of doing paid consulting work) that I should be able to write it straight through in a pretty short period of time. :)

Learn about accountability on Kickstarter

FAQ

  • The standard reward levels include shipping to the US. If you'd like something shipped elsewhere, I'm sure we can work that out, just chip in at least $5 more than the selected reward level.

    Last updated:
  • Will I travel internationally for the reward levels that involve consulting? Sure. The reward levels include enough that I can cover domestic travel costs, but international costs are obviously a bit higher, so we'll have to work out covering those extra costs. Also, we'll have to make sure that a pink gorilla suit can make it through customs. :)

    Last updated:

Rewards

  • You selected
    $1 reward

    2 backers

    Awesomeness Backer: Your name will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
  • You selected
    $4 reward

    111 backers

    Ebook Backer: get 1 ebook copy of the book, plus updates forever. Also, your name will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
  • You selected
    $10 reward

    31 backers

    Paper Backer: get 1 printed copy of the book. Also, your name will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $20 reward

    28 backers

    Dual Backer: get 1 printed copy of the book, and 3 ebook copies/licenses. Also, your name will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $40 reward

    2 backers Limited (13 left of 15)

    USB Backer: get 10 ebook licenses/copies of the book pre-loaded onto a "jsPerf"-printed 1GB USB stick. Show off your jsPerf pride with this USB stick! Also, your name will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $50 reward

    3 backers Limited (7 left of 10)

    Paper+USB Backer: get 1 printed copy of the book, and get 10 ebook licenses/copies pre-loaded onto a "jsPerf"-printed 1GB USB stick. Show off your jsPerf pride with this USB stick! Also, your name will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $70 reward

    1 backer Limited (9 left of 10)

    Multi-Backer: get 5 printed copies of the book, and 10 ebook copies/licenses. Also, your name will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $90 reward

    2 backers Limited (8 left of 10)

    Team Backer: get 10 printed copies of the book. Also, your name (or your business/team) will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $150 reward

    0 backers

    Ebook-apalooza Backer: Get as many ebook copies/licenses as you have developers on your team or at your company (must be able to verify numbers).

    Estimated delivery:
  • You selected
    $500 reward

    0 backers Limited (10 left of 10)

    Get Serious Backer: get 5 printed copies of the book, plus a 2-hour virtual/online consultation session to address any JavaScript performance questions you may have. Also, your name (or your business/team) will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $750 reward

    0 backers Limited (5 left of 5)

    Workshop Backer: get 5 printed copies of the book, plus get 3 free tickets to use at any public workshop I ever teach, your choice. (I have several already scheduled, in Denver, Austin, and Atlanta, more TBA). Also, your name (or your business/team) will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $1,000 reward

    0 backers Limited (5 left of 5)

    Performance Enhancing Backer: get 10 printed copies of the book, plus a 4-hour virtual/online consultation session to address any JavaScript performance questions you may have. Also, your name (or your business/team) will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $3,000 reward

    0 backers Limited (3 left of 3)

    Uber Performance Guru: get 10 printed copies of the book, plus a full-day on-site (you choose the location, I cover the expenses -- must be in the continental US!) consultation session to address any JavaScript performance questions you may have. Also, your name (or your business/team) will be listed in the thank-you's of the book (if you choose).

    Estimated delivery:
    Only ships to: United States
  • You selected
    $10,000 reward

    0 backers Limited (1 left of 1)

    Pink Gorilla: I'll show up (I cover the costs -- must be in the continental US!) and teach up to 5 consecutive days of JavaScript, performance, and HTML5 to your team, on whatever topics you'd like. And yes, I'll wear a pink gorilla suit to the training if you'd like. Oh, and I'll add an addendum to the book that talks about your company/project/team to thank you! You can have as many copies (print or ebook) of the book as you have developers on your team. You can also have 1 free copy each of any future book I ever write. :)

    Estimated delivery:
    Only ships to: United States

Funding period

- (21 days)