This post originally appeared in the Week.

For some time now, we have known the basic outline of the story of “dude.” The word was first used in the late 1800s as a term of mockery for young men who were overly concerned with keeping up with the latest fashions. It later came to stand for clueless city folk (who go to dude ranches) before it morphed into our all-purpose laid-back label for a guy. What we didn’t know was why the word dude was chosen in the first place.

Now, we finally have the answer. Allan Metcalf (who wrote the book on “OK”) reports in The Chronicle of Higher Education that a massive, decade-long “dude” research project has finally yielded convincing results.

The project belongs to Barry Popik and Gerald Cohen, described by Metcalf as “Googlers before there was Google.” Along with the help of other colleagues, they have been combing through 19th century periodicals for years, slowly amassing the world’s biggest collection of dude citations. The latest issue of Cohen’s journal, Comments on Etymology, lays out, in 129 pages, the most solidly supported account yet of the early days of dude.

So where does dude come from? Evidence points to “doodle,” as in “Yankee Doodle Dandy.” He’s the fellow who, as the song has it, “stuck a feather in his cap and called it macaroni.” “Macaroni” became a term for a dandy in the 18th century after young British men returned from their adventures on the European continent sporting exaggerated high-fashion clothes and mannerisms (along with a taste for an exotic Italian dish called “macaroni”). The best a rough, uncultured colonist could do if he wanted to imitate them was stick a feather in his cap.

“For some reason,” Metcalf says, “early in 1883, this inspired someone to call foppish young men of New York City ‘doods,’ with the alternate spelling ‘dudes’ soon becoming the norm.” Some of the early mocking descriptions of these dudes seem awfully familiar today: “A weak mustache, a cigarette, a thirteen button vest/A curled rim hat — a minaret — two watch chains cross the breast.” Yep, sounds like a hipster. But that word has gotten so stale. We should all go back to “dood,” or maybe even “doodle.”

More from the Week:

A brief history of African click words

The least popular American baby names (from 1880 to 1932)

How many spaces should there be at the end of a sentence?