《Programming from the Ground Up》學習第1天,p1-18總結,總計18頁。
一、技術總結
1.fetch-execute cycle
p9, The CPU reads in instructions from memory one at a time and executes them. This is known as the fetch-execute cycle。
2.general-purpose vs special-purpose
(1)general-purpose: 通用的,翻譯的時候為了簡潔性,可省略“的”字。例如:general-purpose register——通用暫存器。
(2)special-purpose:專用的,翻譯的時候為了簡潔性,可省略“的”字。例如:special-purpose register——專用暫存器。當然,也可以翻譯成“特殊的”。
3.addressing mode
(1)immediate mode(立即定址)
(2)direct addressing mode(直接定址)
(3)register addressing mode(暫存器定址)
(4)indexed addressing mode(變址定址)
(5)indirect addressing mode(間接定址)
(6)base pointer addressing mode(基址定址)
其實這裡是重點,但是書中沒有詳細的例子,這裡先了解概念,繼續往下讀。
二、英語總結
1.with style
p1, I enjoy the challenge to not only make a working program, but to do so with style。
“with style”的意思是“put some thougt, design and so on into sth, and make sth impressive”。style在這裡指的是程式設計風格,例如:谷歌的程式設計風格指南https://google.github.io/styleguide/。
2.concept vs conception
參考stackexchange(https://ell.stackexchange.com/questions/7620/concept-and-conception)的回答:
You use conception when talking about an idea or notion that someone has. When used in this sense, it always belongs to someone, or to a group of people. A concept is simply an idea or notion, in an abstract sense. It belongs to no one.
For example, you and I may agree that:
Freedom is a concept.
...in that we both agree that there exists an idea called "freedom." However, it is possible that:
Your conception of freedom differs from mine.
...in that if we were both asked to define freedom, we would give two different answers. Your mental model of the concept of freedom is your conception of it.
3.frustrate
p1, Most introductory books on programming frustrate me to no end。
frustrate: to make sb feel annoyed or less confident(使xxx沮喪)。
to no end: 無止境的。
所以這句話的意思是“大多數關於程式設計的介紹性書籍都讓我感到無止境的沮喪”。其實自己是理解英文的意思的,但是還想翻譯成中文,這個習慣不好。理解英文後應該繼續往下讀。
4.base on vs base off of
p7, Modern computer architecture is based off of an architecture called the Von Neumann architecture, named after its creator。
在這句話中base off of可以寫作base off, 也可以使用base on/base upon。base off美式英語中用得多一點,不那麼正式(casual)。base on英式英語中用得多一點,更正式一點(formal)。
5.divide up into vs divide into
p7, The Von Neumann architecture divides the computer up into two main parts - the CPU(Central Processing Unit) and the memory。
這裡的divide up into可以使用divide into代替。雖然兩者意思差不多,但使用up的時候,有“至多”之意,這種用法比較普遍。
三、其它
1.為什麼看這本書?
在看《Compilers: Principles, Techniques and Tools》時,裡面有些跟彙編相關的內容,於是想找一些跟彙編有關的書,便發現了這本《Programming From The Ground Up》,讀起來挺有意思的——比如作者說“第一遍看不懂,那就看第二遍;還是看不懂,暫且先記住它,後面再回頭看”。當然,其實《Programming From The Ground Up》這本書不是介紹組合語言的,而是已組合語言作為示例讓大家入門程式設計的。既然覺得有意思,那就看看吧,反正也就326頁。
2.學習方法
p2, If you don't understand something the first time, reread it. If you still don't understand it, it is sometimes best to take it by faith and come back to it later. Ofter after more exposure to programming the ideas will make more sense.
四、參考資料
1. 程式設計
(1)Jonathan Bartlett,《Programming From The Ground Up》:https://book.douban.com/subject/1787855/
2. 英語
(1)Etymology Dictionary:https://www.etymonline.com
(2) Cambridge Dictionary:https://dictionary.cambridge.org
歡迎搜尋及關注:程式設計人(a_codists)