BASIC: a programming language for all designed by Einstein's Hungarian research assistant

April 25. 2025. – 06:30 AM

updated

BASIC: a programming language for all designed by Einstein's Hungarian research assistant
János Kemény investigating the 1979 Three Mile Island nuclear power plant accident – Photo by Bettmann / Getty Images

Copy

Copied to clipboard

"In the years to come many voices will speak to you — voices that will clamor for your attention to tell you what it is that you should do with your life. Among these voices will be one — a voice heard in many guises throughout history — which is the most dangerous voice you will ever hear. It appeals to the basest instincts in all of us — it appeals to human prejudice. It tries to divide us by setting Whites against Blacks, by setting Christians against Jews, by setting men against women. And if it succeeds in dividing us from our fellow human beings, it will impose its evil will upon a fragmented society. Do not listen to that voice!"

These words were spoken by John G. Kemény, aka Kemény János György, in his address to Dartmouth College students in 1981 when he stepped down as the university's president. It was a beautiful message that was intrinsic to Kemény's personality: as a child he and his family experienced discrimination, and as an adult he did much to fight it. In fact, the idea underlying his best-known work, the now 60-year-old BASIC programming language, was to bring computing, which was still a rather elitist activity at the time, within everyone's reach. It would be impossible to write an article commemorating the anniversary of BASIC without going into more detail about Kemény, whose name is still all too little known in his home country.

From Budapest to Mars

János Kemény was born in Budapest on May 31, 1926, and his birthplace is marked by a commemorative plaque at 38 Bajcsy-Zsilinszky Street, next to the Toldi Cinema. János Neumann lived just a few blocks from there, and Ede Teller's former residence was also nearby, separated only by several streets from the 6th district apartments where Leó Szilárd and Jenő Wigner grew up. History would have it that they later met at Los Alamos, where they worked on the Manhattan Project, the development of the atomic bomb.

Born into a wealthy Jewish family, Kemény received a good education at a prestigious private school and later at the Berzsenyi Dániel Gymnasium. However, he was unable to complete his high school studies: after Hitler's occupation of Vienna, Kemény's father began to organize the family's departure for abroad, and in 1940 they emigrated to New York. Some of their close relatives preferred to stay in Budapest – all of them perished in the death camps later on.

So Kemény completed his high school education in the United States and began studying mathematics and philosophy at Princeton in 1943. But yet again, he had to take a break from his studies due to the draft notice he received just after obtaining citizenship. He was assigned to Los Alamos, where he helped the later Nobel laureate Richard Feynman with the mathematical calculations for the bomb's development. It was then that he became a member of the "Martians", namely the group of Hungarian scientists: Teller, Wigner, Szilárd, Neumann and Tódor Kármán. The amusing analogy was thought up by Leó Szilárd in a conversation with Enrico Fermi, suggesting that the genius scientists who spoke the bizarre language were in fact representatives of an extraterrestrial intelligence disguised as Hungarians. And János Kemény himself was one of these Martians.

The young math student was greatly influenced by his older compatriots, especially Neumann. "He was a perfectly ordinary man, but also the greatest living mathematician. In any case, he taught me one important lesson: I don't necessarily have to have a startling appearance in order to be a successful mathematician," he later wrote of Neumann with his characteristic wry humor.

Kemény was discharged in 1947, then graduated and two years later received his doctorate in logic – a field so close to his heart that when he later bought a car, he had it fitted with a custom license plate: "LOGIC". However, even before earning his PhD, he was the recipient of another great honor: Robert Oppenheimer, the father of the atomic bomb, appointed him as a research assistant to Albert Einstein. Kemény worked on unified field theory with the world-renowned scientist, who, he recalls, was a one-of-a-kind physicist but who needed help with mathematical calculations.

John Kemény and Thomas Kurtz – Photo: computerhistory.org
John Kemény and Thomas Kurtz – Photo: computerhistory.org

After completing his doctorate, Kemény worked at Princeton's Office of Naval Research as well as in the university's Philosophy Department. Then, in 1953, at Einstein's recommendation, he was appointed permanent professor at Dartmouth College – he was 27 at the time. Two years later he became chairman of the Mathematics Department, and in 1956 he was introduced to a new professor at the university, Thomas E. Kurtz, who became his most important collaborator.

The computer should be for everyone!

In the late fifties, Kemény and Kurtz procured Dartmouth's first computer, but neither of them liked the hierarchical structure surrounding the use of the machine. Microcomputers didn't exist back then, and students couldn't simply plop down in front of the big, expensive mainframes. Users 'programmed' by typing on punch cards, which were then collected by the computer operators, who ran the programs encoded on the cards and printed out the results of each program.

"The next day, the user received the result sheet, which usually read something like: ERROR ON CARD 27. Or there was nothing to be read because the user forgot to write PRINT X at the end of the program. Then came the debugging, the hole-punching, the waiting in line, and yet another day,"

reads one of Kemény's quotes in the May 1993 issue of Fizikai Szemle [Physics Review], which contains a lengthy tribute to the mathematician.

Kurtz had the idea to change the system, and together with Kemény, they realized their vision in 1964: a time-sharing computer. It should be noted that such a computer system had been experimented with elsewhere a few years earlier, but Kurtz and Kemény's DTSS (Dartmouth Time Sharing System) was the first commercially successful time-sharing system.

The idea of such a system is to divide the machine's resources into time slices and distribute them among several users. This means that the time-sharing system could be used by several people at the same time via terminals connected to the central computer. The computer constantly monitored the activity of each terminal and allocated time slices accordingly: for example, a user typing text on one terminal would not require a large amount of CPU time, and another user running a program from their terminal could get more time slices. Time-sharing thus enabled multitasking and reduced the role (and authority) of computer operators. "One of the happiest moments of my life was when I no longer had to punch cards," Kemény later commented on the birth of DTSS.

On the other hand, it was Kemény's idea to create a programming language for DTSS. At the time, a cumbersome, early version of Fortran was the most widely used programming language, and Kemény thought that a language that had a simpler syntax, gentler learning curve, and ability to offer a more rewarding experience to the user would be a better way to make computing more appealing to students. Kurtz resisted somewhat and raised the issue of the benefit of teaching Dartmouth students a language they would never be able to use outside of Dartmouth. Suffice it to say, this concern has been thoroughly refuted by posterity.

Taking Fortran as a basis, Kemény and Kurtz developed a new language around eight main criteria. These included general-purpose usability, comprehensible error messages, hardware and operating system independence – all principles that went against the elitist view. In keeping with the conventions of the time, the language was given a catchy-sounding acronym: BASIC – Beginner's All-purpose Symbolic Instruction Code. On May 1, 1964, just over sixty years ago, the first BASIC program ran on the DTSS. According to the Dartmouth website, it was the following simple addition program:

10 PRINT 2+2

20 END

The license plate on János Kemény's car – Photo by Dartmouth College
The license plate on János Kemény's car – Photo by Dartmouth College

Only Kemény was there to witness the historic result ("4") because Kurtz was an early riser and had already gone home by the time his colleague made it to the triumphant moment at 4am. So what else could the license plate on Kemény's new car have been but "BASIC".

A "basic" language

BASIC was not only a feat of computer science, but also one of pedagogy, which quickly outgrew its creators.

"In addition to being partly a source of national pride because of János Kemény, BASIC has had a huge influence on the development of computer science education," Executive Director of the John von Neumann Computer Society (NJSZT), Gábor Képes, told Telex. "Many variants of the programming language appeared in the '70s and '80s, and BASIC became a standard that was essential to know in order to use a computer. In fact, BASIC became the basis for human-machine interaction at that time. Consequently, this marked the beginning of a major era in computer science education, when the dissemination of digital literacy was fully intertwined with the teaching of programming and algorithmic thinking."

Hungary also saw a generation whose first step towards programming in the 1980s was BASIC. Around 1983-1984, the programming language was being taught in specialized courses, and children were very receptive to it because in a few weeks you could get to a point where you could write a simple adventure game. It's hard to fathom nowadays the sheer quantities of books and magazines on BASIC programming that were being sold. Printed program lists were being passed around, and the pioneering initiative of Hungarian IT distance learning, the TV-BASIC course (now available on YouTube), was broadcasted to Hungarian homes.

But BASIC also flourished in the West, thanks in part to the fact that super-successful microcomputers, which had proved to be a hit in schools, already came equipped with the programming language. The British ZX Spectrum and the American Commodore 64 had their own dialects, i.e. versions, of BASIC (the latter was probably the most influential home computer in Hungary). And, of course, it was at this time that "10 GOTO 10", the one-line BASIC program that threw the C64 into an infinite loop, became the joke of a generation.

A simple BASIC program on the C64 displaying the numbers from 1 to 60 – Photo by Gábor Stöckert / Telex
A simple BASIC program on the C64 displaying the numbers from 1 to 60 – Photo by Gábor Stöckert / Telex

The programming language also found its way into the business world: rudimentary database management programs and other important user applications were also being written in BASIC. As an example of its popularity, Bill Gates and Paul Allen founded Microsoft in 1975 to develop a version of BASIC for the Altair 8800 computer, the company's first product. In 1991, the company also released a landmark version of the language, Visual Basic, which brought BASIC closer to the modern development tools and programming languages of the time.

By the 1980s, Kemény and Kurtz's creation had taken on a life of its own. Programs written in different BASIC dialects were almost never compatible with one another, and on microcomputers, they began to perform functions that were different from those of the original language, which had been designed for a university environment. In response to this, in 1984, Kemény and Kurtz released True BASIC, the heir to the original Dartmouth language designed for home PCs, but this wasn't enough to set the BASIC craze on a new course.

By the early nineties, the frenzy began to subside all by itself. BASIC had significant limitations (as anyone who has tried to write games on a C64 has experienced), and as PCs evolved, the language was supplanted by others such as C and Pascal. And while it would still have been great as a teaching language, a paradigm shift in teaching was taking place. "In the 1990s, teaching coding was replaced by focusing on application knowledge. Recently it has become clear again how useful it is to learn algorithmic thinking," said Gábor Képes.

University reformer, presidential appointee

Today, BASIC is considered obsolete, but it is still sometimes used in education, and retro-loving hobby programmers have not given up on it. But its greatest achievement is indeed its impact: it's no exaggeration to say that the language has launched generations of programmers into the field, far surpassing Kemény's original hopes for BASIC.

And yet János Kemény's name is not as closely associated with his creation as, say, Linus Torvalds' is with the Linux operating system. The reason is that the Hungarian-born professor was not first and foremost a computer scientist, but rather a department head, and then from 1970 he was the President of Dartmouth, which kept him busy. The openness that he later urged students to embrace in his farewell speech was something he consistently espoused while leading the university.

In the late sixties, Dartmouth was not only a prestigious Ivy League university, but also a very conservative institution. It was founded in 1759 (before the birth of the United States) and, in keeping with Protestant tradition, only white men were allowed to attend. Kemény changed this, overcoming all the resistance he encountered in his efforts: he opened the university to Native Americans, black people and women. One of Dartmouth's first female students was Meryl Streep. Kemény also defied a university rule that forbade the president from teaching: in addition to running the university, he held courses that weren't exclusive to mathematics students, because he believed that knowledge of math was something that everyone could and should have.

Dartmouth's first female students were exchange students in 1969, including the three pictured here, Gayle Williamson (Randolph-Macon College), Elizabeth Heaps (Connecticut College) and Dr. Mary Frances Stubbs (Talladega College) – Photo by Dartmouth College
Dartmouth's first female students were exchange students in 1969, including the three pictured here, Gayle Williamson (Randolph-Macon College), Elizabeth Heaps (Connecticut College) and Dr. Mary Frances Stubbs (Talladega College) – Photo by Dartmouth College

In 1979, he found himself in a new role: following the Three Mile Island nuclear power plant accident, US President Jimmy Carter asked Kemény to head the investigation commission. Kemény worked on the case for six months, at a place surrounded by Washington bureaucracy and far from Dartmouth. The report of Kemény's commission was firm and as clear as could be: sharply critical of the design flaws and human error that led to the accident but at the same time pushing for the safe use of nuclear power. The report brought new respect to John Kemény's name, but the professor was eager to return to teaching. In his first lecture at the university after a long break, he began by saying, "After six months in Washington you can't imagine how nice it is to return to civilization."

Kemény was known to have said that he was devoted to two things in life: his wife and the university, "until death do us part". He and his family lived near the Dartmouth campus in New Hampshire, where Kemény taught until he passed away. On Christmas 1992, at the age of 66, he died of a heart attack. Not only was he mourned by Dartmouth, he was an honorary doctor of 18 other universities and an honorary member of numerous academies and scientific associations.

In Hungary, the memory of Einstein's former assistant professor is mainly honored by the NJSZT: their prize for young computer scientists is named after János Kemény. Their latest exhibition opened in May last year, and was also linked to the Dartmouth professor in several ways. "The influence of Kemény and Kurtz's work is shown by the fact that most of the machines that were on display come equipped with BASIC" – Gábor Képes said.

Copied to clipboard