Canary in the coal mine

Pranav Tiwari
2 min readJul 28, 2024

--

Day 210 / 366

When I was at J.P. Morgan, we had a code-testing system called Canary. Whenever we pushed new code, we would wait for the Canary run to finish and confirm that our code passed all the tests and that it was safe to be merged.

The name seemed strange, cause I knew that the Canary was a type of bird, so I didn’t know how it was related to tests. It was way later while reading a book I came across the phrase “Canary in the coal mine”.

Back in the 20th century, miners used to take canaries in small cages down to the coal mines with them. Coal mines were a very dangerous to work in. They were filled with toxic gases such as Carbon Monoxide, exposure to which could be fatal for the miners. The birds thus acted as sort of a detector. If the birds became sick, it was a sign for the miners to either wear more protective equipment or get the hell out of that place.

This is why this phrase is used to signify a warning of danger or failure, which is why it is ideal for a code testing framework whose job is to detect code that can potentially break the program.

--

--

Pranav Tiwari
Pranav Tiwari

Written by Pranav Tiwari

I write about life, happiness, work, mental health, and anything else that’s bothering me

No responses yet