├── LICENSE ├── README.md ├── TeachYourselfCS-CN.md └── TeachYourselfCS.md /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | 307 | including for purposes of Section 3(b); and 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public 411 | licenses. Notwithstanding, Creative Commons may elect to apply one of 412 | its public licenses to material it publishes and in those instances 413 | will be considered the “Licensor.” The text of the Creative Commons 414 | public licenses is dedicated to the public domain under the CC0 Public 415 | Domain Dedication. Except for the limited purpose of indicating that 416 | material is shared under a Creative Commons public license or as 417 | otherwise permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the 425 | public licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TeachYourselfCS-CN 2 | 3 | [![License](https://img.shields.io/github/license/keithnull/TeachYourselfCS-CN)](https://github.com/keithnull/TeachYourselfCS-CN/blob/master/LICENSE) 4 | 5 | [TeachYourselfCS](https://teachyourselfcs.com/) 的中文翻译。 6 | 7 | A Chinese translation of [TeachYourselfCS](https://teachyourselfcs.com/). 8 | 9 | ## 导航 Navigation 10 | 11 | * [原网页 Original](https://teachyourselfcs.com/) 12 | * [中文翻译 Chinese](TeachYourselfCS-CN.md) 13 | * [英文原版 English](TeachYourselfCS.md) 14 | -------------------------------------------------------------------------------- /TeachYourselfCS-CN.md: -------------------------------------------------------------------------------- 1 | # 自学计算机科学 2 | 3 | > 本文档是对 [TeachYourselfCS](https://teachyourselfcs.com) 内容的中文翻译,原作者为 [Ozan Onay](https://twitter.com/oznova_) 和 [Myles Byrne](https://twitter.com/quackingduck)。如需了解翻译相关信息或帮助改进翻译,请参见 [本文档结尾](#这份指引是谁翻译的)。 4 | > 5 | > This document is a Chinese translation of [TeachYourselfCS](https://teachyourselfcs.com), which is written by [Ozan Onay](https://twitter.com/oznova_) and [Myles Byrne](https://twitter.com/quackingduck). For more information about this translation, please refer to [the end of this document](#这份指引是谁翻译的). 6 | 7 | 如果你是一个自学成才的工程师,或者从编程培训班毕业,那么你很有必要学习计算机科学。幸运的是,不必为此花上数年光阴和不菲费用去攻读一个学位:仅仅依靠自己,你就可以获得世界一流水平的教育💸。 8 | 9 | 互联网上,到处都有许多的学习资源,然而精华与糟粕并存。你所需要的,不是一个诸如「200+ 免费在线课程」的清单,而是以下问题的答案: 10 | 11 | * 你应当学习 **哪些科目**,为什么? 12 | * 对于这些科目,**最好的书籍或者视频课程** 是什么? 13 | 14 | 在这份指引中,我们尝试对这些问题做出确定的回答。 15 | 16 | ## 简而言之 17 | 18 | 大致按照列出的顺序,借助我们所建议的教材或者视频课程(但是最好二者兼用),学习如下的九门科目。目标是先花 100 到 200 个小时学习完每一个科目,然后在你职业生涯中,不时温习其中的精髓🚀。 19 | 20 | | 科目 | 为何要学? | 最佳书籍 | 最佳视频 | 21 | |-|-|-|-| 22 | | [编程](#编程) | 不要做一个「永远没彻底搞懂」诸如递归等概念的程序员。 | [《计算机程序的构造和解释》](https://book.douban.com/subject/1148282/) | Brian Harvey’s Berkeley CS 61A | 23 | | [计算机系统结构](#计算机系统结构) | 如果你对于计算机如何工作没有具体的概念,那么你所做出的所有高级抽象都是空中楼阁。 | [《深入理解计算机系统》](https://book.douban.com/subject/26912767/) | Berkeley CS 61C | 24 | | [算法与数据结构](#算法和数据结构) | 如果你不懂得如何使用栈、队列、树、图等常见数据结构,遇到有难度的问题时,你将束手无策。 | [《算法设计手册》](https://book.douban.com/subject/4048566/) | Steven Skiena’s lectures | 25 | | [数学知识](#数学知识) | 计算机科学基本上是应用数学的一个「跑偏的」分支,因此学习数学将会给你带来竞争优势。 | [《计算机科学中的数学》](https://book.douban.com/subject/33396340/) | Tom Leighton’s MIT 6.042J | 26 | | [操作系统](#操作系统) | 你所写的代码,基本上都由操作系统来运行,因此你应当了解其运作的原理。 | [《操作系统导论》](https://book.douban.com/subject/33463930/) | Berkeley CS 162 | 27 | | [计算机网络](#计算机网络) | 互联网已然势不可挡:理解工作原理才能解锁全部潜力。 | [《计算机网络:自顶向下方法》](https://book.douban.com/subject/30280001/) | Stanford CS 144 | 28 | | [数据库](#数据库) | 对于多数重要程序,数据是其核心,然而很少人理解数据库系统的工作原理。 | *[Readings in Database Systems](https://book.douban.com/subject/2256069/)* (暂无中译本) | Joe Hellerstein’s Berkeley CS 186 | 29 | | [编程语言与编译器](#编程语言与编译器) | 若你懂得编程语言和编译器如何工作,你就能写出更好的代码,更轻松地学习新的编程语言。 | *[Crafting Interpreters](https://craftinginterpreters.com/)* | Alex Aiken’s course on Lagunita | 30 | | [分布式系统](#分布式系统) | 如今,**多数** 系统都是分布式的。 | [《数据密集型应用系统设计》](https://book.douban.com/subject/30329536/) | MIT 6.824 | 31 | 32 | ## 还是太多? 33 | 34 | 如果花几年时间自学 9 门科目让人望而却步,我们建议你只专注于两本书:**《深入理解计算机系统》** 和 **《数据密集型应用系统设计》**。根据我们的经验,投入到这两本书的时间可以获得极高的回报率,特别适合从事网络应用开发的自学工程师。这两本书也可以作为上面表格中其他科目的纲领。 35 | 36 | ## 为什么要学习计算机科学? 37 | 38 | 软件工程师分为两种:一种充分理解了计算机科学,从而有能力应对充满挑战的创造性工作;另一种仅仅凭着对一些高级工具的熟悉而勉强应付。 39 | 40 | 这两种人都自称软件工程师,都能在职业生涯早期挣到差不多的工资。然而,随着时间流逝,第一种工程师不断成长,所做的事情将会越来越有意义且更为高薪,不论是有价值的商业工作、突破性的开源项目、技术上的领导力或者高质量的个人贡献。 41 | 42 | > 全球短信系统每日收发约 200 亿条信息,而仅仅靠 57 名工程师,现在的 WhatsApp 每日收发 420 亿条。 43 | > 44 | > — Benedict Evans (@BenedictEvans) [2016 年 2 月 2 日](https://twitter.com/BenedictEvans/status/694342874729545729) 45 | 46 | 第一种工程师总是寻求深入学习计算机科学的方法,或是通过传统的方法学习,或是在职业生涯中永无止息地学习;第二种工程师 47 | 通常浮于表面,只学习某些特定的工具和技术,而不研究其底层的基本原理,仅仅在技术潮流的风向改变时学习新的技能。 48 | 49 | 如今,涌入计算机行业的人数激增,然而计算机专业的毕业生数量基本上未曾改变。第二种工程师的供过于求正在开始减少他们的工作机会,使他们无法涉足行业内更加有意义的工作。对你而言,不论正在努力成为第一种工程师,还是只想让自己的职业生涯更加安全,学习计算机科学是唯一可靠的途径。 50 | 51 | > 23333 然而他们……[pic.twitter.com/XVNYlXAHar](https://web.archive.org/web/20170528095858/https://twitter.com/jenna/status/838161631662092289) 52 | > 53 | > — Jenna Bilotta (@jenna) [2017 年 3 月 4 日](https://web.archive.org/web/20170528095858/https://twitter.com/jenna/status/838161631662092289) 54 | 55 | ## 分科目指引 56 | 57 | ### 编程 58 | 59 | 大多数计算机专业本科教学以程序设计「导论」作为开始。这类课程的最佳版本不仅能满足初学者的需要,还适用于那些在初学编程阶段遗漏了某些有益的概念和程序设计模式的人。 60 | 61 | 对于这部分内容,我们的标准推荐是这部经典著作:[《计算机程序的构造和解释》](https://book.douban.com/subject/1148282/)。在网络上,这本书既可供 [免费阅读(英文版)](https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html),也作为 [MIT 的免费视频课程](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/)。不过尽管这些视频课程很不错,我们对于视频课程的推荐实际上是 [Brian Harvey 开设的 SICP 课程](https://archive.org/details/ucberkeley-webcast-PL3E89002AA9B9879E?sort=titleSorter)(即 Berkeley 的 61A 课程)。比起 MIT 的课程,它更加完善,更适用于初学者。 62 | 63 | 我们建议至少学完 SICP 的前三章,并完成配套的习题。如果需要额外的练习,可以去解决一些小的程序设计问题,比如 [exercism](http://exercism.io)。 64 | 65 | > **中文翻译新增:** 66 | > 67 | > * 关于 SICP 国内视频观看地址 68 | > * [MIT 的免费视频课程(中英字幕)](https://www.bilibili.com/video/av8515129/) 69 | > * [Brian Harvey 开设的 SICP 课程(英文字幕)](https://www.bilibili.com/video/av40460492/) 70 | > * Scheme 学习的相关资源参见: 71 | > * 更详细的补充说明:[#3](https://github.com/izackwu/TeachYourselfCS-CN/issues/3) 72 | 73 | 自从 2016 年首次发布这份指南以来,最常被问到的一个问题是,我们是否推荐由 John DeNero 讲授的更新的 CS 61A 课程,以及配套的书籍 [*Composing Programs*](https://composingprograms.com/),这本书「继承自 SICP」 但使用 Python 讲解。我们认为 DeNero 的课程也很不错,有的学生可能更喜欢,但我们还是建议把 SICP、Scheme 和 Brian Harvey 的视频课程作为首选。 74 | 75 | 为什么这么说呢?因为 SICP 是独一无二的,它可以——至少很有可能——改变你对计算机和编程的基本认识。不是每个人都有这样的体验。有的人讨厌这本书,有的人看了前几页就放弃了。但潜在的回报让它值得一读。 76 | 77 | 如果你觉得 SICP 过于难,试试 *Composing Programs*。如果还是不合适,那我们推荐 《程序设计方法》([中文版](https://book.douban.com/subject/1140942/),[英文版](http://www.htdp.org/)) ;如果你觉得 SICP 过于简单,那我们推荐 [*Concepts, Techniques, and Models of Computer Programming*](https://book.douban.com/subject/1782316/)。如果读这些书让你觉得没有收获,也许你应该先学习其他科目,一两年后再重新审视编程的理念。 78 | 79 | > 新版原文删除了对 *Concepts, Techniques, and Models of Computer Programming* 一书的推荐,但这本书对各种编程模型有深入的见解,值得一读。所以译文中依然保留。 80 | > — 译者注 81 | 82 | 最后,有一点要说明的是:本指南 **不适用** 于完全不懂编程的新手。我们假定你是一个没有计算机专业背景的程序员,希望填补一些知识空白。事实上,我们把「编程」章节包括进来只是提醒你还有更多知识需要学习。对于那些从来没有学过编程,但又想学的人来说,这份 [指南](https://www.reddit.com/r/learnprogramming/wiki/faq#wiki_getting_started) 更合适。 83 | 84 | [![计算机程序的构造和解释](https://user-images.githubusercontent.com/20233656/66758473-ef7bff80-eed0-11e9-944a-15ae5c8542ca.jpg)](https://book.douban.com/subject/1148282/) 85 | 86 | ### 计算机系统结构 87 | 88 | 计算机系统结构——有时候又被称为「计算机系统」或者「计算机组成」——是了解软件底层的的重要视角。根据我们的经验,这是自学的软件工程师最容易忽视的领域。 89 | 90 | 我们最喜欢的入门书是 [《深入理解计算机系统》](https://book.douban.com/subject/26912767/)。典型的 [计算机体系结构导论课程](http://csapp.cs.cmu.edu/3e/courses.html) 会涵盖本书的 1-6 章。 91 | 92 | 我们喜爱《深入理解计算机系统》,因为它的实用性,并且站在程序员的视角。虽然计算机体系结构的内容比本书所涉及的内容多得多,但对于那些想了解计算机系统以求编写更快、更高效、更可靠的软件的人来说,这本书是很好的起点。 93 | 94 | 对于那些既想了解这个主题又想兼顾硬件和软件的知识的人来说,我们推荐 [《计算机系统要素》](https://book.douban.com/subject/1998341/),又名「从与非门到俄罗斯方块」(Nand2Tetris),这本书规模宏大,让读者对计算机内的所有部分如何协同工作有完全的认识。这本书的每一章节对应如何构建计算机整体系统中的一小部分,从用 HDL(硬件描述语言)写基本的逻辑门电路出发,途经 CPU 和汇编,最终抵达诸如俄罗斯方块这般规模的应用程序。 95 | 96 | 我们推荐把此书的前六章读完,并完成对应的项目练习。这么做,你将更加深入地理解,计算机体系结构和运行其上的软件之间的关系。 97 | 98 | 这本书的前半部分(包括所有对应的项目)均可从 [Nand2Tetris 的网站上](http://www.nand2tetris.org) 免费获得。同时,在 Coursera 上,这是一门 [视频课程](https://www.coursera.org/learn/build-a-computer)。 99 | 100 | 为了追求简洁和紧凑,这本书牺牲了内容上的深度。尤其值得注意的是,流水线和存储层次结构是现代计算机体系结构中极其重要的两个概念,然而这本书对此几乎毫无涉及。 101 | 102 | 当你掌握了 Nand2Tetris 的内容后,我们推荐要么回到《深入理解计算机系统》,或者考虑 Patterson 和 Hennessy 二人所著的 [《计算机组成与设计》](https://book.douban.com/subject/26604008/),一本优秀的经典著作。这本书中的不同章节重要程度不一,因此我们建议根据 Berkeley 的 [CS61C 课程](http://inst.eecs.berkeley.edu/~cs61c/sp15/) 「计算机体系结构中的伟大思想」来着重阅读一些章节。这门课的笔记和实验在网络上可以免费获得,并且在 [互联网档案](https://archive.org/details/ucberkeley-webcast-PL-XXv-cvA_iCl2-D-FS5mk0jFF6cYSJs_) 中有这门课程的过往资料。 103 | 104 | [![深入理解计算机系统](https://user-images.githubusercontent.com/20510068/82109944-12270d00-976d-11ea-85a9-774e4f762ec9.png)](https://book.douban.com/subject/26912767/) [![计算机系统要素](https://user-images.githubusercontent.com/20233656/66758695-60231c00-eed1-11e9-8422-a4acfb10a390.jpg)](http://www.nand2tetris.org) 105 | 106 | > 硬件是平台。 107 | > 108 | > — Mike Acton, Engine Director at Insomniac Games 109 | > ([观看他在 CppCon 上的演说](https://www.youtube.com/watch?v=rX0ItVEVjHc)) 110 | 111 | ### 算法与数据结构 112 | 113 | 正如几十年来的共识,我们认为,计算机科学教育所赋予人们的最大能量在于对常见算法和数据结构的熟悉。此外,这也可以训练一个人对于各种问题的解决能力,有助于其他领域的学习。 114 | 115 | 关于算法与数据结构,有成百上千的书可供使用,但是我们的最爱是 Steven Skiena 编写的 [《算法设计手册》](https://book.douban.com/subject/4048566/) 。显而易见,他对此充满热爱,迫不及待地想要帮助其他人理解。在我们看来,这本书给人一种焕然一新的体验,完全不同于那些更加经常被推荐的书(比如 Cormen、Leiserson、Rivest、Stein 或 Sedgewick 的书,后两者充斥着过多的证明,不适合以 **解决问题** 为导向的学习)。 116 | 117 | 如果你更喜欢视频课程,[Skiena 慷慨地提供了他的课程](https://www.youtube.com/watch?v=A2bFN3MyNDA&list=PLOtl7M3yp-DX32N0fVIyvn7ipWKNGmwpp)。此外,Tim Roughgarden 的课程也很不错, 118 | 在 Stanford 的 MOOC 平台 Lagunita,或者 [Coursera](https://www.coursera.org/specializations/algorithms) 上均可获得。Skiena 和 Roughgarden 的这两门课程没有优劣之分,选择何者取决于个人品味。 119 | 120 | 至于练习,我们推荐学生在 [Leetcode](https://leetcode.com) 上解决问题。Leetcode 上的问题往往有趣且带有良好的解法和讨论。此外,在竞争日益激烈的软件行业,这些问题可以帮助你评估自己应对技术面试中常见问题的能力。我们建议解决大约 100 道随机挑选的 Leetcode 问题,作为学习的一部分。 121 | 122 | 最后,我们强烈推荐 [《怎样解题》](https://book.douban.com/subject/2124114/)。这本书极为优秀且独特,指导人们解决广义上的问题,因而一如其适用于数学,它适用于计算机科学。 123 | 124 | [![算法设计手册](https://user-images.githubusercontent.com/20233656/66759121-361e2980-eed2-11e9-913c-8fc48c67122a.jpg)](https://book.douban.com/subject/4048566/) [![怎样解题](https://user-images.githubusercontent.com/20233656/66759282-8e552b80-eed2-11e9-89de-16b1f8d82e78.jpg)](https://book.douban.com/subject/2124114/) 125 | 126 | > 我可以广泛推荐的方法只有一个: 写之前先思考。 127 | > 128 | >— Richard Hamming 129 | 130 | ### 数学知识 131 | 132 | 从某个角度说,计算机科学是应用数学的一个「发育过度」的分支。尽管许多软件工程师试图——并且在不同程度上成功做到——忽视这一点,我们鼓励你用学习来拥抱数学。如若成功,比起那些没有掌握数学的人,你将获得巨大的竞争优势。 133 | 134 | 对于计算机科学,数学中最相关的领域是「离散数学」,其中的「离散」与「连续」相对立,大致上指的是应用数学中那些有趣的主题,而不是微积分之类的。由于定义比较含糊,试图掌握离散数学的全部内容是没有意义的。较为现实的学习目标是,了解逻辑、排列组合、概率论、集合论、图论以及密码学相关的一些数论知识。考虑到线性代数在计算机图形学和机器学习中的重要性,该领域同样值得学习。 135 | 136 | 学习离散数学,我们建议从 [László Lovász 的课程笔记](http://www.cs.elte.hu/~lovasz/dmbook.ps) 开始。Lovász 教授成功地让这些内容浅显易懂且符合直觉,因此,比起正式的教材,这更适合初学者。 137 | 138 | 对于更加高阶的学习,我们推荐 [《计算机科学中的数学》](https://book.douban.com/subject/33396340/),MIT 同名课程的课程笔记,篇幅与书籍相当(事实上,现已出版)。这门课程的视频同样 [可免费获得](https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/video-lectures/),是我们所推荐的学习视频。 139 | 140 | 对于线性代数,我们建议从 [Essence of linear algebra](https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab) 系列视频开始,然后再去学习 Gilbert Strang 的 [《线性代数导论》](https://book.douban.com/subject/34820335/) 和 [视频课程](https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/video-lectures/)。 141 | 142 | [![计算机科学中的数学](https://user-images.githubusercontent.com/20233656/66759673-4387e380-eed3-11e9-8469-3e677d108e91.jpg)](https://book.douban.com/subject/33396340/) 143 | 144 | > 如果人们不相信数学是简单的,那么只能是因为他们没有意识到生活有多么复杂。 145 | > 146 | >— John von Neumann 147 | 148 | ### 操作系统 149 | 150 | [《操作系统概念》](https://book.douban.com/subject/30297919/)(「恐龙书」)和 [《现代操作系统》](https://book.douban.com/subject/27096665/) 是操作系统领域的经典书籍。二者都因为写作风格和对学生不友好而招致了一些批评。 151 | 152 | [《操作系统导论》(*Operating Systems: Three Easy Pieces*)](https://book.douban.com/subject/33463930/) 是一个不错的替代品,并且 [可在网上免费获得(英文版)](http://pages.cs.wisc.edu/~remzi/OSTEP/)。我们格外喜欢这本书的结构,并且认为这本书的习题很值得一做。 153 | 154 | 在读完《操作系统导论》后,我们鼓励你探索特定操作系统的设计。可以借助「{OS name} Internals」风格的书籍,比如 [*Lion's commentary on Unix*](https://www.amazon.com/Lions-Commentary-Unix-John/dp/1573980137/), [*The Design and Implementation of the FreeBSD Operating System*](https://www.amazon.com/Design-Implementation-FreeBSD-Operating-System/dp/0321968972/),以及 [*Mac OS X Internals*](https://www.amazon.com/Mac-OS-Internals-Systems-Approach/dp/0321278542/)。对于 Linux ,我们推荐 Robert Love 的 [《Linux 内核设计与实现》](https://book.douban.com/subject/6097773/)。 155 | 156 | 为了巩固对操作系统的理解,阅读小型系统内核的代码并且为其增加特性是一个很不错的方法。比如,[xv6](https://pdos.csail.mit.edu/6.828/2016/xv6.html),由 MIT 的一门课程所维护的从 Unix V6 到 ANSI C 和 x86 的移植,就是一个很棒的选择。《操作系统导论》有一个附录,记载了一些可能的 [xv6 实验项目](http://pages.cs.wisc.edu/~remzi/OSTEP/lab-projects-xv6.pdf),其中充满了关于潜在项目的很棒想法。 157 | 158 | [![操作系统导论](https://user-images.githubusercontent.com/20233656/66759780-78943600-eed3-11e9-8eb5-6472c318c265.jpg)](https://book.douban.com/subject/33463930/) 159 | 160 | ### 计算机网络 161 | 162 | 鉴于有那么多关于网络服务端和客户端的软件工程,计算机网络是计算机科学中价值最为「立竿见影」的领域之一。我们的学生,系统性地学习了计算机网络,最终能够理解那些曾困扰他们多年的术语、概念和协议。 163 | 164 | 在这一主题上,我们最爱的书籍是 [《计算机网络:自顶向下方法》](https://book.douban.com/subject/30280001/)。书中的小项目和习题相当值得练习,尤其是其中的「Wireshark labs」([这部分在网上可以获得](http://www-net.cs.umass.edu/wireshark-labs/))。 165 | 166 | 如果更喜欢视频课程,我们推荐 Stanford 的 [*Introduction to Computer Networking*](https://lagunita.stanford.edu/courses/Engineering/Networking-SP/SelfPaced/about),可在他们的 MOOC 平台 Lagunita 上免费观看。 167 | 168 | 对于计算机网络的学习,做项目比完成小的习题更有益。一些可能的项目有:HTTP 服务器,基于 UDP 的聊天 APP,[迷你 TCP 栈](http://jvns.ca/blog/2014/08/12/what-happens-if-you-write-a-tcp-stack-in-python/),代理,负载均衡器,或者分布式哈希表。 169 | 170 | [![《计算机网络:自顶向下方法》](https://user-images.githubusercontent.com/20233656/66760004-d9bc0980-eed3-11e9-9b3f-74bf54b9571f.jpg)](https://book.douban.com/subject/30280001/) 171 | 172 | > 你无法盯着水晶球预见未来,未来的互联网何去何从取决于社会。 173 | > 174 | >— Bob Kahn 175 | 176 | ### 数据库 177 | 178 | 比起其他主题,自学数据库系统需要更多的付出。这是一个相对年轻的研究领域,并且出于很强的商业动机,研究者把想法藏在紧闭的门后。此外,许多原本有潜力写出优秀教材的作者反而选择了加入或创立公司。 179 | 180 | 鉴于如上情况,我们鼓励自学者大体上抛弃教材,而是从 [2015 年春季学期的 CS 186 课程](https://archive.org/details/UCBerkeley_Course_Computer_Science_186)(Joe Hellerstein 在 Berkeley 的数据库课程)开始,然后前往阅读论文。 181 | 182 | 对于初学者,有一篇格外值得提及的论文:[*Architecture of a Database System*](http://db.cs.berkeley.edu/papers/fntdb07-architecture.pdf)。这篇论文提供了独特的对关系型数据库管理系统(RDBMS)如何工作的高层次观点,是后续学习的实用梗概。 183 | 184 | [*Readings in Database Systems*](https://book.douban.com/subject/2256069/),或者以 [数据库「红书」](http://www.redbook.io/) 更为人知,是由 Peter Bailis、Joe Hellerstein 和 Michael Stonebraker 编纂的论文合集。对于那些想要在 CS 186 课程的水平更进一步的学习者,「红书」应当是下一步。 185 | 186 | 如果你坚持一定要一本导论教材,那我们推荐 Ramakrishnan 和 Gehrke 所著的 [《数据库管理系统:原理与设计》](https://book.douban.com/subject/1155934/)。如需更深一步,Jim Gray 的经典著作 [*Transaction Processing: Concepts and Techniques*](https://book.douban.com/subject/2586390/) 值得一读,不过我们不建议把这本书当作首要资源。 187 | 188 | 如果没有编写足够数量的代码,很难巩固数据库理论。CS 186 课程的学生给 Spark 添加特性,倒是不错的项目,不过我们仅仅建议从零实现一个简单的关系型数据库管理系统。自然,它将不会有太多的特性,但是即便只实现典型的关系型数据库管理系统每个方面最基础的功能,也是相当有启发的。 189 | 190 | 最后,数据模型往往是数据库中一个被忽视的、教学不充分的方面。关于这个主题,我们推荐的书籍是 [*Data and Reality: A Timeless Perspective on Perceiving and Managing Information in Our Imprecise World*](https://book.douban.com/subject/17915870/)。 191 | 192 | [![Readings in Database Systems](https://user-images.githubusercontent.com/20233656/66760126-08d27b00-eed4-11e9-82c6-46c571036aa1.jpg)](https://book.douban.com/subject/2256069/) [![数据库管理系统:原理与设计](https://user-images.githubusercontent.com/20233656/66760358-85655980-eed4-11e9-9130-66d2ecea5700.jpg)](https://book.douban.com/subject/1155934/) 193 | 194 | ### 编程语言与编译器 195 | 196 | 多数程序员学习编程语言的知识,而多数计算机科学家学习编程语言 **相关** 的知识。这使得计算机科学家比起程序员拥有显著的优势,即便在编程领域!因为他们的知识可以推而广之:相较只学习过特定编程语言的人,他们可以更深入更快速地理解新的编程语言。 197 | 198 | 我们推荐的入门书是 Bob Nystrom 所著的优秀的 [*Crafting Interpreters*](https://craftinginterpreters.com/contents.html),可在网上免费获取。这本书条理清晰,富有趣味性,非常适合那些想要更好地理解语言和语言工具的人。我们建议你花时间读完整本书,并尝试任何一个感兴趣的「挑战」。 199 | 200 | 另一本更为传统的推荐书籍是 [《编译原理》](https://book.douban.com/subject/3296317/),通常称为「龙书」。不幸的是,这本书不是为自学者而设计的,而是供教师从中挑选一些主题用于 1-2 学期的教学。 201 | 202 | 如果你选择使用龙书进行自学,你需要从中甄选主题,而且最好是在导师的帮助下。我们建议依据某个视频课程来设定学习的结构,然后按需从龙书中获取深入的内容。我们推荐的在线课程是 [Alex Aiken 在 MOOC 平台 edX 所开设的](https://www.edx.org/course/compilers)。 203 | 204 | [![编译原理](https://user-images.githubusercontent.com/20233656/66760486-ca898b80-eed4-11e9-80ba-df298ac8d5da.jpg)](https://book.douban.com/subject/3296317/) 205 | 206 | > 不要做一个只写样板代码的程序员。相反,给用户和其他程序员创造工具。从纺织工业和钢铁工业中学习历史教训:你想制造机器和工具,还是操作这些机器? 207 | > 208 | >— Ras Bodik 在他的编译器课程伊始 209 | 210 | ### 分布式系统 211 | 212 | 随着计算机在数量上的增加,计算机同样开始 **分散**。尽管商业公司过去愿意购买越来越大的大型机,现在的典型情况是,甚至很小的应用程序都同时在多台机器上运行。思考这样做的利弊权衡,即是分布式系统的研究所在,也是越来越重要的一项技能。 213 | 214 | 我们推荐的自学参考书是 Martin Kleppmann 的 [《数据密集型应用系统设计》](https://book.douban.com/subject/30329536/)。与传统的教科书相比,它是一本为实践者设计的具有很高的可读性的书,并且保持了深度和严谨性。 215 | 216 | 对于那些偏爱传统教材,或者希望可以从网上免费获取的人,我们推荐的教材是 Maarten van Steen 和 Andrew Tanenbaum 所著的 《分布式系统原理与范型》([中文第二版](https://book.douban.com/subject/3108801/),[英文第三版](https://book.douban.com/subject/26979326/))。 217 | 218 | 对于喜欢视频课程的人,[MIT 的 6.824](https://www.youtube.com/watch?v=cQP8WApzIQQ&list=PLrw6a1wE39_tb2fErI4-WkMbsvGQk9_UB) 是一门很好的在线视频课程,由 Robert Morris 教授的研究生课程,在 [这里](https://pdos.csail.mit.edu/6.824/schedule.html) 可以看到课程安排。 219 | 220 | 不管选择怎样的教材或者其他辅助资料,学习分布式系统必然要求阅读论文。[这里](http://dsrg.pdos.csail.mit.edu/papers/) 有一个不错的论文清单,而且我们强烈建议你出席你当地的 [Papers We Love](http://paperswelove.org/)(仅限美国)。 221 | 222 | [![数据密集型应用系统设计](https://user-images.githubusercontent.com/20510068/82111034-94ff9600-9774-11ea-9d49-90b00f746659.png)](https://book.douban.com/subject/30329536/) 223 | 224 | ## 常见问题解答 225 | 226 | ### 这份指引的目标受众是? 227 | 228 | 我们面向自学的软件工程师、培训班学生、「早熟的」高中生或者想要通过自学补充正式教育的大学生。关于何时开启这段自学旅程,完全取决于个人,不过多数人在有一定的职业经历后深入学习计算机科学理论会获益匪浅。比如,我们注意到,如果学生在工作中曾经使用过数据库,他们会 **喜爱** 学习数据库系统课程;如果学生从事过一两个 Web 项目,他们会 **喜爱** 学习计算机网络。 229 | 230 | ### 人工智能/计算机图形学/XX 主题怎么样? 231 | 232 | 我们试图把计算机科学主题清单限制到那些我们认为 **每一个软件工程师** 都应该了解的内容,不限于专业或行业。拥有了这些基础,你将能更加轻松地挑选教材或论文,然而无需指引地学习核心概念。在这里,我们给出一些其他常见主题的自学起点: 233 | 234 | * 人工智能:通过观看视频并完成 Pacman 项目来学习 [Berkeley 的 AI 课程](http://ai.berkeley.edu/)。至于教材,使用 Russell 和 Norvig 编写的 [《人工智能:一种现代方法》](https://book.douban.com/subject/25796281/)。 235 | * 机器学习:学习吴恩达在 Coursera 上的课程。耐心学习,先确保理解了基础概念再奔向类如深度学习的诱人新主题。 236 | * 计算机图形学:学习 [Berkeley CS 184 课程](http://inst.eecs.berkeley.edu/~cs184/fa12/onlinelectures.html) 的材料,使用 [《计算机图形学:原理及实践》](https://book.douban.com/subject/30402778/) 作为教材。 237 | 238 | ### 一定要严格遵守推荐的学习次序吗? 239 | 240 | 事实上,所有主题之间都有一定程度的重叠,彼此循环引用。以离散数学和算法的关系为例:先学习数学可以帮助你更深入地分析和理解算法,然而先学习算法可以为学习离散数学提供更大的动力和应用背景。理想情况下,你将在你的职业生涯多次重温二者。 241 | 242 | 因此,我们所推荐的次序主要是为了帮助你 **起步**……如果你出于某种强烈的原因而倾向以不同的顺序学习,那也没有关系,勇敢开始吧!不过在我们看来,最重要的「先决条件」是:先学计算机体系结构再学操作系统或数据库,先学计算机网络和操作系统再学分布式系统。 243 | 244 | ### 和 Open Source Society、freeCodeCamp curricula 等比起来,这份指引? 245 | 246 | [OSS 指引](https://github.com/open-source-society/computer-science) 涵盖太多主题,在许多主题中推荐劣质资源,没有就特定课程哪些方面有价值提供原因或指引。我们努力对这份指引中的课程加以限制,仅仅包括那些你作为软件工程师 **确实需要了解的**,不论你的专业方向,并且对每门课程为何必要做出了解释以帮助你理解。 247 | 248 | FreeCodeCamp 主要关注编程,而不是计算机科学。至于你为什么要学习计算机科学,参见 [上文](#为什么要学习计算机科学)。如果你是个新手,我们建议先学 freeCodeCamp 的课程,一两年后再回归本指南。 249 | 250 | ### XX 编程语言怎么样? 251 | 252 | 学习一门特定的编程语言和学习计算机科学的一个领域完全不在一个维度——相比之下,学习语言 **容易** 且 **缺乏价值**。如果你已经了解了一些语言,我们强烈建议遵照我们的指引,然后在学习的空当中习得语言,或者暂且不管以后再说。如果你已经把编程学得不错了(比如学完了 **《计算机程序的构造和解释》**),尤其是如果你学习过编译器,那么面对一门新的语言,你只需要花一个周末稍多的时间即可基本掌握,之后你可以在工作中学习相关的类库/工具/生态。 253 | 254 | ### XX 流行技术怎么样? 255 | 256 | 没有任何一种技术的重要程度可以达到学习其使用足以成为计算机科学教学的核心部分。不过,你对学习那门技术充满热情,这很不错。诀窍是先从特定的技术回退到基本的领域或概念,判断这门流行技术在技术的宏观大局中位于何处,然后才深入学习这门技术。 257 | 258 | ### 为什么你们还在推荐 SICP? 259 | 260 | 先尝试读一下,有些人觉得 SICP 让人神魂颠倒,这在其他书很少见。如果你不喜欢,你可以尝试其他的东西,也许以后再回到 SICP。 261 | 262 | ### 为什么你们还在推荐龙书? 263 | 264 | 龙书依旧是内容最为完整的编译器单本书籍。由于过分强调一些如今不够时新的主题的细节,比如解析,这本书招致了恶评。然而事实上,这本书从未打算供人一页一页的学习,而仅仅是为了给教师准备一门课程提供足够的材料。类似地,自学者可以从书中量身按需挑选主题,或者最好依照公开课授课教师在课程大纲中的建议。 265 | 266 | ### 如何便宜获取教材? 267 | 268 | 我们所建议的许多教材在网上都可以免费获得,这多亏了作者们的慷慨。对于那些不免费的书籍,我们建议购买旧版本的二手书籍。广而言之,如果一本教材有多个版本,旧版本大概率是完全足够使用的。即便新版本的价格是旧版本的 10 倍,新版本也绝不可能比旧版本好 10 倍! 269 | 270 | **中文翻译新增:** 事实上,比起美国,在国内购买技术书籍可以说是相当「廉价」了。如果仍旧寻求更加便宜的购买渠道,可以参考这篇 V2EX 上的 [讨论帖子](https://www.v2ex.com/t/578615),其中提到了一些不错的购买渠道。 271 | 272 | ### 这份指引是谁写的? 273 | 274 | 这份指引由 [Bradfield School of Computer Science](https://bradfieldcs.com)(旧金山)的两位教员:[Ozan Onay](https://twitter.com/oznova_) 和 [Myles Byrne](https://twitter.com/quackingduck) 编写,并由 Oz 于 2020 年更新。这份指引基于我们对数千名自学成才的工程师和培训班学生教授计算机科学基础的经验。感谢我们所有学生对自学资源的持续反馈。 275 | 276 | 只要有足够的时间和动力,我们非常有信心,你可以自学完以上所有课程。如果你喜欢一个集中式、结构化、由教师指导的课程,你可能对我们的 [计算机科学强化班](https://bradfieldcs.com/csi/) 感兴趣。我们 [不建议](https://ozwrites.com/masters/) 你去攻读硕士学位。 277 | 278 | ### 这份指引是谁翻译的? 279 | 280 | 这份指引的中文翻译是 [社区共同贡献的成果](https://github.com/izackwu/TeachYourselfCS-CN/),我们欢迎任何反馈和改进! 281 | -------------------------------------------------------------------------------- /TeachYourselfCS.md: -------------------------------------------------------------------------------- 1 | # Teach Yourself Computer Science 2 | 3 | If you’re a self-taught engineer or bootcamp grad, you owe it to yourself to learn computer science. Thankfully, you can give yourself a world-class CS education without investing years and a small fortune in a degree program 💸. 4 | 5 | There are plenty of resources out there, but some are better than others. You don’t need yet another “200+ Free Online Courses” listicle. You need answers to these questions: 6 | 7 | * **Which subjects** should you learn, and why? 8 | * What is the **best book or video lecture series** for each subject? 9 | 10 | This guide is our attempt to definitively answer these questions. 11 | 12 | ## TL;DR: 13 | 14 | Study all nine subjects below, in roughly the presented order, using either the suggested textbook or video lecture series, but ideally both. Aim for 100-200 hours of study of each topic, then revisit favorites throughout your career 🚀. 15 | 16 | | Subject | Why study? | Best book | Best videos | 17 | |---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|-----------------------------------| 18 | | **[Programming](#programming)** | Don’t be the person who “never quite understood” something like recursion. | _Structure and Interpretation of Computer Programs_ | Brian Harvey’s Berkeley CS 61A | 19 | | **[Computer Architecture](#architecture)** | If you don’t have a solid mental model of how a computer actually works, all of your higher-level abstractions will be brittle. | _Computer Organization and Design_ | Berkeley CS 61C | 20 | | **[Algorithms and Data Structures](#algorithms)** | If you don’t know how to use ubiquitous data structures like stacks, queues, trees, and graphs, you won’t be able to solve hard problems. | _The Algorithm Design Manual_ | Steven Skiena’s lectures | 21 | | **[Math for CS](#math)** | CS is basically a runaway branch of applied math, so learning math will give you a competitive advantage. | _Mathematics for Computer Science_ | Tom Leighton’s MIT 6.042J | 22 | | **[Operating Systems](#operating-systems)** | Most of the code you write is run by an operating system, so you should know how those interact. | _Operating Systems: Three Easy Pieces_ | Berkeley CS 162 | 23 | | **[Computer Networking](#networking)** | The Internet turned out to be a big deal: understand how it works to unlock its full potential. | _Computer Networking: A Top-Down Approach_ | Stanford CS 144 | 24 | | **[Databases](#databases)** | Data is at the heart of most significant programs, but few understand how database systems actually work. | _Readings in Database Systems_ | Joe Hellerstein’s Berkeley CS 186 | 25 | | **[Languages and Compilers](#languages)** | If you understand how languages and compilers actually work, you’ll write better code and learn new languages more easily. | _Compilers: Principles, Techniques and Tools_ | Alex Aiken’s course on Lagunita | 26 | | **[Distributed Systems](#distributed-systems)** | These days, _most_ systems are distributed systems. | _Distributed Systems, 3rd Edition_ by Maarten van Steen | MIT 6.824 | 27 | 28 | ## Why learn computer science? 29 | 30 | There are 2 types of software engineer: those who understand computer science well enough to do challenging, innovative work, and those who just get by because they’re familiar with a few high level tools. 31 | 32 | Both call themselves software engineers, and both tend to earn similar salaries in their early careers. But Type 1 engineers grow in to more fulfilling and well-remunerated work over time, whether that’s valuable commercial work or breakthrough open-source projects, technical leadership or high-quality individual contributions. 33 | 34 | > The global SMS system does around 20bn messages a day. WhatsApp is now doing 42bn. With 57 engineers. [pic.twitter.com/zZrtSIzhlR](https://t.co/zZrtSIzhlR) 35 | > 36 | > — Benedict Evans (@BenedictEvans) [February 2, 2016](https://twitter.com/BenedictEvans/status/694342874729545729) 37 | 38 | Type 1 engineers find ways to learn computer science in depth, whether through conventional means or by relentlessly learning throughout their careers. Type 2 engineers typically stay at the surface, learning specific tools and technologies rather than their underlying foundations, only picking up new skills when the winds of technical fashion change. 39 | 40 | Currently, the number of people entering the industry is rapidly increasing, while the number of CS grads is essentially static. This oversupply of Type 2 engineers is starting to reduce their employment opportunities and keep them out of the industry’s more fulfilling work. Whether you’re striving to become a Type 1 engineer or simply looking for more job security, learning computer science is the only reliable path. 41 | 42 | > Lol oh but they were.... [pic.twitter.com/XVNYlXAHar](https://t.co/XVNYlXAHar) 43 | > 44 | > — Jenna Bilotta (@jenna) [March 4, 2017](https://twitter.com/jenna/status/838161631662092289) 45 | 46 | ## Subject guides 47 | 48 | ### Programming 49 | 50 | Most undergraduate CS programs start with an “introduction” to computer programming. The best versions of these courses cater not just to novices, but also to those who missed beneficial concepts and programming models while first learning to code. 51 | 52 | Our standard recommendation for this content is the classic _Structure and Interpretation of Computer Programs_, which is available online for free both as [a book](https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html), and as a set of [MIT video lectures](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/). While those lectures are great, our video suggestion is actually [Brian Harvey’s SICP lectures](https://archive.org/details/ucberkeley-webcast-PL3E89002AA9B9879E?sort=titleSorter) (for the 61A course at Berkeley) instead. These are more refined and better targeted at new students than are the MIT lectures. 53 | 54 | We recommend working through at least the first three chapters of SICP and doing the exercises. For additional practice, work through a set of small programming problems like those on [exercism](http://exercism.io). 55 | 56 | For those who find SICP too challenging, we recommend _[How to Design Programs](http://www.htdp.org/)_. For those who find it too easy, we recommend _[Concepts, Techniques, and Models of Computer Programming](https://smile.amazon.com/Concepts-Techniques-Models-Computer-Programming/dp/0262220695/)_. 57 | 58 | ### Computer Architecture 59 | 60 | Computer Architecture—sometimes called “computer systems” or “computer organization”—is an important first look at computing below the surface of software. In our experience, it’s the most neglected area among self-taught software engineers. 61 | 62 | _The Elements of Computing Systems_, also known as “Nand2Tetris” is an ambitious book attempting to give you a cohesive understanding of how everything in a computer works. Each chapter involves building a small piece of the overall system, from writing elementary logic gates in HDL, through a CPU and assembler, all the way to an application the size of a Tetris game. 63 | 64 | We recommend reading through the first six chapters of the book and completing the associated projects. This will develop your understanding of the relationship between the architecture of the machine and the software that runs on it. 65 | 66 | The first half of the book (and all of its projects), are available for free from [the Nand2Tetris website](http://www.nand2tetris.org). It’s also available as [a Coursera course with accompanying videos](https://www.coursera.org/learn/build-a-computer). 67 | 68 | In seeking simplicity and cohesiveness, Nand2Tetris trades off depth. In particular, two very important concepts in modern computer architectures are pipelining and memory hierarchy, but both are mostly absent from the text. 69 | 70 | Once you feel comfortable with the content of Nand2Tetris, our next suggestion is Patterson and Hennessy’s _[Computer Organization and Design](https://smile.amazon.com/Computer-Organization-Design-Fifth-Architecture/dp/0124077269)_, an excellent and now classic text. Not every section in the book is essential; we suggest following Berkeley’s [CS61C course](http://inst.eecs.berkeley.edu/~cs61c/sp15/) “Great Ideas in Computer Architecture” for specific readings. The lecture notes and labs are available online, and past lectures are [on the Internet Archive](https://archive.org/details/ucberkeley-webcast-PL-XXv-cvA_iCl2-D-FS5mk0jFF6cYSJs_). 71 | 72 | [![Elements of Computing Systems](https://teachyourselfcs.com/elements-computing-systems.jpg)](http://www.nand2tetris.org) 73 | 74 | > Hardware is the platform 75 | > 76 | > — Mike Acton, Engine Director at Insomniac Games 77 | > ([watch his CppCon talk](https://www.youtube.com/watch?v=rX0ItVEVjHc)) 78 | 79 | ### Algorithms and Data Structures 80 | 81 | We agree with decades of common wisdom that familiarity with common algorithms and data structures is one of the most empowering aspects of a computer science education. This is also a great place to train one’s general problem-solving abilities, which will pay off in every other area of study. 82 | 83 | There are hundreds of books available, but our favorite is _[The Algorithm Design Manual](https://smile.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/)_ by Steven Skiena. He clearly loves this stuff and can’t wait to help you understand it. This is a refreshing change, in our opinion, from the more commonly recommended Cormen, Leiserson, Rivest & Stein, or Sedgewick books. These last two texts tend to be too proof-heavy for those learning the material primarily to help them _solve problems_. 84 | 85 | For those who prefer video lectures, [Skiena generously provides his online](https://www.youtube.com/watch?v=A2bFN3MyNDA&list=PLOtl7M3yp-DX32N0fVIyvn7ipWKNGmwpp). We also really like Tim Roughgarden’s course, available from Stanford’s MOOC platform Lagunita, or [on Coursera](https://www.coursera.org/specializations/algorithms). Whether you prefer Skiena’s or Roughgarden’s lecture style will be a matter of personal preference. 86 | 87 | For practice, our preferred approach is for students to solve problems on [Leetcode](https://leetcode.com). These tend to be interesting problems with decent accompanying solutions and discussions. They also help you test progress against questions that are commonly used in technical interviews at the more competitive software companies. We suggest solving around 100 random leetcode problems as part of your studies. 88 | 89 | Finally, we strongly recommend _[How to Solve It](https://smile.amazon.com/How-Solve-Mathematical-Princeton-Science/dp/069116407X/)_ as an excellent and unique guide to general problem solving; it’s as applicable to computer science as it is to mathematics. 90 | 91 | [![The Algorithm Design Manual](https://teachyourselfcs.com/skiena.jpg)](https://smile.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/) [![How to Solve It](https://teachyourselfcs.com/polya.jpg)](https://smile.amazon.com/How-Solve-Mathematical-Princeton-Science/dp/069116407X/) 92 | 93 | > I have only one method that I recommend extensively—it’s called think before you write. 94 | > 95 | >— Richard Hamming 96 | 97 | ### Mathematics for Computer Science 98 | 99 | In some ways, computer science is an overgrown branch of applied mathematics. While many software engineers try—and to varying degrees succeed—at ignoring this, we encourage you to embrace it with direct study. Doing so successfully will give you an enormous competitive advantage over those who don’t. 100 | 101 | The most relevant area of math for CS is broadly called “discrete mathematics”, where “discrete” is the opposite of “continuous” and is loosely a collection of interesting applied math topics outside of calculus. Given the vague definition, it’s not meaningful to try to cover the entire breadth of “discrete mathematics”. A more realistic goal is to build a working understanding of logic, combinatorics and probability, set theory, graph theory, and a little of the number theory informing cryptography. Linear algebra is an additional worthwhile area of study, given its importance in computer graphics and machine learning. 102 | 103 | Our suggested starting point for discrete mathematics is the set of [lecture notes by László Lovász](http://www.cs.elte.hu/~lovasz/dmbook.ps). Professor Lovász did a good job of making the content approachable and intuitive, so this serves as a better starting point than more formal texts. 104 | 105 | For a more advanced treatment, we suggest _[Mathematics for Computer Science](https://courses.csail.mit.edu/6.042/spring17/mcs.pdf)_, the book-length lecture notes for the MIT course of the same name. That course’s video lectures are also [freely available](https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/video-lectures/), and are our recommended video lectures for discrete math. 106 | 107 | For linear algebra, we suggest starting with the [Essence of linear algebra](https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab) video series, followed by Gilbert Strang’s [book](https://www.amazon.com/Introduction-Linear-Algebra-Gilbert-Strang/dp/0980232775/) and [video lectures](https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/video-lectures/). 108 | 109 | > If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is. 110 | > 111 | >— John von Neumann 112 | 113 | ### Operating Systems 114 | 115 | _[Operating System Concepts](https://www.amazon.com/dp/1118063333/)_ (the “Dinosaur book”) and _[Modern Operating Systems](https://www.amazon.com/dp/013359162X/)_ are the “classic” books on operating systems. Both have attracted criticism for their writing styles, and for being the 1000-page-long type of textbook that gets bits bolted onto it every few years to encourage purchasing of the “latest edition”. 116 | 117 | _Operating Systems: Three Easy Pieces_ is a good alternative that’s [freely available online](http://pages.cs.wisc.edu/~remzi/OSTEP/). We particularly like the structure of the book and feel that the exercises are well worth doing. 118 | 119 | After OSTEP, we encourage you to explore the design decisions of specific operating systems, through “{OS name} Internals” style books such as _[Lion's commentary on Unix](https://www.amazon.com/Lions-Commentary-Unix-John/dp/1573980137/)_, _[The Design and Implementation of the FreeBSD Operating System](https://www.amazon.com/Design-Implementation-FreeBSD-Operating-System/dp/0321968972/)_, and _[Mac OS X Internals](https://www.amazon.com/Mac-OS-Internals-Systems-Approach/dp/0321278542/)_. 120 | 121 | A great way to consolidate your understanding of operating systems is to read the code of a small kernel and add features. A great choice is [xv6](https://pdos.csail.mit.edu/6.828/2016/xv6.html), a port of Unix V6 to ANSI C and x86 maintained for a course at MIT. OSTEP has an appendix of potential [xv6 labs](http://pages.cs.wisc.edu/~remzi/OSTEP/lab-projects-xv6.pdf) full of great ideas for potential projects. 122 | 123 | ### Computer Networking 124 | 125 | Given that so much of software engineering is on web servers and clients, one of the most immediately valuable areas of computer science is computer networking. Our self-taught students who methodically study networking find that they finally understand terms, concepts and protocols they’d been surrounded by for years. 126 | 127 | Our favorite book on the topic is _[Computer Networking: A Top-Down Approach](https://smile.amazon.com/Computer-Networking-Top-Down-Approach-7th/dp/0133594149/)_. The small projects and exercises in the book are well worth doing, and we particularly like the “Wireshark labs”, which they have [generously provided online](http://www-net.cs.umass.edu/wireshark-labs/). 128 | 129 | For those who prefer video lectures, we suggest Stanford’s [_Introduction to Computer Networking course_](https://lagunita.stanford.edu/courses/Engineering/Networking-SP/SelfPaced/about) available on their MOOC platform Lagunita. 130 | 131 | The study of networking benefits more from projects than it does from small exercises. Some possible projects are: an HTTP server, a UDP-based chat app, a [mini TCP stack](http://jvns.ca/blog/2014/08/12/what-happens-if-you-write-a-tcp-stack-in-python/), a proxy or load balancer, and a distributed hash table. 132 | 133 | > You can’t gaze in the crystal ball and see the future. What the Internet is going to be in the future is what society makes it. 134 | > 135 | >— Bob Kahn 136 | 137 | [![Computer Networking: A Top-Down Approach](https://teachyourselfcs.com/top-down.jpg)](https://smile.amazon.com/Computer-Networking-Top-Down-Approach-7th/dp/0133594149/) 138 | 139 | ### Databases 140 | 141 | It takes more work to self-learn about database systems than it does with most other topics. It’s a relatively new (i.e. post 1970s) field of study with strong commercial incentives for ideas to stay behind closed doors. Additionally, many potentially excellent textbook authors have preferred to join or start companies instead. 142 | 143 | Given the circumstances, we encourage self-learners to generally avoid textbooks and start with the [Spring 2015 recording of CS 186](https://archive.org/details/UCBerkeley_Course_Computer_Science_186), Joe Hellerstein’s databases course at Berkeley, and to progress to reading papers after. 144 | 145 | One paper particularly worth mentioning for new students is “[Architecture of a Database System](http://db.cs.berkeley.edu/papers/fntdb07-architecture.pdf)”, which uniquely provides a high-level view of how relational database management systems (RDBMS) work. This will serve as a useful skeleton for further study. 146 | 147 | _Readings in Database Systems_, better known as [the databases “Red Book”](http://www.redbook.io/), is a collection of papers compiled and edited by Peter Bailis, Joe Hellerstein and Michael Stonebraker. For those who have progressed beyond the level of the CS 186 content, the Red Book should be your next stop. 148 | 149 | If you insist on using an introductory textbook, we suggest _[Database Management Systems](https://smile.amazon.com/Database-Management-Systems-Raghu-Ramakrishnan/dp/0072465638/)_ by Ramakrishnan and Gehrke. For more advanced students, Jim Gray’s classic _[Transaction Processing: Concepts and Techniques](https://www.amazon.com/Transaction-Processing-Concepts-Techniques-Management/dp/1558601902)_ is worthwhile, but we don’t encourage using this as a first resource. 150 | 151 | It’s hard to consolidate databases theory without writing a good amount of code. CS 186 students add features to Spark, which is a reasonable project, but we suggest just writing a simple relational database management system from scratch. It will not be feature rich, of course, but even writing the most rudimentary version of every aspect of a typical RDBMS will be illuminating. 152 | 153 | Finally, data modeling is a neglected and poorly taught aspect of working with databases. Our suggested book on the topic is _[Data and Reality: A Timeless Perspective on Perceiving and Managing Information in Our Imprecise World](https://www.amazon.com/Data-Reality-Perspective-Perceiving-Information/dp/1935504215)_. 154 | 155 | ### Languages and Compilers 156 | 157 | Most programmers learn languages, whereas most computer scientists learn _about_ languages. This gives the computer scientist a distinct advantage over the programmer, even in the domain of programming! Their knowledge generalizes; they are able to understand the operation of a new language more deeply and quickly than those who have merely learned specific languages. 158 | 159 | The canonical introductory text is _[Compilers: Principles, Techniques & Tools](https://smile.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811)_, commonly called “the Dragon Book”. Unfortunately, it’s not designed for self-study, but rather for instructors to pick out 1-2 semesters worth of topics for their courses. It’s almost essential then, that you cherry-pick the topics, ideally with the help of a mentor. 160 | 161 | If you choose to use the Dragon Book for self-study, we recommend following a video lecture series for structure, then dipping into the Dragon Book as needed for more depth. Our recommended online course is [Alex Aiken’s, available from Stanford’s MOOC platform Lagunita](https://lagunita.stanford.edu/courses/Engineering/Compilers/Fall2014/about). 162 | 163 | As a potential alternative to the Dragon Book we suggest _[Language Implementation Patterns](https://smile.amazon.com/Language-Implementation-Patterns-Domain-Specific-Programming/dp/193435645X/)_ by Terence Parr. It is written more directly for the practicing software engineer who intends to work on small language projects like DSLs, which may make it more practical for your purposes. Of course, it sacrifices some valuable theory to do so. 164 | 165 | For project work, we suggest writing a compiler either for a simple teaching language like COOL, or for a subset of a language that interests you. Those who find such a project daunting could start with [Make a Lisp](https://github.com/kanaka/mal), which steps you through the project. 166 | 167 | [![Compilers: Principles, Techniques & Tools](https://teachyourselfcs.com/dragon.jpg)](https://smile.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811) [![Language Implementation Patterns](https://teachyourselfcs.com/parr.jpg)](https://smile.amazon.com/Language-Implementation-Patterns-Domain-Specific-Programming/dp/193435645X/) 168 | 169 | > Don’t be a boilerplate programmer. Instead, build tools for users and other programmers. Take historical note of textile and steel industries: do you want to build machines and tools, or do you want to operate those machines? 170 | > 171 | >— Ras Bodik at the start of his compilers course 172 | 173 | ### Distributed Systems 174 | 175 | As computers have increased in number, they have also _spread_. Whereas businesses would previously purchase larger and larger mainframes, it’s typical now for even very small applications to run across multiple machines. Distributed systems is the study of how to reason about the trade-offs involved in doing so, an increasingly important skill. 176 | 177 | Our suggested textbook for self-study is Maarten van Steen and Andrew Tanenbaum’s _[Distributed Systems, 3rd Edition](https://www.distributed-systems.net/index.php/books/distributed-systems-3rd-edition-2017/)_. It’s a great improvement over the previous edition, and is available for free online thanks to the generosity of its authors. Given that the distributed systems is a rapidly changing field, no textbook will serve as a trail guide, but Maarten van Steen’s is the best overview we’ve seen of well-established foundations. 178 | 179 | A good course for which some videos are online is [MIT’s 6.824](https://www.youtube.com/watch?v=cQP8WApzIQQ&list=PLrw6a1wE39_tb2fErI4-WkMbsvGQk9_UB) (a graduate course), but unfortunately the audio quality in the recordings is poor, and it’s not clear if the recordings were authorized. *[Update @ Mar 2020: [the official lecture videos of the course](https://www.youtube.com/watch?v=cQP8WApzIQQ&list=PLrw6a1wE39_tb2fErI4-WkMbsvGQk9_UB) has been published!]* 180 | 181 | No matter the choice of textbook or other secondary resources, study of distributed systems absolutely mandates reading papers. A good list is [here](http://dsrg.pdos.csail.mit.edu/papers/), and we would highly encourage attending your local [Papers We Love](http://paperswelove.org/) chapter. 182 | 183 | ## Frequently asked questions 184 | 185 | ### What about AI/graphics/pet-topic-X? 186 | 187 | We’ve tried to limit our list to computer science topics that we feel _every practicing software engineer_ should know, irrespective of specialty or industry. With this foundation, you’ll be in a much better position to pick up textbooks or papers and learn the core concepts without much guidance. Here are our suggested starting points for a couple of common “electives”: 188 | 189 | * For artificial intelligence: do [Berkeley’s intro to AI course](http://ai.berkeley.edu/) by watching the videos and completing the excellent Pacman projects. As a textbook, use Russell and Norvig’s _Artificial Intelligence: A Modern Approach_. 190 | * For machine learning: do Andrew Ng’s Coursera course. Be patient, and make sure you understand the fundamentals before racing off to shiny new topics like deep learning. 191 | * For computer graphics: work through [Berkeley’s CS 184](http://inst.eecs.berkeley.edu/~cs184/fa12/onlinelectures.html) material, and use [Computer Graphics: Principles and Practice](https://www.amazon.com/Computer-Graphics-Principles-Practice-3rd/dp/0321399528) as a textbook. 192 | 193 | ### How strict is the suggested sequencing? 194 | 195 | Realistically, all of these subjects have a significant amount of overlap, and refer to one another cyclically. Take for instance the relationship between discrete math and algorithms: learning math first would help you analyze and understand your algorithms in greater depth, but learning algorithms first would provide greater motivation and context for discrete math. Ideally, you’d revisit both of these topics many times throughout your career. 196 | 197 | As such, our suggested sequencing is mostly there to help you _just get started_… if you have a compelling reason to prefer a different sequence, then go for it. The most significant “pre-requisites” in our opinion are: computer architecture before operating systems or databases, and networking and operating systems before distributed systems. 198 | 199 | ### Who is the target audience for this guide? 200 | 201 | We have in mind that you are a self-taught software engineer, bootcamp grad or precocious high school student, or a college student looking to supplement your formal education with some self-study. The question of when to embark upon this journey is an entirely personal one, but most people tend to benefit from having some professional experience before diving too deep into CS theory. For instance, we notice that students _love_ learning about database systems if they have already worked with databases professionally, or about computer networking if they’ve worked on a web project or two. 202 | 203 | ### How does this compare to Open Source Society or freeCodeCamp curricula? 204 | 205 | The [OSS guide](https://github.com/open-source-society/computer-science) has too many subjects, suggests inferior resources for many of them, and provides no rationale or guidance around why or what aspects of particular courses are valuable. We strove to limit our list of courses to those which you _really should know_ as a software engineer, irrespective of your specialty, and to help you understand why each course is included. 206 | 207 | freeCodeCamp is focused mostly on programming, not computer science. For why you might want to learn computer science, see [above](#why). 208 | 209 | ### What about language X? 210 | 211 | Learning a particular programming language is on a totally different plane to learning about an area of computer science — learning a language is much _easier_ and much _less valuable_. If you already know a couple of languages, we strongly suggest simply following our guide and fitting language acquisition in the gaps, or leaving it for afterwards. If you’ve learned programming well (such as through _Structure and Interpretation of Computer Programs_), and especially if you have learned compilers, it should take you little more than a weekend to learn the essentials of a new language. 212 | 213 | ### What about trendy technology X? 214 | 215 | No single technology is important enough that learning to use it should be a core part of your education. On the other hand, it’s great that you’re excited to learn about that thing. The trick is to work backwards from the particular technology to the underlying field or concept, and learn that in depth before seeing how your trendy technology fits into the bigger picture. 216 | 217 | ### Why are you still recommending the Dragon book? 218 | 219 | The Dragon book is still the most complete single resource for compilers. It gets a bad rap, typically for overemphasizing certain topics that are less fashionable to cover in detail these days, such as parsing. The thing is, the book was never intended to be studied cover to cover, only to provide enough material for an instructor to put together a course. Similarly, a self-learner can choose their own adventure through the book, or better yet follow the suggestions that lecturers of public courses have made in their course outlines. 220 | 221 | ### How can I get textbooks cheaply? 222 | 223 | Many of the textbooks we suggest are freely available online, thanks to the generosity of their authors. For those that aren’t, we suggest buying used copies of older editions. As a general rule, if there has been more than a couple of editions of a textbook, it’s quite likely that an older edition is perfectly adequate. It’s certainly unlikely that the newest version is 10x better than an older one, even if that’s what the price difference is! 224 | 225 | ### Who made this? 226 | 227 | This guide was written by [Ozan Onay](https://twitter.com/oznova_) and [Myles Byrne](https://twitter.com/quackingduck), instructors at the [Bradfield School of Computer Science](https://bradfieldcs.com) in San Francisco. It is based on our experience teaching foundational computer science to hundreds of mostly self-taught engineers and bootcamp grads. Thank you to all of our students for your continued feedback on self-teaching resources. Thanks too to Alek Sharma, Omar Rayward, Ammar Mian and Tyler Bettilyon for feedback on this guide. 228 | 229 | You may also like to join our mailing list: 230 | --------------------------------------------------------------------------------