officer in the United States Navy during the Quasi-War with France, the First Barbary War and the War of 1812 (1786–1839)