HubSpot Engineering

Latest posts

Writing lately

Bulletproof Demos

We all like to build software which is reliable, but every once in a while it seems like a good idea to demo something still in its unreliable infancy. Google Chrome has a little known feature which can help.

Record modes let you record every request Chrome makes. Playback mode serves requests out of that recorded cache just as if they were being loaded on the spot. It doesn't record where you click or what you open, just every request as it moves over the wire.

These instructions are tuned for OS X, but can be adapted to any operating system.

1. Start by closing Chrome (after copying down these instructions!)
2. Open a Terminal (Cmd+Space then type "Terminal")
3. Type open -a "Google Chrome" --args --record-mode and hit enter.
4. Run through your demo, and close Chrome, returning to the terminal.
5. Type open -a "Google Chrome" --args --playback-mode and hit enter.
6. Everything will be served out of the recorded cache, even if your servers have exploded, a bug has been deployed, or the conference wifi has dropped out.

Thanks to commenter Michael Kenniston we have these commands for Ubuntu (and most other Linux):

google-chrome --record-mode

google-chrome --playback-mode

As with the OS X instructions, remember to close Chrome before beginning and between steps.

Commenter Kristian J. has provided these instructions for Windows:

Press Win+R to open the run dialog, enter chrome --record-mode for record mode and chrome --playback-mode for playback.

Newsletter

For Agents

View Markdown

Share

More posts

Automated Code Review: The 6-Month Evolution

Discover the evolution of HubSpot's Sidekick automated code review system and its impact on developer efficiency.

Cloud Coding Agents at HubSpot

Discover how HubSpot engineers use cloud coding agents like Claude Code to transform software development with AI, from planning to implementation to code review.

Moving Mountains: How We Migrated from Enzyme to React Testing Library

How we migrated 76,000 tests from Enzyme to React Testing Library, modernizing our stack and allowing teams to ship changes with more confidence.