Ulysses Grant graduated from West Point with the same generation of officers who later held senior command positions in both the Union and Confederate armies. Here he reminisces on how their shared experiences in the Mexican War better prepared him to know his future foes:
My experience in the Mexican war was of great advantage to me afterwards. Besides the many practical lessons it taught, the war brought nearly all the officers of the regular army together so as to make them personally acquainted. It also brought them in contact with volunteers, many of whom served in the war of the rebellion afterwards.
Then, in my particular case, I had been at West Point at about the right time to meet most of the graduates who were of a suitable age at the breaking out of the rebellion to be trusted with large commands. Graduating in 1843, I was at the military academy from one to four years with all cadets who graduated between 1840 and 1846—seven classes. These classes embraced more than fifty officers who afterwards became generals on one side or the other in the rebellion, many of them holding high commands.
All the older officers, who became conspicuous in the rebellion, I had also served with and known in Mexico: Lee, J. E. Johnston, A. S. Johnston, Holmes, Hebert and a number of others on the Confederate side; McCall, Mansfield, Phil. Kearney and others on the National side. The acquaintance thus formed was of immense service to me in the war of the rebellion—I mean what I learned of the characters of those to whom I was afterwards opposed.
I do not pretend to say that all movements, or even many of them, were made with special reference to the characteristics of the commander against whom they were directed. But my appreciation of my enemies was certainly affected by this knowledge. The natural disposition of most people is to clothe a commander of a large army whom they do not know, with almost superhuman abilities. A large part of the National army, for instance, and most of the press of the country, clothed General Lee with just such qualities, but I had known him personally, and knew that he was mortal; and it was just as well that I felt this.
Ulysses S. Grant, Personal Memoirs of Ulysses S. Grant, 2 vols. (Kindle ed.), KL 1744 – 1757