Yankee Doodle went to town...Mm-hm, yeah.

Riding on a pony...Ok.

Stuck a feather in his cap and called it macaroni...Wait. What?

What’s going on here? Why would Yankee Doodle do something like that? What’s macaroni got to do with anything?

The first bit of context you need in order to understand the sense of this line is that the song “Yankee Doodle” was not always the proud, patriotic ditty we know today. It was originally sung by British soldiers in mockery of the rough, unsophisticated, American colonials they had to fight alongside during the French and Indian War. The thrust of it was “look at these ridiculous yokels!”

The second bit of context has to do with what was going on back in England at the time. It had become a rite of passage in the 18th century for young British men of means to spend some time on the European continent doing the Grand Tour, absorbing art, history, and language and becoming all-around cultured and sophisticated. When they returned, they brought back outlandish high-fashion clothes and mannerisms, and a taste for exotic Italian dishes like macaroni. As a group they were numerous and noticeable enough to get their own nickname. They were "macaroni."

Yankee Doodle, bumbling bumpkin that he was, tried his best to imitate the latest style, but only embarrassed himself in the attempt. Thinking himself a fashionable dandy, he stuck a feather in his cap and somehow thought that was macaroni. That was so something a doodle (meaning fool or simpleton) dandy would do.

It turned out the rustic, ragtag Americans weren’t much insulted by this and started singing the song themselves. It had a catchy tune, and they were never out to win any best-dressed awards anyway.

Not only did "Yankee Doodle" end up a staple of the American patriotic songbook, it gave us one of our most useful words, dude, which originally meant dandy and was formed off of doodle. So like, yeah, feather, macaroni, call it what you want, dude. Yankee Doodle's cool with it.