John Bardeen, 82, a two-time Nobel Prize winner who helped develop transistors, the building blocks of modern electronics, died after a heart attack yesterday in Boston. A professor emeritus of electrical engineering and physics at the University of Illinois, Dr. Bardeen won the Nobel in 1956 as co-inventor of the transistor and again in 1972 as co-developer of the theory of superconductivity at low temperatures. Electronics had relied on the bulky and inefficient vacuum tube until Dr. Bardeen and two colleagues -- Walter Brattain and William Shockley -- developed the transistor in the late 1940s at Bell Laboratories. Transistors amplify or switch electrical signals and are the core element of everything from missiles to televisions, telephones to computers. Last year, Life magazine named Dr. Bardeen one of the 100 most influential Americans of the 20th century.