Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

读源码的正确姿势 #10

Open
ShannonChenCHN opened this issue Apr 11, 2017 · 3 comments
Open

读源码的正确姿势 #10

ShannonChenCHN opened this issue Apr 11, 2017 · 3 comments

Comments

@ShannonChenCHN
Copy link
Owner

ShannonChenCHN commented Apr 11, 2017

  • 为什么要读源码?
    • 开阔眼界,扩大知识面
    • 寻找启发和灵感
    • 寻找更好的方案,用于参考
    • 防止闭门造车
  • 读什么源码?
    • 经典源码(GitHub 排行榜上靠前的)
      • 适合精读
    • 自己在工作中或者平时写代码时,找找功能相似的比较好的源码
      • 适合模仿
    • 平时瞎逛(GitHub trends 或者微博、twitter)时无意中看到的比较好的源码
      • 适合浏览,了解思路找启发和灵感
  • 如何阅读源码?
    • 精读
    • 泛读
@ShannonChenCHN
Copy link
Owner Author

@ShannonChenCHN ShannonChenCHN changed the title 【学习笔记】读源码的正确姿势 【话题】读源码的正确姿势 May 1, 2017
@ShannonChenCHN
Copy link
Owner Author

ShannonChenCHN commented May 6, 2017

  • 从最早的版本开始读,看 commit 记录,相关 issue
  • 精读,读至少 3 遍:第一遍纵览全局,了解大概设计思路、设计思想、涉及到的技术点;第二遍
  • 泛读
  • 总体上:画类图、架构图
  • 想想自己设计一个这样的框架该怎么写
  • 作者为什么这么写,背后的意图是什么
  • 细节上:尝试弄懂每个相关的知识点,第一次不可能全都弄清楚,实践应用后再多读几遍就慢慢清楚了
  • 提出一些自己的看法或者质疑,如果能提出更好的想法最好不过了
  • 经典源码要反复看,过一段时间后再看又会有不一样的收获

@ShannonChenCHN ShannonChenCHN mentioned this issue May 22, 2017
13 tasks
@ShannonChenCHN ShannonChenCHN mentioned this issue Aug 13, 2017
13 tasks
@ShannonChenCHN ShannonChenCHN mentioned this issue Oct 5, 2017
13 tasks
@ShannonChenCHN ShannonChenCHN changed the title 【话题】读源码的正确姿势 读源码的正确姿势 Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant