From my knowledge, it's derived from this little piece of doggerel: "Yankee Doodle went to town, "Riding on a donkey, "Stuck a feather in his hat, "And called it macaroni."
The word is cited at least a generation before the song.
It derives from the pre-Revolution period, when the citizens of the Thirteen Colonies were pushing themselves forward. "Macaroni" was apparently a derogatory term applied to upper class affectations.
Not precisely. It was a reference to a certain affected style of dress in fashionable young upper-class men. The "macaroni" verse, in any case, was a later addition. The earliest known version (1775) has verses:
Brother Ephraim sold his Cow
And bought him a Commission;
And then he went to Canada
To fight for the Nation; But when Ephraim he came home
He proved an arrant Coward,
He wou'd'nt fight the Frenchmen there
For fear of being devour'd.--
John W. Kennedy
"Never try to take over the international economy based on a radical feminist agenda if you're not sure your leader isn't a transvestite."
-- David Misch: "She-Spies", "While You Were Out"
