Hello World: An Instance Rhetoric in Computer Science



Similar documents
Lecture 1: Introduction

GREAT PAPERS IN COMPUTER SCIENCE: A RETROSPECTIVE

Principles of Programming Languages Topic: Introduction Professor Louis Steinberg

CSC Software II: Principles of Programming Languages

Functional Programming. Functional Programming Languages. Chapter 14. Introduction

Ch. 10 Software Development. (Computer Programming)

[Refer Slide Time: 05:10]

Evolution of the Major Programming Languages

Static vs. Dynamic. Lecture 10: Static Semantics Overview 1. Typical Semantic Errors: Java, C++ Typical Tasks of the Semantic Analyzer

History of Programming Languages

1.1 WHAT IS A PROGRAMMING LANGUAGE?

A Framework for the Semantics of Behavioral Contracts

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Chapter 13 Computer Programs and Programming Languages. Discovering Computers Your Interactive Guide to the Digital World

Introduction to Software Paradigms & Procedural Programming Paradigm

Fall 2012 Q530. Programming for Cognitive Science

How To Understand The Theory Of Computer Science

CSCI 3136 Principles of Programming Languages

Announcements FORTRAN ALGOL COBOL. Simula & Smalltalk. Programming Languages

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

Languages september 12, 2015 Éric Lévénez < FORTRAN III end-1958 FORTRAN II FORTRAN I october 1956

Chapter Four: How to Collaborate and Write With Others

Functional Programming

Object-Oriented Software Specification in Programming Language Design and Implementation

MTH124: Honors Algebra I

CSCA0201 FUNDAMENTALS OF COMPUTING. Chapter 1 History of Computers

01 Introduction. The timeline

Programming Languages

AN INTRODUCTION TO FUNCTIONAL PROGRAMMING THROUGH LAMBDA CALCULUS. Greg Michaelson

LESSON PLAN: Creating Animations from Paper

SOFTWARE ESTIMATING RULES OF THUMB. Version 1 - April 6, 1997 Version 2 June 13, 2003 Version 3 March 20, 2007

1/20/2016 INTRODUCTION

How To Teach Object Oriented Programming At An Introductory Level Course

UNIVERSITY OF LONDON (University College London) M.Sc. DEGREE 1998 COMPUTER SCIENCE D16: FUNCTIONAL PROGRAMMING. Answer THREE Questions.

What is a programming language?

Python Programming: An Introduction to Computer Science

The program also provides supplemental modules on topics in geometry and probability and statistics.

Computer Programming. Course Details An Introduction to Computational Tools. Prof. Mauro Gaspari:

3 SOFTWARE AND PROGRAMMING LANGUAGES

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.

Extending Semantic Resolution via Automated Model Building: applications

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

MATHEMATICS OF FINANCE AND INVESTMENT

Introduction to formal semantics -

Programming Languages in Artificial Intelligence

Chapter 5 Names, Bindings, Type Checking, and Scopes

CHAPTER 7 GENERAL PROOF SYSTEMS

Betting Best-Of Series

Data Abstraction and Hierarchy

Lecture 9. Semantic Analysis Scoping and Symbol Table

The countdown problem

n Introduction n Art of programming language design n Programming language spectrum n Why study programming languages? n Overview of compilation

Programming Languages in a Liberal Arts Education

CURRICULUM VITAE Herbert L. Dershem

DELAWARE MATHEMATICS CONTENT STANDARDS GRADES PAGE(S) WHERE TAUGHT (If submission is not a book, cite appropriate location(s))

Ronald Graham: Laying the Foundations of Online Optimization

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

How To Understand Programming Languages And Programming Languages

Is Sometime Ever Better Than Alway?

Syntax Check of Embedded SQL in C++ with Proto

Objectives. Python Programming: An Introduction to Computer Science. Lab 01. What we ll learn in this class

Diploma Of Computing

EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program

Asogwa Tochukwu Chijindu Department of Computer Engineering, Enugu State University of Science and Technology(ESUT), Enugu, Nigeria.

Storing Encrypted Plain Text Files Using Google Android

River Dell Regional School District. Computer Programming with Python Curriculum

CSE 307: Principles of Programming Languages

UNIVERSALITY IS UBIQUITOUS

Programming Languages & Tools

Deterministic Discrete Modeling

Understanding Programming Languages

ONLINE EXERCISE SYSTEM A Web-Based Tool for Administration and Automatic Correction of Exercises

OEA College Readiness Mathematics Test (CRMT) Development Plan

Big Data Science. Prof.dr.ir. Geert-Jan Houben. TU Delft Web Information Systems Delft Data Science KIVI chair Big Data Science

Kapitel 1 Multiplication of Long Integers (Faster than Long Multiplication)

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Semantic Description of Distributed Business Processes

Semester Review. CSC 301, Fall 2015

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Linear Programming I

Program Equilibrium. Moshe Tennenholtz Faculty of Industrial Engineering and Management Technion Israel Institute of Technology Haifa 32000, Israel

Great Theoretical Ideas in Computer Science

LCS 11: Cognitive Science Chinese room argument

A Note for Students: How to Use This Book

Berkeley CS191x: Quantum Mechanics and Quantum Computation Optional Class Project

High School Algebra Reasoning with Equations and Inequalities Solve equations and inequalities in one variable.

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Lucid, the Dataflow Programming Langugage 1

NEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES

Informatics versus Information Technology

Lecture Notes on Polynomials

Introduction to Computers and C++ Programming

Equations, Inequalities & Partial Fractions

Introduction to Computers and C++ Programming

How To Use Neural Networks In Data Mining

Chapter 15 Functional Programming Languages

o-minimality and Uniformity in n 1 Graphs

All ju The State of Software Development Today: A Parallel View. June 2012

Transcription:

Hello World: An Instance Rhetoric in Computer Science John Mount: jmount@mzlabs.com February 19, 2008 Computer scientists have usually dodged questions of intent, purpose or meaning. While there are theories that assign deep mathematical meaning to computer programs[11] we computer scientists usually avoid discussion of meaning and talk more about utility and benefit. Discussions of the rhetorical meaning of programs is even less common. However, there is a famous computer program that has a clean an important rhetorical point. This program is called hello world and its entire action is to write out the phrase hello world. The action is simple but the hello world program actually has a fairly significant purpose and meaning. I would like to briefly trace the known history of hello world and show how the rhetorical message it presents differs from the rhetoric embodied in earlier programs. In this sense we can trace a change in the message computer scientists felt they needed to communicate (most likely due to changes in the outside world). Since the late 1970 s it has been a tradition in computer science that when facing a new system to start by writing the traditional first program, which is called hello world. The history of this tradition is not well documented, but WikiBooks claims the origin is in Brain Kerninghan s 1974 tutorial for the computer language B. [12, 7] The program itself is as follows: main( ) { extrn a, b, c; putchar(a); putchar(b); putchar(c); putchar(!*n ); } 1

a hell ; b o, w ; c orld ; From the original context in [7] we can say this is not a pure hello world program. The purpose of this program is to illustrate a few functions of the language ( extrn variables, use of multiple lines and so on) and not to test if the system is running. The most famous (and a pure) example of hello world is found in Brian Kerninghan and Dennis Ritchie s famous 1978 C book[8]. The code looks like the following: main() { printf("hello, world\n"); } Equally famous are the early versions in BASIC : 10 print "Hello, World!" In both of these examples the purpose of hello world is clear: it is a trivial computer program that does nothing but print a single line of text. If this can not be made to work then nothing can be made to work. hello world is in fact a somewhat confrontational program. The author is saying it isn t obvious your computer system will work, so I am not going to invest a lot of time in it until I see it can at least print one line of text. Writing hello world as the first program on a new system was certainly a well known tradition by the late 1970 s. We can ask: did this tradition showed up late or early in the history of computer science? The first modern computer is commonly credited to John von Neumann in 1945. This attribution of first was made before a lot of previously secret information on Bletchley Park s and Konrad Zuse s work in Germany were well known, but von Neumann s work was definitely the known foundation that later work built on. Donald Knuth credits von Neumann with the first modern computer program[9]. In any case we can securely place the invention of the modern computer to the early to mid 1940 s. It seems like hello world was not written at that time because it made entirely the wrong rhetorical point. 2

In fact von Neumann s first program (in 1945) was a sorting algorithm (proving the computers could at least replace tabulators)- it was important to prove that not only could the computer turn on but that it could do something. The 1957 description of FORTRAN starts with a program that solves for roots of an equation.[4] John Backus himself says the prior to 1954 almost all programming was done in machine language or assembly language [3] (which would make hello world an unlikely first program as numeric operations are typically much more succinct than string manipulations in these languages). The 1958 UNIVAC Math-Matic Programming Manual first examples are (predictably) equations involving trigonometric functions.[5] In 1959 the Algo 58 standard [2] had no concrete example programs- the purpose of this document was to show that program syntax could be specified and to discuss the techniques of specification (so a runnable example did not serve their argument). John McCarthy s paper on recursive functions (LISP) starts with examples partial functions and conditionals (to get to terminating recursion as fast as possible).[10] The computer language BASIC seems almost designed to support hello world. Instead the 1964 BASIC manual[6] starts with a lively discussion of what a computer program is (as a process) and the first example program is a highly useful program that solves simultaneous equations. The point again being that useful work can be done. Even as late as 1972 hello world does not seem to be the obvious message. For example the popular BASIC tutorial called My Computer Likes Me, When I Speak in BASIC [1] does indeed start with a simple program that only writes a line of text. But the line it writes is MY HUMAN UNDERSTANDS ME. This is making a very different point than the point made by hello world. While I have skipped a number of languages of the period (Autocode, COBOL, APL, SNOBOL, PL/1, Logo, BCPL, Forth, Smalltalk...) we can see the general trend: fist programs had to make a point. By the dates it seems that once invented the hello world tradition took off and spread very quickly. Writing such a program serves a useful purpose as a test so the practice probably spread quickly once the rhetoric of the earlier programs was no longer needed. That is hello world became popular once computer scientists no longer felt that society needed to be persuaded of the ultimate utility of computer systems. 3

With the increasing complexity of modern systems hello world is a more important test than ever. hello world is sometimes called the hardest application to deploy. The idea is that once you learn your lessons from deploying it then deploying a second, more sophisticated, application seems relatively easy. I often find that I can lean the true nature of a system by deploying hello world. If writing and deploying hello world is a sufficiently unpleasant task in a system then it is likely that every other task in that system will be similarly unpleasant. In the end hello world serves the same purpose that it always has (testing if a system in fact works) and it stands as a rhetorical marker signifying that we are now living long after the skirmishes of the computer revolution. References [1] Albrecht, B. My Computer Likes Me, When I Speak in BASIC. Dymax, 1972. [2] Backus, J. W. The syntax and semantics of the proposed international algebraic language of the zurich acm-gamm conference. [3] Backus, J. W. The history of fortran i, ii and iii. ACM SIGPLAN Notices 13, 8 (Aug 1978). [4] Backus, J. W., Beeber, R. J., Best, S., Goldberg, R., Haibt, L. M., Herrick, H. L., Nelson, R. A., Sayre, D., Sheridan, P. B., Stern, H., Ziller, I., Hughes, R. A., and Nutt, R. The fortran automatic coding system. Proceedings of the Western Joint Computer Conference (Feb 1957). [5] Corp., R. R. U. UNIVAC math-matic programming system. Sperry Rand, 1958. [6] Kemeny, J., and Kurtz, T. Basic. [7] Kerninghan, B. W. A tutorial introduction to the language b. [8] Kerninghan, B. W., and Ritchie, D. M. The C Programming Language. Prentice Hall, February 1978. 4

[9] Knuth, D. E. von neumann s first computer program. Comp. Surveys 2, 4 (1970), 247 260. [10] McCarthy, J. Recursive functions of symbolic expressions and their computation by machine, part i. [11] Tennent, R. D. The denotational semantics of programming languages. Communications of the ACM 18, 8 (Aug 1976), 437 453. [12] Wikibooks. http://en.wikibooks.org/wiki/computer_ programming/hello_world#b, 2008. 5