Download - CF2014 - Code Matters
![Page 1: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/1.jpg)
Code Matters@dankogai
![Page 2: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/2.jpg)
What’s Code?
![Page 3: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/3.jpg)
Dictionary says…1.a system of words, letters,
figures, or other symbols substituted for other words, letters, etc., esp. for the purposes of secrecy:
2. Computing program instructions:
3.a systematic collection of laws or regulations:
![Page 4: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/4.jpg)
Dictionary says…1.a system of words, letters,
figures, or other symbols substituted for other words, letters, etc., esp. for the purposes of secrecy:
2. Computing program instructions:
3.a systematic collection of laws or regulations:
![Page 5: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/5.jpg)
Dictionary says…1.暗号
2.軟件
3.法律
![Page 6: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/6.jpg)
What gives?1.Not so easy to read.
2.Not only readable, but executable.
3.Not always executed as written.
![Page 7: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/7.jpg)
An Example
![Page 8: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/8.jpg)
A Pair of Cords of Code• Decoded in 1953
• ATGC = 4 letters = 2 bits
• 3 bases = 1 codon = 6 bits
• 6 billion bases = 1.5 GBytes
• Micro SD card can hold 20 of us (without compression :-)
![Page 9: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/9.jpg)
Physics vs. Logics
![Page 10: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/10.jpg)
Physics: conservation
![Page 11: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/11.jpg)
Physics: conservation•Mass + Energy •Moment •Angular Moment •Electric Charges •…
![Page 12: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/12.jpg)
Physics: conservationTo give something, it must be taken from somewhere.
![Page 13: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/13.jpg)
Logics: propagation
![Page 14: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/14.jpg)
Logics: propagation•Copying is easier than moving
•To move something, you first copy then delete the original
![Page 15: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/15.jpg)
Logics: propagation•Copying is easier than moving
•To move something, you first copy then delete the original
•What happens if you forget to delete the source?
![Page 16: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/16.jpg)
Economics: Physics or Logics?
![Page 17: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/17.jpg)
Economics: Physics or Logics?
•It’s Physics! •If I give you a 10,000 yen, you have 10,000 yen more
and I have 10,000 yen
![Page 18: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/18.jpg)
Economics: Physics or Logics?
•It’s Logics! •I just left 10,000 dollars in my bank account. It is
now 10,300 dollars. Where’s that 300 dollars come from?
![Page 19: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/19.jpg)
Economics: Physics AND Logics
•It conserves spatially •It propagates temporally •It is an emulation of what we look, hear, and feels at
the reality
![Page 20: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/20.jpg)
Our Reality != Physics
![Page 21: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/21.jpg)
Our Reality == Physics + Logics
•See how we design money •Emulates physics, adjusted to our perception
•See how we design UI •Emulates physics, adjusted to our perception
![Page 22: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/22.jpg)
Adjusted to Perception• A physically impossible
building
• Looks so real
• Why?
![Page 23: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/23.jpg)
Physics + Logics ⇒ Real + Imaginary
Fundamental Theorem of Algebra
• The field of complex numbers is Algebraically closed
• You need not only real numbers but also imaginary numbers
![Page 24: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/24.jpg)
Hardware: Physical Economy
•Hardcoded •Cost of production ∝ Number of Units ↓ Inventory required ↓ You have to repair the broken parts to fix it ↑ People are used to paying for it
![Page 25: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/25.jpg)
Software: Logical Economy
•(soft)coded •The cost of single copy ≒ The cost of billion copies ↑ No Inventory required ↑You can fix the broken parts later ↓People are used to paying for it
![Page 26: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/26.jpg)
Hardware + Software = i + P*
• iPhone itself = Physical
• No one else but Samsung can make 200 million of them a year
• iOS = Logical
• Samsung has to import Android to complete the product
![Page 27: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/27.jpg)
Reality changes• Introduced in 2007
• "A Phone, an iPod, an internet communicator"
• People are least impresssed with "an internet communicator"
• 7 years later
• who makes a phone call with smart phones?
![Page 28: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/28.jpg)
Reality changes - but only slowly
• iOS is NOT quite logical
• Look and feel = physics
• > 90% of iOS is used up to emulate physics
• But it is getting less physical generation by generation
• iOS6 -> iOS7
![Page 29: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/29.jpg)
Q. Why did Apple Make iPhones Big?
![Page 30: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/30.jpg)
Don’t bet against the code
![Page 31: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/31.jpg)
Don’t bet agains the code• (Unless you are a scholar)
• When physics does not work, think logics
• When logics does not work, think physics
• Reality is complex, not real or imaginary.
![Page 32: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/32.jpg)
That’s it - for nowfor q in questions { q.answer()}
![Page 33: CF2014 - Code Matters](https://reader034.vdocuments.us/reader034/viewer/2022042815/557cf757d8b42a89158b4a65/html5/thumbnails/33.jpg)
Further Reading小飼弾のコードなエッセイ
小飼弾
技術評論社
ISBN:978-4774156644