John Ostrom was born in New York City and grew up in Schenectady , N.Y. As an undergraduate at Union College there , he prepared himself for medical school , but an elective course in geology changed his life .