he had attended the university of shanghai and had earned a masters degree in astronomy and one in electrical engineering when he was approached to join a new crowd of people who were being given the opportunity to work outside china .