Definitions

The goal of this note is to reflect on the notion of definition, as documented in the accompanying slides.

Exercise 8

  1. Write a few sentences where Aristotle’s four causes are visible, as in Examples 1 (page 31) to 4 (page 34) in the accompanying slides.
  2. Write a few paragraphs where Aristotle’s four causes are visible.
Harald: So we need to do what?
Mimer (patiently): You need to write several sentences and several paragraphs.
Alfrothul: Several sentences and several paragraphs about what?
Mimer: Any topic you fancy.
Brynja: And we write them how?
Mimer: In a way such that Aristotle’s four causes are visible.
Vigfus: Er... Why do we need to do this?
Mimer: To acquire control over your narratives. “I code, therefore I don’t need to think” is no way to go.
René Descartes: This is getting interesting. Do you guys need a chairperson?
Mimer: Mr. Descartes, thanks for stopping by!

Exercise 9

Compose a definition with your eyes open:

  1. by genus and species (i.e., by type and differences), and
  2. using (some or all of) the four causes.

Exercise 10

Write down the four causes of a compiler.

Exercise 11

Write down the four causes of an interpreter.

Where are we and where do we go from here?

So we have seen that programming languages are notations to express computations, we have seen that programs are things that are written according to this notation, we have seen that programs can be executed to perform a computation, and we have seen that computations are operations over some data. We have seen two examples of programs, interpreters and compilers, that respectively execute and translate other programs. And we have seen how interpreters can execute interpreters and compilers, and how compilers can translate interpreters and compilers. (So now would probably be a good time to take a break and rewatch The Matrix, The Thirteenth Floor, Inception, Paprika, Caprica, eXistenZ, or even, hey, Last Action Hero. And of course, there is always Snow Crash.)

All of that, however, does not quite tell us what a computation is, nor what a notation for computation could be. But they come hand in hand, just like language and thought (one uses language to express one’s thoughts, but one needs to have thoughts to express them in a language). A next lecture note reviews typical notions of computation and the corresponding style of notation: imperative, declarative, etc.

A plea for precision

CONSTANT VIGILANCE!

Alastor “Mad Eye” Moody

A program is something written in a programming language, and a compiler translates a program from one programming language to another. So please pretty please resist the all-too-frequent sloppiness of saying that compilers compile programming languages or that languages run, because they don’t. This nonsense not only hints at muddled thinking, and muddled thinking (“a programming language is when...”, “programming is when...”) does not scale at all in the long run, though it makes for very short job interviews. As Boileau wrote in his Art of Poetry, “what is well understood is delivered clearly”, a French alexandrine. When communicating something, the measure of our understanding is the clarity of our discourse.

So let’s not talk about IT Technology either, nor about online web services, flying UFOs (or unidentified UFO objects, for that matter), and other redundant pleonasms.

Exercise 12

Find a known pleonasm (e.g., an ATM machine, but an automated ATM machine would work too) and invent a plausible one (e.g., a travel journey-quest trip).

Suggestions:

  • Be original. (So the examples in the Wikipedia page about pleonasms are out.)
  • Be mindful. (In the past, several students here at Yale-NUS College pointed out that each of “Ramen noodles” and “Chai tea” is a pleonasm; that was clever.)
  • Be creative. (For example, something like “manga cartoons from Japan” would be good.)

Food for thought:

  • Are your pleonasms syntactic (acronym-based) or semantic (e.g., self-referential)?
RIP In Peace

—Anon.

Exercise 13

Is each of the following terms a pleonasm, a contradiction, or neither?

  1. A good bon mot.
  2. A bad bon mot.
  3. An unsolved mystery.
  4. A solved mystery.
  5. The Solipsists Club.

Exercise 14

Are the following sentences self-referential? (Don’t overthink your answer: these are not trick questions.)

  1. This sentence no verb.
  2. #hashtag
  3. “Français” means “French” in French.
  4. We should not be blind to our own blindness.
  5. We learn from experience that [people] never learn anything from experience. (George Bernard Shaw)
  6. At Yale-NUS College, Intro to CS is as easy as one two one two.
  7. Two women walk into a bar and talk about the Bechdel-Wallace test.
  8. Know thyself.

Justify each of your answers.

In English every word can be verbed.

Alan Perlis‘s programming epigram #59

Exercise 15

Are the following sentences self-referential? (Don’t overthink your answer: these are not trick questions.)

  1. This sentence has has too many verbs.
  2. PLEASE WRITE IN LOWER CASE.
  3. What does the French sentence “Je ne sais pas.” mean in English?
  4. We hold these truths to be self-evident. (The United States Declaration of Independence)
  5. The mandatory exercises may feel beneath you, but you should do them anyhow, so that the exam is not above you.
  6. Fashion is what goes out of fashion. (Coco Chanel)
  7. They come mostly at night. Mostly. (Newt)
  8. Syntactic mispelings.
  9. Semantic nonsense.
  10. But I know it. I know I know. (Luisa Rey)
  11. I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know. (Bill Withers)
  12. This is not a pipe. (René Magritte)
  13. This is a pipe.
  14. The speaker is on speaker.
  15. So your answer is “No”?
  16. Does your parrot bite? (Treasure Island)
  17. Think about this.
  18. The present sentence is not clear.
  19. Spanish spinach.
  20. Spanish spinach.
  21. Spanish spinach.

Exercise 16

Facetiously, Mimer asks Sigbjørn the Fearless whether there exists a word in English that contains all of the vowels “a”, “e”, “i”, “o”, “u”, and “y”, in that order. Does there exist such a word in English?

Possible answers:

  • Yes. Constant vigilance!
  • No.
  • I cannot possibly know this, and furthermore this facetious question about reference is nefariously out of scope in an introductory course about Computer Science.
“Mad Eye” Moody: SOMETHING WRONG WITH YOUR CAPSLOCK KEY?

Exercise 17

Cyrano de Bergerac meets Pinocchio, and they chit-chat amicably. (Cyrano knows full well that Pinocchio’s nose grows whenever he tells a lie, and that it doesn’t whenever he tells the truth.)

Pinocchio takes his handkerchief and sneezes into it. Without removing his handkerchief, he says: “My nose is growing.”

Should Cyrano believe Pinocchio? That is to say: is Pinocchio telling the truth?

Possible answers:

  • Yes he should. If anyone knows his nose, it is Pinocchio.
  • No he should not. If Pinocchio’s nose is growing, he is telling a lie.
  • There is not enough information to say one way and not the other.
  • There is enough information to say both ways: it is a paradox.
  • This is such an insensitive question.

Exercise 18

Pinocchio meets Cyrano de Bergerac, and they chit-chat amicably.

Facetiously, Pinocchio takes his handkerchief and covers his nose with it. Without removing his handkerchief, he says: “My nose is not growing.”

Should Cyrano believe Pinocchio? That is to say: is Pinocchio telling the truth?

Possible answers:

  • Yes he should, because Pinocchio is telling the truth and his nose is not growing.
  • No he should not, because Pinocchio is not telling the truth and his nose is actually growing.
  • There is not enough information to say one way and not the other.
  • There is enough information to say both ways: it is a paradox.
  • Pinocchio should not pick his nose.
Harald: Is the sentence “This is a paradox.” a paradox?
Alfrothul: And what about “This is not a paradox.”?
Loki: I love you guys.

A remark

The present lecture notes are peppered with Wikipedia pointers. Acquire a sense of the raison d’être of these pointers by following several of them.

Version

Added the Perlisism [06 Apr 2020]

Arbitrarily changed the word “men” to “people” in the Shaw quote, after talking with Guo Ziting [20 Jan 2020]

Extended the statement of Exercise 15 [18 Jan 2020]

Adjusted the statement of Exercise 8, fleshed out the statement of Exercise 13, and trimmed the statement of Exercise 14 [17 Jan 2020]

Brynja: The revised translation is an alexandrine, isn’t it?
Mimer: ‘fraid it is.

Added a Socratic dialogue in Exercise 8, revised the translation of Boileau’s alexandrine, and restated Exercise 17 and Exercise 18 [04 May 2019]

Created [14 Jan 2019]