Where does ‘Hello world’ come from?

Brian Kernighan actually wrote the first “hello, world” program as part of the documentation for the BCPL programming language developed by Martin Richards. BCPL was used while C was being developed at Bell Labs a few years before the publication of Kernighan and Ritchie’s C book in 1972.

enter image description here

As part of the research for a book I was writing about the Alice programming environment, I corresponded with both Prof. Kernighan at Princeton and Martin Richards at Cambridge (when I was teaching a seminar there in the 1990’s). They helped me to track the first documented use of code to print the message “Hello, World!” Brian Kernighan remembered writing the code for part of the I/O section of the BCPL manual. Martin Richards — who seems to have a treasure trove of notes, old documents, etc. — found the manual and confirmed that this was the original appearance of the program. The code was used for early testing of the C compiler and made its way into Kernighan and Ritchie’s book. Later, it was one of the first programs used to test Bjarne Stroustrup’s C++ compiler.

It became a standard for new programmers after it appeared in Kernighan and Ritchie, which
is probably the best selling introduction to programming of all time.

Leave a Comment