cf2014 - code matters

33
Code Matters @dankogai

Upload: dankogai

Post on 14-Jun-2015

792 views

Category:

Social Media


5 download

DESCRIPTION

「コードをしたためる」ということは「プログラマー」という「職人」の「仕事」だと巷では認識されているようです。 その認識が誤りで、どう誤りで、誤った認識のままだと何がおこるのか。本講演がその認識を改めるきっかけとなれば幸いです。

TRANSCRIPT

Page 1: CF2014 - Code Matters

Code Matters@dankogai

Page 2: CF2014 - Code Matters

What’s Code?

Page 3: CF2014 - Code Matters

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

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 7: CF2014 - Code Matters

An Example

Page 8: CF2014 - Code Matters

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

Physics vs. Logics

Page 10: CF2014 - Code Matters

Physics: conservation

Page 11: CF2014 - Code Matters

Physics: conservation•Mass + Energy •Moment •Angular Moment •Electric Charges •…

Page 12: CF2014 - Code Matters

Physics: conservationTo give something, it must be taken from somewhere.

Page 13: CF2014 - Code Matters

Logics: propagation

Page 14: CF2014 - Code Matters

Logics: propagation•Copying is easier than moving

•To move something, you first copy then delete the original

Page 15: CF2014 - Code Matters

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

Economics: Physics or Logics?

Page 17: CF2014 - Code Matters

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

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

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

Our Reality != Physics

Page 21: CF2014 - Code Matters

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

Adjusted to Perception• A physically impossible

building

• Looks so real

• Why?

Page 23: CF2014 - Code Matters

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

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

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

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

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

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

Q. Why did Apple Make iPhones Big?

Page 30: CF2014 - Code Matters

Don’t bet against the code

Page 31: CF2014 - Code Matters

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

That’s it - for nowfor q in questions { q.answer()}

Page 33: CF2014 - Code Matters

Further Reading小飼弾のコードなエッセイ

小飼弾

技術評論社

ISBN:978-4774156644