2
Day 1 lecture
j edited this page 2023-03-29 20:54:44 +02:00
Big picture:
- What's right for the people?
- Types represent what the people want. They must be correct. Only money should be money.
- Types must also be precise enough to do the job.
- You must keep their data secure, with trustable integrity.
- Introductions
- The importance of literate coding https://en.wikipedia.org/wiki/Literate_programming Who is your audience, who isn't your audience, what do they want? What do they really want? Applied nemawashi.
- Type systems and human limitations
diameter = 10
pi = 3.14159
length = diameter * pi
- Strong vs weak typing
- Implicit return values
- Breaking down code: 1) what is the input and its types? 2) what is the output type? 3) check the arguments
- Interlude: C, how older machines worked, godbolt.com
- The importance of data integrity in addition to security
- "Big data", Excel bugs
- Security implications: https://cwe.mitre.org/data/definitions/136.html
- http://www.hustlelabs.com/stuff/bh2009_dowd_smith_dewey.pdf
- Differences between academic research and online research, arxiv, convention standards
- LaTeX
Reading notes:
Unicode characters are bad when it comes to input data, and must be filtered appropriately using tools like the unicodedata module. account_balance = "🐶" could take down a bank.
Note that python code is also data, and tricks like character encoding confusion can be used to hide code in third-party modules which the Python interpreter will happily execute.
Whitespace to describe block scope via indentation in Python is a clever way to take advantage of the brain's natural hardware to see blank areas, because in combination with movement, it uses that hardware to help you duck when something's coming toward you at high speed.