Programming

For non-programmers

Starting in a bit...

Available online

Feel free to click along!

Lecture URL QRCode

http://tinyurl.com/programming-teaser

What is programming?

Introduction to 'Programming for non-programmers'


November 2, 2014

Mathijs de Bruin / @mathijsfietst

Fear and magic

“Any sufficiently advanced technology is indistinguishable from magic.”
— Arthur C. Clarke

Play with it!

It's fun when you are in control!


(Plus you'll call me with more interesting questions…)

Today's topics

Now to tell you what I'm going to tell you.


  • History
  • Mathematics
  • Philosophy

Today's topics

Now to tell you what I'm going to tell you.


Perspective

Today's topics

Now to tell you what I'm going to tell you.


  1. What are computers?
  2. How do they work?
  3. Discussion: What would you do with them?

Today's topics

Now to tell you what I'm going to tell you.


  1. What are computers?
  2. How do they work?
  3. Discussion: What would you do with them?

What are computers?

It's all about the war!*

* Check out Cryptonomicon by Neal Stephenson

Bletchley Park

‘Sending numbers through the floor’

Code breakers

(Mostly women)

Enigma

The little fascist mystery box

Alan Turing

Cracked the codes and won the war

Murdered

By whose freedom he fought for

Murdered

Because he was gay

Invented

The electronic computer

Invented

The universal Turing machine

The Turing Machine

Hyphothetical computer which can:

  • Read, write or erase symbols (0's and 1's) on an tape
  • Depending on read symbols: move tape left or right
  • Remember a finite amount of previously read state

The Turing Machine

People actually built this thing!

The Turing Machine

A Universal Computer which can do

Anything*

Any other machine could do

*Ok, any information processing.

Any

‘universal computer’ can emulate

Every

other computer

Some examples

Universal Computers

Can do

Anything

Universal Computers

Do

Everything

But wait

It got invented before!

1850

The Difference Engine*

* Read The Difference Engine by William Gibson and Bruce Sterling

Charles Babbage

Invented

A fully mechanical computer

 

First programmer

Ada Byron

Lady Lovelace

First program

Calculation of Bernoulli numbers

Published 1843

Ada Byron

Conceived of:

  • Computer graphics
  • Programmtically composed music
  • Scientific and non-scientific computing

Today's topics


  1. What are computers?
  2. How do they work?
  3. Discussion: What would you do with them?

Mathematics

It's fun. No, really!

Just that calculations suck, allright.

Analog vs. digital

Analog

Digital

0, 1 and everything in between   0, 1 and nothing else
Infinite amount of values Only 2 values possible
Continuous mathematics Discrete mathematics

Boolean logic

1's and 0's

True or False

Yes or No

High or Low

George Boole, A Treatise on the Calculus of Finite Differences

George Boole

1860

Boolean numbers

Count like a machine!

Binary Decimal
0 0
1 1
So far, so good…
10 2
11 3
100 4
101 5
110 6

Bits, bytes

(and nibbles)

Amount Example Name Values
1 0 bit 22 = 2
4 1011 nibble 24 = 16
8 10001010 byte 28 = 256
1024⨯8 kilobyte 21024⨯8
10242⨯8 megabyte 210242⨯8
10243⨯8 gigabyte 210243⨯8
10244⨯8 terabyte 210244⨯8
10245⨯8 petabyte 210245⨯8

Boolean operators

AND, OR, NOT, XOR, …

Hardware: Logic gate

Real world boolean operators

Electronic switches

Evolution of computer technology

  1. Relays
  2. Vacuum tubes
  3. Transistors
  4. Integrate circuits (chips)

1941: relays

Z3 by Konrad Zuse

2000 switches

1946: vacuum tubes

ENIAC by J. Mauchly and J.P. Eckert

about 20.000 switches

1962: transistors

Atlas

about 80.000 switches

1971: Chips/IC's*

Intel 4004

about 2.300 switches per chip

* Integrated Circuits

2014: Modern IC's

Intel Core i7

about 731.000.000 switches per chip

Moore's law

“The number of transistors incorporated in a chip will approximately double every 24 months.”
— Gordon Moore

Today's topics


  1. What are computers?
  2. How do they work?
  3. Discussion: What would you do with them?

With programming

Anything is possible.

What would you make a computer do?

Your work?

Drive your car?

Food production?

Make music?

Philosophy?

Thanks!

Hope to see you at the workshop!

Programming for non-programmers


November 2, 2014

Mathijs de Bruin / @mathijsfietst