By tradition, the first program people write in a new programming language simply makes the computer display 'Hello, world'. The habit comes from Brian Kernighan of Bell Labs, who used the phrase in tutorials in 1972 and 1974 and in The C Programming Language, the 1978 book he wrote with Dennis Ritchie.

Bell Labs, 1972

Technology

The story behind the card

The earliest known version is in Kernighan's 1972 tutorial for B, a forerunner of the C language, where it appeared in an example about variables; the example before it printed only 'hi!'. The 1978 book made the phrase famous, and today almost every programming course and language manual starts with a version of it. It survives because it is a quick check that everything works: that the language is installed, that the code can be turned into a program the computer can run, and that the programmer knows how to run it, all before anything harder begins. In Python it takes a single line, while older languages need several. On devices without a screen, such as tiny microcontrollers, the equivalent first test is often making a light blink. Outside computing the phrase was already the catchphrase of the New York radio presenter William B. Williams in the 1950s.

Türkçe oku
Geleneğe göre yeni bir programlama dilinde yazılan ilk program, ekrana yalnızca “Hello, world” (Merhaba dünya) yazdırır. Bu alışkanlık, Bell Labs'ten Brian Kernighan'ın 1972 ve 1974'te yazdığı öğretici metinlerden ve Dennis Ritchie ile birlikte yazdığı 1978 tarihli The C Programming Language kitabından gelir.
Bell Labs, 1972

Bilinen en eski örneği, Kernighan'ın 1972'de C dilinin öncüsü B dili için yazdığı öğretici metinde, değişkenleri anlatan bir örnekte geçer; ondan önceki örnek ekrana yalnızca “hi!” yazdırıyordu. Kalıbı ünlü yapan 1978 tarihli kitap oldu; bugün neredeyse her programlama kursu ve dil kılavuzu bir “Hello, world” örneğiyle başlar. Gelenek, her şeyin çalıştığını hızlıca denetlediği için yaşıyor: Dilin kurulu olduğunu, kodun bilgisayarın çalıştırabileceği bir programa dönüştürülebildiğini ve yazılımcının onu nasıl çalıştıracağını bildiğini, daha zor işlere geçmeden gösterir. Python'da tek satır yeter, daha eski dillerde ise birkaç satır gerekir. Ekranı olmayan küçük mikrodenetleyicilerde ilk deneme çoğu zaman bir ışığı yakıp söndürmektir. Kalıp bilgisayar dünyası dışında da biliniyordu: New Yorklu radyo sunucusu William B. Williams 1950'lerden beri bu sözü slogan olarak kullanıyordu.

Sources and further reading

Background reading: "Hello, World!" program
Next card in the archiveThe Antikythera mechanism, an ancient Greek bronze device that modelled the sky with gears, is more than 2,000 years old and survives only as corroded fragments. From 2005 researchers scanned them with X-rays in 3D, reading hidden text and working out how the gears predicted eclipses.Read next →