目录

Harvard CS50 学习笔记(零)

摘要
Harvard CS50 学习笔记(零)。

0 Scratch

0.1 Lecure

  • David Malan 上课太有激情了,我隔着屏幕都感觉到他的激情喷涌而出。

0.1 Introduction

0.2 Problem solving

0.3 Representation

0.4 Binary

  • 二进制、开关、晶体管排列。

0.5 Letters

  • 这里提出了一个问题,如果65表示A,那么计算机如何区分65的二进制是解释为A还是65。这里没有仔细回答,其实是对同一个值的不同读取(参考:https://qr.ae/pGmph2),Java中应该使用数据类型区分的。更深一点的可以参考:https://stackoverflow.com/a/45108281/17424051

0.6 ASCII

/images/Harvard_CS50/Lecture_0/ASCII.png
ASCII

0.7 Unicode

  • Emoji 和字母本质上是一样的,不同设备的显示可能不同。

  • Unicode只是定义了标准化的存储。

0.8 Color

  • 颜色表示也是一样的,RGB的255。

0.9 Images

  • 一堆颜色。

0.10 Videos

  • 一堆图片,快速切换。

0.11 Music

  • MIDI:数字表示音调。

0.12 Questions on representation

0.13 Algorithms

0.14 Time to solve

0.15 Pseudocode

  • 伪代码(注意考虑corner case——边角案例)
/images/Harvard_CS50/Lecture_0/Pseudocode.png
Pseudocode

Function / Condition / Boolean / Loop

0.16 Scratch

MIT做的小朋友编程学习网站。

0.17 Sprites

0.18 Grid

0.19 Scratch blocks

0.20 Hello world

0.21 Say

0.22 Join

0.23 Inputs to outputs, outputs to inputs

0.24 Text to speech

0.25 Meow

0.26 Loops

  • 复制粘贴的时候,可能就是哪里没搞对的时候。

0.27 Custom blocks

  • 抽象再抽象,其实有很多可以继续抽象的地方。行为方法话,抽象出许多小方法。

0.28 Custom blocks with input

  • 把大问题模块化,模块再细化,直至解决这个问题。《这就是软件工程师》里鲁鹏俊说的架构设计也是这么个思路。

0.29 Conditionals

0.30 Forever

0.31 Video sensing

0.32 Whack-a-mole

0.33 One piece at a time

0.34 Oscartime

0.35 Oscartime stage

0.36 Oscartime trash can

0.37 Oscartime falling trash

0.38 Oscartime dragging trash

0.39 Putting Oscartime together

0.40 Movement

0.41 Movement’s abstractions

0.42 Bouncing

0.43 Following

0.44 Ivy’s Hardest Game

0.2 Problem Set 0

  • 没写