惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
S
Securelist
Simon Willison's Weblog
Simon Willison's Weblog
T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
P
Privacy & Cybersecurity Law Blog
V2EX - 技术
V2EX - 技术
O
OpenAI News
N
News and Events Feed by Topic
AI
AI
P
Proofpoint News Feed
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cloudbric
Cloudbric
Help Net Security
Help Net Security
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Security Latest
Security Latest
Application and Cybersecurity Blog
Application and Cybersecurity Blog
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
The Hacker News
The Hacker News
Hacker News - Newest:
Hacker News - Newest: "LLM"
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
H
Hacker News: Front Page
C
Cisco Blogs
Webroot Blog
Webroot Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Last Watchdog
The Last Watchdog
PCI Perspectives
PCI Perspectives
AWS News Blog
AWS News Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Forbes - Security
Forbes - Security
I
Intezer
Project Zero
Project Zero
C
CERT Recently Published Vulnerability Notes
T
Tenable Blog
TaoSecurity Blog
TaoSecurity Blog
S
Security @ Cisco Blogs
N
News | PayPal Newsroom
H
Heimdal Security Blog
W
WeLiveSecurity

博客园 - Jackei

《清单革命》 《我所知道的软件测试自动化》- 关键字驱动的过去和未来 奔向 33 岁了 《我所知道的软件测试自动化》- 关键字驱动的过去和未来 《我所知道的软件测试自动化》- 引子 看看五年前的自己,有些惭愧 2012 11 11 程序员的思维修炼 - 从新手到专家(2) 程序员之外的人是否应该活下去? 程序员的思维修炼 - 从新手到专家(1) 《激荡三十年(上)》的笔记 - 3 2012-4-26 对测试的各种吐槽 如何测试一个编译器? 2010-7-1 麻木的IT公民:293个公司人压力和心理调查 醉里挑灯看剑 我的C语言也很牛B啊! 王小波,《孔子》,傻大姐 对于每个复杂的问题都会有一个简单但不准确的答案
阅读分析源码的规则
Jackei · 2012-05-17 · via 博客园 - Jackei

阅读分析源码的规则

Posted on 2012-05-17 10:36  Jackei  阅读(1406)  评论(2)    收藏  举报

前段时间一直在看一些代码,发现 IDE 的跳转功能真是好用,经常就把人带跑了,20分钟过去,已经在迷宫中迷路,甚至忘了要去哪里。类似的主题不知道有没有人写过,有兴趣的朋友权且看看吧,反正我自己在写完这些东西以后,再分析源码效率高多了。

1. 目的一定要明确

  • 我为什么要分析这些代码
  • 我希望解答的问题是什么
  • 忘记了最开始的目的就容易迷路

2. 先建立全局观:类似英文阅读理解

  • 先看完整个 class/method,理解清楚整个流程,再分析细节
  • 不影响对整体流程理解的,先略过

3. 防止迷路:就像探索迷宫

  • 一边分析,一边记录分析路径,防止不小心走到不知哪里去了
  • 一步步深入,走不通就回溯到前一个分支点

4. 有时间观念

  • 为每个分析节点设置 time box,过时就要回溯到上一个分支点,防止无限期的陷入到细节中

5. 突破点:解决问题的关键

  • 快速找到对解答自己问题最有帮助的 code block 或数据实体,就有希望快速解答整个问题

刷新页面返回顶部