Harry Halpin, <hhalpin -(a)- ibiblio.org>
http://www.ibiblio.org/hhalpin/homepage/presentations/programmingtalk/
And what takes the placer of philosophy?
...a general method in which all truths of reason would be reduced to a kind of calculation. At the same time, this would be a sort of universal language or script, but infinitely different from all those imagined previously, because its symbols and words would direct the reason, and errors - except those of fact - would be mere mistakes in calculation...
Binary: zero and one could be associated with the presence or absence of a monad.
The first computer was not digital at all...but the analog Difference Engine, later the Analytic Engine (1822), feating sequential control, branching, and looping!
Ada Lovelace wrote the first known program to calculate the Bernoulli Numbers.
And therefore is considered by most to be the first programmer, despite the fact the Analytical Engine never was completed.
Gottlieb Frege in his Grundlagen der Arithemetik sought to encode all of arithmetic, and thus all of mathematics, into what became known as first-order predicate logic
What is the set of all sets that does not contain itself?
or barber who shaves everyone who does not shave himself, and no one else?
Such a barber does not exist, but does such a set not exist?
Called for a formalization of all mathematics using "finitary" methods, along with a proof of consistency.
Yet how could we tell what could be "computed" by a human using finite methods?
If this was true, we could prove all mathematics true.
If it's false, then there are true things that cannot be proven.
First-order logic is undecidable, or Turing-Complete. As are many other things...
The first modern programming language was a series of easy to remember mnemonics for machine code, invented by Grace Hopper.
This style of coding developed into many programming languages (FORTRAN, COBOL, ALGOL).An Example in C, called imperative or procedural programming:
main() { char array[12] = "hello, world\n"; printf("%s", array); return 0; }
Alonzo Church invented a better way - the lambda calculus, a meta-logical language used to manipulate logical symbols.
The Church-Turing Hypothesis: Turing Machines and the Lambda Calculus are equivalent, therefore all computers have the same level of power.
Noam Chomsky refined the notion of "power" in connection with Turing Machines and connected it to human grammar via the Chomksy Hierarchy:
But Newell and Simon articulated that programs didn't manipulate numbers at all, but manipulated symbols!
What does 10 mean? The number "ten" in decimal, or the number "three" in binary?This led McCarthy, while attempting to make a mathematical notation for computer programs based on Church's lambda calculus.
(defun hello-world (greeting) (print greeting)) (hello-world "Hello, World!")Functions do not have variables like they do in imperative languages that maintain arbitrary state
State is kept entirely in the functions, which can then be called in any order.
The pure language was supposed to be based on functions, but it's most
important components - such as lambda expressions, quotes, and conds,
where not functions at all, and instead were called special forms.
Alan Kay, Early History of Smalltalk
Imperative programming leads to "spaghetti-code" that is nearly impossible to maintain.
Functional programming is hard to read, and often described as unnatural to people who like to think in terms of modelling or "step-by-step" algorithms.Alan Kay, as a critique of LISP, invented Smalltalk, the first object-oriented programming language.
Objects are a kind of mapping whose values are its behaviors
Alan Kay, Early History of Smalltalk
Objects combine the variables that contain the state of the object as well as a finite set of functions that modify these variables.
Objects are black-boxes to hide complexity, since only an object can correctly navigate its state.
public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } }Planning could then be done informally English, and these notes would later serve as commentaries and guides to the writing of the actual code.
public class Bicycle { public int gear; public int speed; public Bicycle(int startSpeed, int startGear) { gear = startGear; speed = startSpeed; } public void setGear(int newValue) { gear = newValue; } public void applyBrake(int decrement) { speed -= decrement; } public void speedUp(int increment) { speed += increment; } } Bicycle my_red_bike(10, 3) = new Bicycle;
Inheritance is extending an existing class with new variables and functions.
public class MountainBike extends Bicycle { public int seatHeight; public MountainBike(int startHeight, int startSpeed, int startGear) { super(startSpeed, startGear); seatHeight = startHeight; } public void setHeight(int newValue) { seatHeight = newValue; } } MountainBike my_blue_bike = new MountainBike(12,11,5)
Polymorphism is the ability to use the functions an object inherited on an object itself. Since objects that extend simpler objects contain all their variables and functions, this is safe.
Transcript show: 'Hello, world!'.
Early Binding must bind all the objects (data, functions,..) to the program at compile-time.
Late Binding must bind all the objects to the program at run-time.
Code may be ran through interpreters that executes the code on a virtual machine, a machine that simulates another, often simpler, machine in software, to escape the arbitrariness of the hardware.
Important data may not be local and easily accessible, and the programming environment is open-ended (virtually non-finite) and diverse!
New programming languages have arisen that make programming easier by building in fundamental Web constructs: Perl, Python, Ruby...Javascript that powers the Web 2.0 includes the very idea of client-side programming, while PHP allows server-side code to be put in web pages.
Most of these share characteristics with object-oriented programming, although none are peer-to-peer and truly have late binding.What programming language would aliens use?
The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures.
Frederick P. Brooks
Programming Languages as Experimental Epistemology: Do programming languages model ways of knowing the world? In which case, which are the most easy-to-learn and effective?