principles of programming jacques carette
play

Principles of Programming Jacques Carette McMaster University Week - PowerPoint PPT Presentation

Principles of Programming Jacques Carette McMaster University Week of September 7, 2016 Algorithms and Programs Old: > 2500 years Babylonians: arithmetic, compound interest, compute length of hypothenuse of right triangle. J.Carette


  1. Principles of Programming Jacques Carette McMaster University Week of September 7, 2016

  2. Algorithms and Programs Old: > 2500 years ◮ Babylonians: arithmetic, compound interest, compute length of hypothenuse of right triangle. J.Carette (McMaster) CS/SE 2S03 2 / 1

  3. Algorithms and Programs Old: > 2500 years ◮ Babylonians: arithmetic, compound interest, compute length of hypothenuse of right triangle. New: automation. < 300 years. ◮ Jacquard Loom, Basille Bouchon’s loom, Babbage’s Difference Engine, punched cards. J.Carette (McMaster) CS/SE 2S03 2 / 1

  4. Algorithms and Programs Old: > 2500 years ◮ Babylonians: arithmetic, compound interest, compute length of hypothenuse of right triangle. New: automation. < 300 years. ◮ Jacquard Loom, Basille Bouchon’s loom, Babbage’s Difference Engine, punched cards. Problem: encoding the algorithm. J.Carette (McMaster) CS/SE 2S03 2 / 1

  5. Algorithms and Programs Old: > 2500 years ◮ Babylonians: arithmetic, compound interest, compute length of hypothenuse of right triangle. New: automation. < 300 years. ◮ Jacquard Loom, Basille Bouchon’s loom, Babbage’s Difference Engine, punched cards. Problem: encoding the algorithm. ◮ First step: what the hardware can do ⋆ ILLIAC computer, see its instruction set (ex: p.75 of the Manual). J.Carette (McMaster) CS/SE 2S03 2 / 1

  6. Algorithms and Programs Old: > 2500 years ◮ Babylonians: arithmetic, compound interest, compute length of hypothenuse of right triangle. New: automation. < 300 years. ◮ Jacquard Loom, Basille Bouchon’s loom, Babbage’s Difference Engine, punched cards. Problem: encoding the algorithm. ◮ First step: what the hardware can do ⋆ ILLIAC computer, see its instruction set (ex: p.75 of the Manual). ◮ Second: stored program ⋆ Stored program, Von Neumann architecture J.Carette (McMaster) CS/SE 2S03 2 / 1

  7. Algorithms and Programs Old: > 2500 years ◮ Babylonians: arithmetic, compound interest, compute length of hypothenuse of right triangle. New: automation. < 300 years. ◮ Jacquard Loom, Basille Bouchon’s loom, Babbage’s Difference Engine, punched cards. Problem: encoding the algorithm. ◮ First step: what the hardware can do ⋆ ILLIAC computer, see its instruction set (ex: p.75 of the Manual). ◮ Second: stored program ⋆ Stored program, Von Neumann architecture ◮ Third: think of humans a little... ⋆ Fortran was a step forward, but it still had a 3-way branch. ⋆ but things are still bad J.Carette (McMaster) CS/SE 2S03 2 / 1

  8. (Programming) Languages Formal Languages. Syntax and Semantics. ◮ Wikipedia gives a silly definition using strings. Refers to Frege’s Begriffsschrift as an example, but that language is 2-dimensional! ◮ Syntax: Markdown, HTML, official Java grammar ◮ Semantics: operational (how to run), denotational (what it means, using math) J.Carette (McMaster) CS/SE 2S03 3 / 1

  9. (Programming) Languages Formal Languages. Syntax and Semantics. ◮ Wikipedia gives a silly definition using strings. Refers to Frege’s Begriffsschrift as an example, but that language is 2-dimensional! ◮ Syntax: Markdown, HTML, official Java grammar ◮ Semantics: operational (how to run), denotational (what it means, using math) Programming Languages ◮ There are a lot of them. Some are truly bizarre. See Piet. ◮ APL was weird, but almost mainstream. Too dense. ◮ Genealogy and Influence (and more Influence). J.Carette (McMaster) CS/SE 2S03 3 / 1

  10. (Programming) Languages Formal Languages. Syntax and Semantics. ◮ Wikipedia gives a silly definition using strings. Refers to Frege’s Begriffsschrift as an example, but that language is 2-dimensional! ◮ Syntax: Markdown, HTML, official Java grammar ◮ Semantics: operational (how to run), denotational (what it means, using math) Programming Languages ◮ There are a lot of them. Some are truly bizarre. See Piet. ◮ APL was weird, but almost mainstream. Too dense. ◮ Genealogy and Influence (and more Influence). ◮ Why Java? ⋆ Popularity? ⋆ Ecosystem? ⋆ JCP? ⋆ It is statically typed as well as decently designed? J.Carette (McMaster) CS/SE 2S03 3 / 1

  11. (Programming) Languages Formal Languages. Syntax and Semantics. ◮ Wikipedia gives a silly definition using strings. Refers to Frege’s Begriffsschrift as an example, but that language is 2-dimensional! ◮ Syntax: Markdown, HTML, official Java grammar ◮ Semantics: operational (how to run), denotational (what it means, using math) Programming Languages ◮ There are a lot of them. Some are truly bizarre. See Piet. ◮ APL was weird, but almost mainstream. Too dense. ◮ Genealogy and Influence (and more Influence). ◮ Why Java? ⋆ Popularity? ⋆ Ecosystem? ⋆ JCP? ⋆ It is statically typed as well as decently designed? ⋆ All, of course! J.Carette (McMaster) CS/SE 2S03 3 / 1

  12. What is a Programming Language? Has a grammar which can be checked Is executable Is a medium of communication: Human ⇐ ⇒ Program ⇐ ⇒ Machine J.Carette (McMaster) CS/SE 2S03 4 / 1

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend