Brian Wilson Kernighan (born January 30, 1942) is a Canadian computer scientist. He worked at Bell Labs and helped develop Unix with Ken Thompson and Dennis Ritchie, the creators of Unix. Kernighan became well known for writing a book about the C programming language with Dennis Ritchie. He stated that he did not help design the C language; it was entirely Ritchie's work.
Kernighan created many Unix programs, including one called ditroff. He also co-created the AWK and AMPL programming languages. The "K" in K&R C and AWK stands for "Kernighan."
With Shen Lin, Kernighan developed methods to solve two complex problems: graph partitioning and the traveling salesman problem. These methods are often called the Kernighan–Lin algorithm and the Lin–Kernighan heuristic.
Since 2000, Kernighan has been a professor of computer science at Princeton University. He also leads undergraduate studies in the computer science department. In 2015, he co-wrote a book titled The Go Programming Language.
Early life and education
Kernighan was born in Toronto. He studied at the University of Toronto from 1960 to 1964 and earned his bachelor's degree in engineering physics. In 1969, he received his Ph.D. in electrical engineering from Princeton University. His thesis, titled "Some graph partitioning problems related to program segmentation," was completed under the guidance of Peter G. Weiner.
Career and research
Brian Kernighan has been a professor in the computer science department at Princeton University since 2000. Each fall, he teaches a class called "Computers in Our World," which teaches basic computing concepts to students who are not majoring in computer science.
He worked as a software editor for Prentice Hall International. His "Software Tools" series shared the ideas of "C/Unix thinking" by adapting them for BASIC, FORTRAN, and Pascal. His program called "Ratfor" (rational FORTRAN) was made freely available to the public.
He once said that if he were stranded on an island and could only use one programming language, it would be C.
Kernighan created the term "Unix" and helped spread the ideas behind Unix, which were developed by Ken Thompson. He also created the phrase "What You See Is All You Get" (WYSIAYG), a sarcastic version of "What You See Is What You Get" (WYSIWYG). This phrase is used to explain that WYSIWYG systems may remove information from documents that could be useful elsewhere.
In 1972, Kernighan used the words "hello" and "world" in the B programming language to explain how memory is managed in strings. This example became the well-known "Hello, world!" program. His version of the program from 1978 was sold at The Algorithm Auction, the first auction of computer algorithms.
In 1996, Kernighan taught CS50, an introductory computer science course at Harvard University. His work influenced David J. Malan, who later expanded the course to be taught at multiple universities and in digital formats.
Kernighan was elected to the National Academy of Engineering in 2002 for his work in software and programming languages. He was also elected to the American Academy of Arts and Sciences in 2019.
In 2022, Kernighan said he was working to improve the AWK programming language, which he helped create in 1977.
Books and projects co-created by Kernighan include:
– The Elements of Programming Style with P. J. Plauger
– Software Tools, a book and tools for Ratfor, co-created with P. J. Plauger
– Software Tools in Pascal, a book and tools for Pascal, with P. J. Plauger
– The AWK Programming Language, with Alfred V. Aho and Peter J. Weinberger
– The C Programming Language, with Dennis Ritchie, the first book about C
– The Practice of Programming, with Rob Pike
– The Unix Programming Environment, a tutorial book, with Rob Pike
– "Why Pascal Is Not My Favorite Programming Language," a critique of Pascal, written before standards for Pascal were finalized
– UNIX: A History and a Memoir, a book about the development of Unix from Kernighan’s perspective at Bell Labs
Key events in Kernighan’s career include:
– 1972: The first documented "Hello, world!" program, created by Kernighan in his book A Tutorial Introduction to the Language B
– 1973: ditroff, a version of troff that works with any device
– 1974: eqn, a typesetting language for troff, created with Lorinda Cherry
– 1976: Ratfor
– 1977: m4, a macro processing language, created with Dennis Ritchie
– 1977: AWK, a programming language, created with Alfred Aho and Peter J. Weinberger, along with its book The AWK Programming Language
– 1985: AMPL, a programming language
– 1988: pic, a typesetting language for troff