Upload
chun-yu-tseng
View
1.052
Download
1
Embed Size (px)
DESCRIPTION
徵稿中! MOSUT: https://www.facebook.com/groups/mosut/ Tainan.py: http://www.meetup.com/Tainan-py-Python-Tainan-User-Group/
Citation preview
OO x Python你可能不認識的 OOP
Joe @ Tainan.py x MOSUT 2014.09.27
x
We are:
@
O OObject Oriented (物件導向)
# 這個講題超⼤大
O.O?Object Oriented (物件導向)
# 今天將透過⼀一連串的 QA 來討論 OO
來⾃自何⽅方OO 這個概念是怎麼產⽣生的
# 有⼈人知道嗎?
Q1
物件導向 … 這個嘛去看⾺馬克斯的唯物論
來⾃自建築領域 去看 notes on the synthesis of form
只是⼈人類對事物概念模型的類推,會發展出很正常 …
# 無標準答案
有⼈人這樣說
何時現蹤第⼀一個 OO 程式語⾔言什麼時候出現?
# 10 年前? 20 年? 去年?
Q2
何時⼜又現蹤第⼆二個 OO 程式語⾔言什麼時候出現?
# 10 年前? 20 年? 去年
Q3
# 也有⼈人認為他才是第⼀一個「真正」的 OO 語⾔言
何時⼜又+現蹤第 N 個 OO 程式語⾔言什麼時候出現?
# 被揍飛
Q4
C++ 1983
Python 1991
Java 1995
Ruby 1995
# 這裡只摘錄部分的 OO 語⾔言
何謂 OO定義你⾃自⼰己的版本看看
# 想 30 秒
Q5
C++
Python
Java
Ruby
# 這裡只詢問部分的 OO 語⾔言
Alan Curtis Kay
• OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them.
# Smalltalk 發明⼈人
也有⼈人這麼說
然後被打臉 XD
眾說紛紜每個⼈人的切⼊入點都不⼀一樣
# Why
⾒見樹不⾒見林X ⼤大資⼯工
# 對
C++
Python
Java
Ruby
# 數⺫⽬目多寡不代表任何意義
⾒見葉不⾒見樹X ⼤大資⼯工
# 對
C++
# 你點了幾葉的技能點數
如何⾒見林難
# 如果你想要的話 …
Q6
學術⾓角度
考試⾓角度
# 要注意 side-effect
課程⾓角度
# 看⼀一下 Telecom SubParis 的課程好惹
Courses: ⾯面向對象技術⾼高級課程 (北京⼤大學 @ Coursera) https://www.coursera.org/course/aoo # 參考資料全部都有簡體翻譯本 or 有簡中書籍
Introduction to EE and CS (MIT OPEN COURSEWARE) Unit 1-1 Object-Oriented Programming http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/ # 對,物件導向只是課程中的⼀一個⼩小單元
Object Oriented Development (Telecom SubParis) http://www-public.it-sudparis.eu/~gibson/Teaching/CSC7322/ # 參考資料極為廣泛⽽而深⼊入
物件導向程式設計 (台灣交通⼤大學開放課程 - 電機系⼤大⼀一) http://ocw.nctu.edu.tw/course_detail_4.php?bgid=8&gid=0&nid=343#.VB--zpOSw_M # 參考資料乍看就是⼀一本書 (c++)
物件導向軟體⼯工程(成⼤大資⼯工研究所) http://casd.csie.ncku.edu.tw/Object-Oriented_Software_Engineering.html # 參考資料為 http://www.amazon.com/Object-Oriented-Software-Engineering-Practical-Development/dp/0077109082 (java)
其他: 國內少數應數、⼯工科、電機 … 及教育訓練機構可能有開課
MOOCs 列表: https://www.facebook.com/notes/courseramoocs-%E5%90%8C%E5%AD%B8%E6%9C%83/moocs%E5%AD%B8%E7%BF%92%E8%B3%87%E6%BA%90/533988876640975 # OO 的課程其實沒有⾮非常多
⾒見樹國內課程以⾒見樹居多
# C++ or Java
不⾒見嚴格來講國內沒什麼課程 or 開在研究所
# x ⼤大資⼯工
幹嘛今天
# ????
Q7
⾒見葉神⽊木之葉
# 請愛⽤用英⽂文版 wiki
# Object-oriented programming: challenges for the next fifty years
# Object-oriented programming: challenges for the next fifty years
Simulaobject, class, inheritance, virtual method, coroutine,
discrete event simulation, garbage collection
# 看 wiki 上的扣
Simula was influential in the development of Smalltalk[65] and later object-oriented programming languages[66]. It also helped inspire the actor model[67] of concurrent
computation although Simula only supports co-routines[68] and not true concurrency[69].
⾒見葉神⽊木之葉
# 第⼆二棵
# The Early History of Smalltalk
Smalltalk強
# 畫線版 wiki eng wiki
對Q9
還是沒有告訴我 OO 是什麼?
–上半場摘要
「今天透過不告訴你 OO 是什麼,以告訴你其實可以從很多⾯面向看待 OO。」
–下半場摘要
「就只是⼯工商服務 Python」
since 1991
Multi-paradigm• OO
• imperative
• procedural
• functional
• reflective
Zen
TIOBE index
• 優雅⽽而有核⼼心價值
• 可寫/讀性⾼高
• 強型別、動態定型
• ⽀支援多種 programming paradigms
• 有廣⼤大第三⽅方套件
• 跨平台⽽而廣泛被應⽤用在各個領域
• 聽說最近吸引很多 data scientist 跳進來
Python
從何學起官網、線上課程、網路教學
# 如果英⽂文不錯、閱讀能⼒力強 … 可以
# 族繁不及備載,請搜尋 MOOc python
揪團學習法加⼊入社群
http://wiki.python.org.tw/
One more thing江湖傳聞
PyCon APAC/Python (South) Taiwan
敬請期待
Thanks歡迎發問
# 橋 10 ⽉月份聚會時間? 10/18 成⼤大?