<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # Chapter 0 Preface 前言 ## The strange history of this book > 本書的奇幻歷史 In January 1999 I was preparing to teach an introductory programming class in Java. I had taught it three times and I was getting frustrated. The failure rate in the class was too high and, even for students who succeeded, the overall level of achievement was too low. > 在1999年1月的時候呢,我正準備教一門Java的入門編程課。我當時已經教過三次了,受挫感很強。班上掛科率特別高,而且即使那些沒掛科的學生編程的整體水平也特別低。 One of the problems I saw was the books. They were too big, with too much unnecessary detail about Java, and not enough high-level guidance about how to program. And they all suffered from the trap door effect: they would start out easy, proceed gradually, and then somewhere around Chapter 5 the bottom would fall out. The students would get too much new material, too fast, and I would spend the rest of the semester picking up the pieces. > 當時有很多問題,我首先發現的就是教材。那些教材都特別大部頭,有很多關于Java的細節,特別瑣碎又并不重要,而且也沒有足夠的關于如何編程的高層次指導(譯者注:就是缺乏戰略性指導,沒有告訴學生編程的心法)。這些教材總有一些『陷阱門效應』:開頭他們都卻是挺簡單,然后逐步提升,接著突然在某個地方,比如第五章,出現很坑很復雜的陷阱。學生們要突然一下子應對太多新東西,甚至措手不及,而我作為教師就得花費整個后半個學期來一點點給學生們補上。 Two weeks before the first day of classes, I decided to write my own book. My goals were: > 開課的兩周之前,我最終決定要寫個自己的教科書。目標如下: * Keep it short. It is better for students to read 10 pages than not read 50 pages. > 簡短。讓學生讀10頁就夠比讓他們讀50頁效果好得多。 * Be careful with vocabulary. I tried to minimize jargon and define each term at first use. > 降低詞匯難度。我盡量把術語用量降到最低,并且在首次使用的時候對每一個都進行定義。 * Build gradually. To avoid trap doors, I took the most difficult topics and split them into a series of small steps. > 循序漸進。為了避免『陷阱門效應』,我專門把這些最為復雜的部分抽離成一個個專題,并且都切分成小規模的部分,一步步來進行。 * Focus on programming, not the programming language. I included the minimum useful subset of Java and left out the rest. > 專注于編程,而不是編程語言。我只保留了關于Java的最小規模內容,沒有涉及更多的細節。 I needed a title, so on a whim I chose How to Think Like a Computer Scientist. > 我還需要個標題,就突發奇想,選了個標題叫做『如何像計算機科學家一樣思考』。 My first version was rough, but it worked. Students did the reading, and they understood enough that I could spend class time on the hard topics, the interesting topics and (most important) letting the students practice. > 我的第一版教材很粗糙,但挺管用。學生真能看進去,并且理解了我在課上所講的那些難點和有趣的專題,最重要的是,他們能夠據此來實踐。 I released the book under the GNU Free Documentation License, which allows users to copy, modify, and distribute the book. > 之后我就以GNU自由文檔協議來發布了這本書,這一協議允許所有人去復制、修改以及分發這本書。 What happened next is the cool part. Jeff Elkner, a high school teacher in Virginia, adopted my book and translated it into Python. He sent me a copy of his translation, and I had the unusual experience of learning Python by reading my own book. As Green Tea Press, I published the first Python version in 2001. > 接下來的事情很有趣了。Jeff Elkner,維吉尼亞的一位高中教師,他很欣賞我這本書,把這本書從Java翻譯成了Python的版本。他發給我一份『譯稿』,然后我開啟了閱讀『自己的書』來學習Python的奇妙經歷。于是在2001年,我通過Green Tea Press出版了本書的第一個Python版本。 In 2003 I started teaching at Olin College and I got to teach Python for the first time. The contrast with Java was striking. Students struggled less, learned more, worked on more interesting projects, and generally had a lot more fun. > 在2003年,我開始在奧林商學院教學,并且第一次開始教Python了。這和Java的對比很鮮明。學生們省力多了,學得也更多了,在有趣的項目上也更努力,整體上都覺得這一學習過程很有樂趣。 Since then I’ve continued to develop the book, correcting errors, improving some of the examples and adding material, especially exercises. > 從那以后,我就繼續維護這本書,修正錯誤,改進樣例、附加資料以及練習題。 The result is this book, now with the less grandiose title Think Python. Some of the changes are: * I added a section about debugging at the end of each chapter. These sections present general techniques for finding and avoiding bugs, and warnings about Python pitfalls. * I added more exercises, ranging from short tests of understanding to a few substantial projects. Most exercises include a link to my solution. * I added a series of case studies—longer examples with exercises, solutions, and discussion. * I expanded the discussion of program development plans and basic design patterns. * I added appendices about debugging and analysis of algorithms. > 結果就產生了現在這本書,現在標題簡化了很多——Think Python。主要的改變如下: > * 在每一章的末尾,我加了關于debug的部分。這些內容提供了關于debug的一些整體策略,比如如何找到和避免bug,還有就是關于Python一些陷阱進行了提醒。 > * 我加了更多的練習,從簡單的理解方面的測試,到一些比較充足的項目。大多數練習都有解決方案的樣本鏈接。 > * 我還添加了一些案例研究,包含練習、解決方案和討論的更大規模的樣例。 > * 此外我還擴展了關于程序開發規劃和基本設計模式的討論。 > * 關于debug和算法分析,還額外加了一些附錄。 The second edition of Think Python has these new features: * The book and all supporting code have been updated to Python 3. * I added a few sections, and more details on the web, to help beginners get started running Python in a browser, so you don’t have to deal with installing Python until you want to. * For Chapter 4.1 I switched from my own turtle graphics package, called Swampy, to a more standard Python module, turtle, which is easier to install and more powerful. * I added a new chapter called “The Goodies”, which introduces some additional Python features that are not strictly necessary, but sometimes handy. > 這本Think Python 的第二版有如下的新內容: > * 本書內的所有參考代碼都升級到Python3了。 > * 我增加了一部分內容,以及一些關于web方面的細節,這是為了幫助初學者能夠在瀏覽器中開始嘗試Python,這樣即便你不想安裝Python也沒問題了。 > * 在第四章的第一節,我把我自己的一個原來叫做Swampy的小烏龜圖形包轉換撐了一個更標準的Python模塊,名字叫做turtle,更好安裝,功能也比之前強大了。 > * 我還添加了新的一章,叫做『彩蛋』,介紹了一些Python的額外功能,嚴格來說,這些功能并不算必備的,但有時候蠻好用的。 I hope you enjoy working with this book, and that it helps you learn to program and think like a computer scientist, at least a little bit. > 我希望大家能享受學習這本書的過程,也希望這本書能幫助大家學習編程,并且讓大家學會像計算機科學家一樣思考,哪怕有一點點也好。 Allen B. Downey > 艾倫 唐尼 Olin College > 奧林商學院 ## Acknowledgments > ##致謝 Many thanks to Jeff Elkner, who translated my Java book into Python, which got this project started and introduced me to what has turned out to be my favorite language. > 非常感謝Jeff Elkner,是他把我的Java教材翻譯成了Python,才引起了這一項目的開始,并且也把Python語言介紹給我,它已經是我最喜歡的編程語言了。 Thanks also to Chris Meyers, who contributed several sections to How to Think Like a Computer Scientist. > 也要感謝Chris Meyers,他對『如何像計算機科學家一樣思考』的一些章節有貢獻。 Thanks to the Free Software Foundation for developing the GNU Free Documentation License, which helped make my collaboration with Jeff and Chris possible, and Creative Commons for the license I am using now. > 感謝自由軟件基金會,是他們提出了GNU自由文檔協議,在這一協議的幫助下,我和Jeff以及Chris的合作成為了可能,當然也要感謝我現在使用的知識共享協議。 Thanks to the editors at Lulu who worked on How to Think Like a Computer Scientist. > 感謝Lulu的編輯們,他們出版了『如何像計算機科學家一樣思考』。 Thanks to the editors at O’Reilly Media who worked on Think Python. > 感謝O’Reilly公司的編輯們,他們出版了這本『Think Python』。 Thanks to all the students who worked with earlier versions of this book and all the contributors (listed below) who sent in corrections and suggestions. > 最后還要感謝所有曾對本書早期版本做出過貢獻的同學們,以及其他參與改錯和提出建議的朋友們(列表如下)。 ### Contributor List > ###貢獻列表 More than 100 sharp-eyed and thoughtful readers have sent in suggestions and corrections over the past few years. Their contributions, and enthusiasm for this project, have been a huge help. > 百名以上目光敏銳又思維迅捷的讀者都在過去的這些年里發來了各種建議或是發現了各種錯誤。他們貢獻和熱情都是對本項目的巨大幫助。 If you have a suggestion or correction, please send email tofeedback@thinkpython2.com. If I make a change based on your feedback, I will add you to the contributor list (unless you ask to be omitted). > 如果大家有任何意見建議,請發郵件到feedback@thinkpython2.com聯系我們。如果基于反饋做出了修改,我會將你添加到貢獻列表(當然你不想被添加也可以的)。 If you include at least part of the sentence the error appears in, that makes it easy for me to search. Page and section numbers are fine, too, but not quite as easy to work with. Thanks! > 希望你能至少把出錯句子的一部分提供出來,這都讓我更容易去搜索。頁碼和章節編號也可以,但不太容易找。多謝了! (譯者注:以下貢獻列表不翻譯了)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看