Wiki
Casinos
Casino reviews A–Z
Canada Edition Business, money & culture
Yadude Books
Business, money, tech and the arts across Canada.
Friday, November 6, 2026 Canada · No. 2026 Price: Free · Yadude Books

Brian Kernighan

Brian Wilson Kernighan is a Canadian computer scientist whose foundational work at Bell Labs helped shape modern computing. He is best known for co-authoring the seminal book 'The C Programming Language' with Dennis Ritchie, which introduced the C language to generations of programmers. Kernighan's contributions extend to co-creating influential programming languages like AWK and AMPL, authoring key Unix utilities, and coining the term 'Unix' itself. Since 2000, he has served as a professor of computer science at Princeton University, where he directs undergraduate studies and teaches introductory courses, making him a significant figure in both Canadian and global computing history.

Early Life and Education

Brian Kernighan was born in Toronto, Ontario, on 30 January 1942. He began his post-secondary education in his home city, attending the University of Toronto between 1960 and 1964. There, he earned a Bachelor of Applied Science degree in the engineering physics program, a field that blends fundamental physics with engineering principles. Following his undergraduate studies, Kernighan pursued graduate work at Princeton University in the United States. He completed his doctoral studies in electrical engineering in 1969, successfully defending a dissertation titled 'Some graph partitioning problems related to program segmentation' under the supervision of Professor Peter G. Weiner. This academic foundation in both theoretical and applied disciplines prepared him for his subsequent career in computing research at Bell Labs.

Photograph of Brian Kernighan giving a presentation on his book "UNIX: A History and a Memoir" as part of Vintage Computer Festival East hos
Photo: Jw12321 / Wikimedia Commons (CC0)

Career at Bell Labs and Unix Contributions

After earning his PhD, Kernighan began a long and influential career at Bell Labs, the research and development arm of AT&T. It was here that he worked alongside Unix creators Ken Thompson and Dennis Ritchie, contributing to the nascent operating system's ecosystem and its surrounding philosophy. Kernighan is credited with coining the name 'Unix' and helped popularize Thompson's Unix philosophy. His practical contributions included authoring and co-authoring several essential Unix programs and tools that expanded the system's capabilities for text processing and typesetting. Among his notable creations were ditroff, or device independent troff, developed in 1973, which allowed the troff text formatter to work with any output device. In 1974, he collaborated with Lorinda Cherry to create the eqn typesetting language for mathematical equations within troff, and in 1988 he created the pic language for drawing diagrams. In 1972, while documenting the B programming language, Kernighan used the phrases 'hello' and 'world' to illustrate string handling, creating the famous 'hello, world!' programming example. His original 1978 implementation of this program was later sold at The Algorithm Auction, noted as the world's first auction of computer algorithms.

Video: The Legacy of Unix, Unix: A History and a Memoir by Brian Kernighan (Book Overflow, YouTube)

Programming Languages and Algorithmic Research

Beyond utilities, Kernighan played a central role in the development of several enduring programming languages. His most famous literary contribution is the book 'The C Programming Language', co-authored with C's creator, Dennis Ritchie, though Kernighan has consistently stated the language design was 'entirely Dennis Ritchie's work'. The book, often referred to as 'K&R' after its authors, served as the primary reference for C for decades. In 1977, Kernighan collaborated with Alfred Aho and Peter Weinberger to create the AWK programming language, a text-processing tool whose name incorporates the 'K' for Kernighan. He later co-developed the AMPL mathematical modeling language for optimization problems in 1985. Kernighan also created the Ratfor preprocessor in 1976 and, with Dennis Ritchie, the m4 macro processing language in 1977. His theoretical work includes significant contributions to combinatorial optimization. In collaboration with Shen Lin, he devised important heuristic algorithms for two complex NP-complete problems, which are frequently cited in computer science literature.

Brian Kernighan's research has consistently connected practical software development with fundamental computer science theory. He devised well-known heuristics for two NP-complete optimization problems, graph partitioning and the travelling salesman problem, in collaboration with Shen Lin. This work produced the Kernighan-Lin algorithm and the Lin-Kernighan heuristic. His doctoral dissertation at Princeton University was titled "Some graph partitioning problems related to program segmentation". The tools and methods from this research have been used for decades in both academic and industrial settings.

Brian Kernighan speaks at a tribute to Dennis Ritchie at Bell Labs.
Photo: Ben Lowe / Wikimedia Commons (CC BY 2.0)

Authorship and Influential Publications

Brian Kernighan is a prolific author whose books have educated millions of programmers. His writing is celebrated for its clarity and direct style, effectively communicating complex ideas. His publications often emerged directly from his research and practical work, serving as definitive guides for their subjects. Beyond the famous C book, his early work with P.J. Plauger established key texts in software engineering. Their 1974 book 'The Elements of Programming Style' distilled principles for writing clear code. The 'Software Tools' series, including volumes for Ratfor and Pascal, spread the essence of C and Unix thinking to users of other languages. In 1999, he co-wrote 'The Practice of Programming' with Rob Pike. His 2015 book, 'The Go Programming Language', co-authored with Alan Donovan, introduced another modern systems language. His 2019 book, 'UNIX: A History and a Memoir', provides a first-hand historical account of the system's development at Bell Labs. One of his most cited shorter works is the 1981 technical report 'Why Pascal is Not My Favorite Programming Language', a critique that influenced language design discussions, though some parts were later addressed by the ISO 7185 Pascal standard.

Academic Career and Teaching Philosophy

In 2000, Kernighan joined the faculty of Princeton University as a professor in the Department of Computer Science. He has also served as the department's director of undergraduate studies, shaping the educational experience for computer science majors. A dedicated teacher, he is known for teaching a popular course each fall called 'Computers in Our World', which is designed to introduce the fundamentals of computing to students from non-technical majors. His teaching influence extends beyond Princeton. In 1996, he taught Harvard University's introductory computer science course, CS50. Kernighan's approach to that course influenced David J. Malan, who later took over teaching CS50 and dramatically expanded its reach to multiple universities and digital formats. Kernighan has also served as the software editor for Prentice Hall International, overseeing technical publications. Through his academic role and editorial work, Kernighan continues to impact the next generation of computer scientists and promote computational literacy for a broad audience.

Honours, Recognition, and Lasting Influence

Brian Kernighan's extensive contributions to computer science have been recognized by major academic and engineering institutions. In 2002, he was elected as a member of the prestigious National Academy of Engineering. This honour specifically cited his contributions to software and programming languages. Nearly two decades later, in 2019, he was elected a member of the American Academy of Arts and Sciences, another leading honorary society. His legacy is cemented in the everyday lexicon of programming through the 'K' in 'K&R C' and 'AWK'. He is also known for coining the sarcastic expression 'What You See Is All You Get' (WYSIAYG) as a critique of some WYSIWYG systems that discard useful document information. Kernighan has stated that if stranded on an island with only one programming language, it would have to be C. As of 2022, he remained actively working on improvements to the AWK programming language, demonstrating a lifelong commitment to the tools he helped create. His work continues to be a foundational reference in both industry and academia, influencing how software is built and taught.

Key Programs and Tools Developed

Brian Kernighan authored or co-authored many major programs and tools during his career, primarily at Bell Labs. In 1972, he wrote the first documented "Hello, world!" program in a tutorial for the B programming language. He created the ditroff program in 1973 and the eqn typesetting language with Lorinda Cherry in 1974. He co-authored the AWK programming language in 1977 with Alfred Aho and Peter J. Weinberger and the AMPL programming language in 1985. These contributions were integral to the Unix programming environment and had wide influence on software development practices.

YearProgram/ToolDescription
1972'Hello, world!' exampleFirst documented in 'A Tutorial Introduction to the Language B'
1973ditroffDevice-independent version of the troff text formatter
1974eqnTypesetting language for mathematical equations in troff
1976RatforPreprocessor to provide C-like control structures in FORTRAN
1977m4General-purpose macro processor
1977AWKPattern scanning and text processing language
1985AMPLAlgebraic modeling language for mathematical optimization
1988picLanguage for drawing diagrams in troff

This body of work illustrates Brian Kernighan's focus on creating practical, reusable tools that solved common problems. He authored many Unix programs, including ditroff, and co-authored the AWK and AMPL programming languages. His "Software Tools" series spread the essence of "C/Unix thinking" with adaptations for languages like BASIC and FORTRAN. He helped popularize Ken Thompson's Unix philosophy. Each tool embodies the principle of small, composable programs that work together, a concept he helped define and promote throughout his career.

Questions about Brian Kernighan

What is Brian Kernighan best known for?

Brian Kernighan is best known for co-authoring the book 'The C Programming Language' with Dennis Ritchie, which served as the primary introductory text for the C programming language for decades. He is also famous for co-creating the AWK programming language and for his many contributions to the Unix operating system ecosystem at Bell Labs, including authoring utilities like ditroff and eqn. The 'K' in the well-known terms 'K&R C' and 'AWK' stands for Kernighan. He also coined the name 'Unix' and popularized the 'hello, world!' programming example.

What did Brian Kernighan invent or create?

Kernighan created or co-created several important programming tools and languages. He authored the first documented 'Hello, world!' program example in 1972. He created the ditroff program in 1973 and the eqn and pic typesetting languages in 1974 and 1988 respectively. He co-created the AWK programming language in 1977 and the AMPL modeling language in 1985. With Shen Lin, he devised the Kernighan-Lin graph partitioning algorithm and the Lin-Kernighan heuristic for the travelling salesman problem. He also created the Ratfor preprocessor and the m4 macro processor.

Where does Brian Kernighan teach now?

Since the year 2000, Brian Kernighan has been a professor in the Department of Computer Science at Princeton University in New Jersey, United States. He also holds the role of director of undergraduate studies for the department. He is known for teaching a popular introductory course called 'Computers in Our World' to non-majors each fall semester. Prior to Princeton, he taught Harvard's CS50 course in 1996, influencing its future direction under David J. Malan.

Did Brian Kernighan design the C programming language?

No, Brian Kernighan did not design the C programming language. He has explicitly stated that the C language 'is entirely Dennis Ritchie's work'. Kernighan's monumental contribution was co-authoring the definitive book 'The C Programming Language' with Ritchie, which explained and popularized the language. The book's authorship led to the language's common nickname 'K&R C', but the design credit belongs solely to Ritchie. Kernighan's role was as an author and expositor, not a language designer in this case.

What awards has Brian Kernighan received?

Brian Kernighan has received significant honours for his contributions to computer science. He was elected a member of the National Academy of Engineering in 2002, specifically for contributions to software and programming languages. Later, in 2019, he was elected a member of the American Academy of Arts and Sciences. These memberships are among the highest forms of recognition in their respective fields. His influence is also recognized through the enduring use of tools and books that bear his name or authorship.

Where did Brian Kernighan go to university in Canada?

Brian Kernighan attended the University of Toronto for his undergraduate studies. He was a student there from 1960 to 1964. During this period, he earned his Bachelor of Science degree in the field of engineering physics. This foundational education in Canada preceded his graduate studies in the United States. He later pursued and received his PhD in electrical engineering from Princeton University in 1969. His doctoral dissertation at Princeton focused on graph partitioning problems. Therefore, his post secondary education began at the University of Toronto.

Sources and further reading

Checked by the Yadude Books desk. Last updated 2026-11-06.

Related articles