Lecture 1: Does language determine thought?
============================================

Do linguistic categories limit and
determine cognitive categories?  Or is it more that linguistic
categories and usage influence thought and certain kinds of
non-linguistic behavior?

Language is a weapon of politicians, but language is a weapon in much
of human affairs (Noam Chomsky).  For example:

+ And they said to each other, "Come, let's make bricks and bake them
  thoroughly." They used brick instead of stone, and tar for
  mortar. Then they said, "Come, let us build ourselves a city, with a
  tower that reaches to the heavens, so that we may make a name for
  ourselves; otherwise we will be scattered over the face of the whole
  earth."
+ But the Lord came down to see the city and the tower the people were
  building. The Lord said, "If as one people speaking the same
  language they have begun to do this, then nothing they plan to do
  will be impossible for them. Come, let us go down and confuse their
  language so they will not understand each other."
+ So the Lord scattered them from there over all the earth, and they
  stopped building the city. That is why it was called Babel- because
  there the Lord confused the language of the whole world. From there
  the Lord scattered them over the face of the whole earth.

[From Wikipedia](http://en.wikipedia.org/wiki/Linguistic_relativity#Programming_languages):

+ The principle of linguistic relativity holds that the structure of a language affects the ways in which its respective speakers conceptualize their world, i.e. their world view, or otherwise influences their cognitive processes. Popularly known as the Sapir-Whorf hypothesis, or Whorfianism, the principle is often defined as having two versions:

    1.  the _strong_ version that language determines thought and that linguistic categories _limit and determine_ cognitive categories and 
    2.  the _weak_ version that linguistic categories and usage _influence thought_ and certain kinds of non-linguistic behaviour. 

(Aside: The term "Sapir-Whorf Hypothesis" is a misnomer, as Edward Sapir and Benjamin Lee Whorf never co-authored anything, and never stated their ideas in terms of a hypothesis. 
Harry Hoijer, one of Sapir's students, introduced the term
"Sapir-Whorf hypothesis", even though the two scholars never actually
advanced any such hypothesis.)

While never supported by its "authors", the Sapir-Whorf hypothesis is supported by many
program designers.
From [Wikipedia](http://en.wikipedia.org/wiki/Linguistic_relativity#Programming_languages):

+ Kenneth E. Iverson, the originator of the APL programming language,
  believed that the Sapir-Whorf hypothesis applied to computer languages
  (without actually mentioning the hypothesis by name). His Turing award
  lecture, "Notation as a tool of thought", was devoted to this theme,
  arguing that more powerful notations aided thinking about computer
  algorithms.[73]
+ The essays of Paul Graham explore similar themes, such as a conceptual
  hierarchy of computer languages, with more expressive and succinct
  languages at the top. Thus, the so-called blub paradox (after a
  hypothetical programming language of average complexity called Blub) says
  that anyone preferentially using some particular programming language will
  know that it is more powerful than some, but not that it is less powerful
  than others. The reason is that writing in some language means thinking
  in that language. Hence the paradox, because typically programmers are
  "satisfied with whatever language they happen to use, because it dictates
  the way they think about programs".
+ In a 2003 presentation at an open source convention, Yukihiro
  Matsumoto, creator of the programming language Ruby, said that one of
  his inspirations for developing the language was the science fiction
  novel Babel-17, based on the Sapiri-Whorf Hypothesis.

Whether or not your believe the above,
the right choice of language can be very useful. Standard programming
estimation models say that the development effort is exponential
LOC<sup>1.1</sup> (ish).  So here is how much LOC (median) and effort
it takes [to write down a standard unit of business 
functionality](http://www.qsm.com/resources/function-point-languages-table)
in different languages (btw, these numbers are not uncontroversial).

     Language      | LOC | Cost 
     --------------|-----|-----
     SQL Forms     |  11 |  1
     Smalltalk     |  19 |  2
     Oracle Dev 2K |  30 |  3
     SQL           |  30 |  3
     VBScript      |  37 |  4
     Access        |  38 |  4
     Visual Basic  |  52 |  6
     C++           |  53 |  6
     Java          |  53 |  6
     JavaScript    |  55 |  6
     Perl          |  57 |  6
     PL/1          |  57 |  6
     C#            |  59 |  6
     COBOL         |  78 |  9
     C             | 107 | 12 
     FORTRAN       | 118 | 14
     Assembler     | 203 | 25

But is measuring code by the line the right measure?

+ Measuring software productivity by lines of code is like measuring
  progress on an airplane by how much it weighs.  --Bill Gates

Perhaps we need more semantic measures:

+ The computing scientist's main challenge is not to get confused by the complexities 
  of his own making.   
  -- E. W. Dijkstra
+ If you're willing to restrict the flexibility of your approach, you can almost 
  always do something better.   
  -- John Carmack
+ The cheapest, fastest, and most reliable components are those that aren't there.   
  -- Gordon Bell
	
Given the right language, problem solving becomes easier:

+ Chess experts perceive chess boards at a different level to novices.
+ Experts don't think deeper than novices; rather, they just don't
  waste as much time on bad ideas.
+ Expert's set of concepts are different to novices.
+ These concepts, these feature extractors act like a "filter": our expert 
  literally does not see bad moves- no more than chess novices can see illegal moves.
+ [Massive implicit pruning of the search space](96koller.html)

James Martin, Design of Real-time Computer Systems, 1967:

+ We must develop languages that the scientist, the architect, the
  teacher, and the layman can use without being computer experts.
+ The language for each user must be as natural as possible to him.
+ The statistician must talk to his terminal in the language of statistics.
+ The civil engineer must use the language of civil engineering.
+ When a man (sic) learns his profession he must learn the
  problem-oriented languages to go with that profession.
