shortly after the second world war , in the now famous bell laboratories in new jersey , the american physicists john bardeen , walter brattain , and william shockley invented the transistor , an electronic device used to control or amplify an electrical currentpretty much what the triode did .