Harvard CS50 Week 2 Arrays 笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

上节课的时候,有一道信用卡验证的题目,看上去不用数组来解答是很困难的事情。我把这个问题分享给其他人并简单介绍了这门课,他们对这样的 C 语言作为计算机入门,并通过包装遮蔽一切指针和地址的教学做法感到困惑:Python 不是更能解决这样的问题吗?但在我看来,本周课中所涉及的内存与数组的同构性,恰恰揭示了 C 与硬件结构之间的强关联,这是使用 Python 或其他更加抽象的程序设计语言进行计算机科学入门所难以比拟的。

第 2 周的一个亮点在于通过内存与 C 语言数组的同构性掌握二者。也讲了字符串及字符串的操作,有很清楚易懂的编译环节(预处理-编译-汇编-链接)讲解,UNIX 式的启动参数思想和一些琐碎的自家小工具介绍。大部分内容引用自 CS50 课程官方的笔记

Continue reading

Harvard CS50 Week 1 C 笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

第 1 周通过横向对比的教学方法实现了从 Scratch 代码到 C 代码的迁移。除了 C 的基本语法,也初步介绍了 clang 编译器及 make 命令行工具的使用方法。大部分内容引用自 CS50 课程官方的笔记

感到有点意思的地方,一个是从 Super Mario 的问号箱联系到 Console Game 的实现(虽然被轻描淡写转化为了某种字符打印问题);还有浮点精度以及溢出问题中提到的 Boeing 787 Integer OverflowY2K Problem 都很有意思。

值得一提的是,CS50 课程组使用自行编写的 <cs50.h> 库提供了字符串类型的实现以及 Python-like 的标准输入替代函数,隐去了指针的存在,实现了 知识屏蔽。这对于初学者来说有着很大的价值。

Continue reading

Harvard CS50 Week 0 Scratch 笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

第 0 周对数据的二进制表示、面向过程的程序设计(计算思维)进行了介绍,并通过 Scratch 完成了初步的程序设计。大部分内容引用自 CS50 课程官方的笔记

Continue reading

老年不是喜羊羊真是太好了

喜羊羊好像真的不火了。

Continue reading

© 2020 雾琉璃

Theme by Anders NorénUp ↑