Trevor Burnham

About me

Hi! 👋🏻 I’m Trevor Burnham, author of several books on JavaScript, most recently Test-Driven React (2019). Currently I’m working as a frontend engineer at HubSpot in Cambridge, MA. My areas of expertise run the gamut from UX to a11y to reliability and performance. I ❤️ making web apps better.

You can follow me on 🐦 Twitter, peruse my résumé on 👔 LinkedIn, and check out my open-source work on 🐙 GitHub.

If you have a project I might be interested in, 📬 email me.

About Test-Driven React

A great hands-on introduction to the latest technologies in front-end development.
Ludovico Fischer, author of React for Real
An amazing timesaver for those entering the world of modern JavaScript.
Stefan Turalski, BNP Paribas
An incredibly comprehensive guide to improving the testing and development workflows of React developers at any experience level.
Adam Markon, HubSpot
The spirit of test-driven development extends beyond writing tests before you write code. The goal is to set up a constructive feedback loop for yourself, to identify potential problems quickly and give yourself the freedom to explore potential improvements. Tests are only a means to that end. Sometimes, you’ll want to set tests aside and focus on other sources of feedback. The important thing is to always think ahead: before you start writing a piece of code, ask yourself what the most valuable feedback you could receive for that code would be. Then take steps to make it a reality.
Every time your eyes leave your code, you experience what’s known as a context switch. Returning to your code, it’s common to feel disoriented, even lost. A workflow that requires you to actively switch between your code and your tests will sap your ability to focus. Strive to make running your tests as automatic as breathing.
With the new code still fresh in your mind, you can experiment. Try a different approach. Use cleaner syntax. Refactor. As soon as you save, the test console will tell you if your revision is viable. With just a few extra minutes, you can almost always find a way to make your code better. More importantly, what you learn from these little ventures will make you a better coder.