The word "dude" was 19th-century slang for a dandy and was likely shortened from "doodle" as in Yankee Doodle Dandy.