Depending on which survey you happen to be looking at, candy corn is either the best or the worst Halloween candy ever created. If that proves anything, it’s that the tricolor treat is extremely polarizing. But whether you consider candy corn a confectionery abomination or the sweetest part of the spooky season, you can’t deny that it’s an integral part of the holiday—and it’s been around for nearly 150 years.

On this episode of Food History, Mental Floss’s Justin Dodd is tracing candy corn’s long, storied existence all the way back to the 1880s, when confectioner George Renninger started molding buttercream into different shapes—including corn kernels, which he tossed at actual chickens to see if it would fool them. His white-, orange-, and yellow-striped snack eventually caught the attention of Goelitz Confectionery Company (now Jelly Belly), which started mass-producing what was then sometimes called “chicken feed” rather than “candy corn.”

But what exactly is candy corn? Why do we associate it with Halloween? And will it ever disappear? Find answers to these questions and more in the video below.

For more fascinating food history and other videos, subscribe to the Mental Floss YouTube channel here.