The book, The C Programming Language, by Bell Labs’ Brian Kernighan and Dennis Ritchie, played a defining role in the development and popularization of C. The book, released in 1978, is still widely read.
Brian is also the brains behind the AWK and AMPL programming languages. In 1972, he described memory management in strings using “hello” and “world” in B programming language. His original 1978 implementation of Hello, World! was sold at The Algorithm Auction, the world’s first auction of computer algorithms.
In a recent podcast with ChangeLog, Brian talked about the evolution of computing and programming languages over the past 50 years.
Brian started with a hat tip to Ken Thompson, who built the mini-computer PDP-7 in 1964. Ken created the first Unix system in 1969. The UNIX operating system is the base of all operating systems.
“In 1965, I used Fortran, and we used punched cards,” said Brian. “The summer I spent at MIT in 1966 was a revelation because they had time-sharing. There was a central computer, and you accessed it from various kinds of remote facilities, some of which even used the phone system. So in effect, it was kind of like cloud computing. ” The central computer was the IBM 7094. Then, the computers cost millions of dollars, lived in a huge, air-conditioned room, and was painstakingly slow- “probably a million times slower than computers today”. The memory hovered around 32-36k.
Today, Brian said, computers are smaller, cheaper, faster, better and exponential. “We all have these powerful computers, and everybody is carrying an exceptionally powerful computer with them. And it’s connected to everybody else’s powerful computer, ”he said. Moreover, the memory and bandwidth on these computers are infinite, with speeds like never before.
The relevance of C
When asked about the relevance of C, Brain deemed it “probably useless”. But then again, it would depend on the application, he added. For him, C shouldn’t be the first programming language a student learns in school. He voted for Python instead since it’s expressive, easy to use and efficient for most use-cases. However, C is still at the backend. “Python works so well in many cases because very often what you think of as a Python function or module is just a bunch of C code through a foreign function interface,” Brian said.
The main challenge with C is the trade-off. “You need a sharp tool to do things like write operating systems where you have to access memory in an unconstrained way. And unfortunately, that translates into the programs that ordinary mortals like me write, where you access the wrong memory in an unconstrained way, and things go bad in various ways. C has lots of that problem, ”he said.
Brian also mentioned Linux Kernel’s proposal to update the version of C. To Brian, this sounded like a big challenge, given developers will be dealing with 20 million lines of C code. “Can you do that without breaking something? Hard to say, ”he said.
Later, Brian discussed Go. He said the language is great for crawling or running concurrent processes. It ran faster and was more expressive than Python. In addition, Go was culturally compatible with C. Thanks to Go’s cautious evolution, it remains backwards-compatible, right back to the beginning. Means, a Go program written years ago would still work today.
Apart from C, AWK and Python are Brians’s preferred languages. “I do enjoy programming; it continues to be fun. The problem I have is that most of the programs I now write tend to be quite small. They are often AWK one-liners to do something, or maybe a Python program to clean up data in one format and convert it into other data. I am not doing anything that I would call big, ”he added.
Brian called Web 3 ‘just another buzzword’. He appreciates the idea of a decentralized net that takes the web back to the era where tech oligarchs were non-existent. But he questioned the need for mechanisms like blockchain or the environmental impact of computing to make it work.