A Vietnamese student who taught himself to code after years spent taking computer keyboards apart and rebuilding them has won admission to Stanford University, the most selective university in Silicon Valley.