Creative Computing

Joel Gethin Lewis

Week 3: Lecture 5: Functions

What I'm going to talk about now:

  1. Group meditation.
  2. Questions?
  3. Functions and recursion.
  4. The Jacquard Loom, Charles Babbage and Ada Lovelace.
  5. Pāṇini, al-Khwarizmi, al-Jazari, Alan Turing, Tommy Flowers, Grace Hopper, Margaret Hamilton, Bugs and Hacking.
  6. Feedback.
  7. Homework Assignment - exercises from Code as Creative Medium - Curves
Are you recording Joel? Have you taken the register first?

0. Group Meditation

  1. TBC.

1. Questions?

2. Functions and recursion.

  • Instead of writing long lists of commands, one after another, functions allow programmers to package up functionality into smaller mini programs, known as functions or subroutines.
  • Take input and return an output - an example might be a function that returns the square of an input number, or as complicated as the answer to everything.
  • Recursion is when something is defined in terms of itself. Recursive humour is funny. Recursion is also found in graphic design, art and cooking. In computer science recursion is when a function calls itself repeatedly. The method of working out the Factorial of any number is a classic example.
  • A fractal is a good example of something that is visually recursive.

3. The Jacquard Loom, Charles Babbage and Ada Lovelace.

  • The Jacquard Loom was the worlds first programmable object.
  • Charles Babbage is the inventor of the concept of a digital computer. Babbage was aware of the Jacquard Loom and expanded upon the punch card to invent both the Difference Engine and the Analytical Engine.
  • Ada Lovelace was the worlds first computer programmer, even realising that the computer could be used to make music and art.

4. Pāṇini, al-Khwarizmi, al-Jazari, Alan Turing, Tommy Flowers, Grace Hopper, Margaret Hamilton, Bugs and Hacking.

  • Pāṇini pioneered a grammar that incorporated metarules and recursion - making the first formal language.
  • Muhammad ibn Musa al-Khwarizmi formalised algebra, his name gave rise to the word algorithm and introduced the decimal system to the western world.
  • Ismail al-Jazari invented programmable machines, including programmable humanoid robots and an astronomical clock considered the first programmable analogue computer.

4. Pāṇini, al-Khwarizmi, al-Jazari, Alan Turing, Tommy Flowers, Grace Hopper, Margaret Hamilton, Bugs and Hacking (continued).

  • Alan Turing formalised the concept of the algorithm and computation in general. During the Second World War he led the team that broke German Naval codes. He went on to design one of the first stored program computers and did pioneering work in Morphogenesis, or how living things form themselves. He was prosecuted by the British Government for being gay, and committed suicide in 1954. If an system is capable of general computation it is said to be Turing complete. The Turing test is a test of machine intelligence in comparison to human intelligence.
  • Tommy Flowers was the engineer who built Turing's machine.

4. Pāṇini, al-Khwarizmi, al-Jazari, Alan Turing, Tommy Flowers, Grace Hopper, Margaret Hamilton, Bugs and Hacking (continued).

5. Feedback

  • What's working?
  • What's not working?
  • What am I missing?
  • Lets talk now or you can Slack me in private.

6. Homework assignment!

Thanks!