1. Find one thing you know the code does, and trace those actions backward, starting at the end

    Say, for example, you know that the code you're viewing ultimately creates a file with a list of movie titles. Figure out where in the code - the specific, few lines - it generates that file.

    Then, move one step backward and figure out how it places the info in the file.

    Them, move another step backward and figure out where the info came from

  • how the body of code is organized(where variables are defined, where different types of functions are located, etc)

  • the person's style of coding

  • how the person who wrote the code thinks and problem solves

[ a big file of code that doesn't really mean much at all to you ]

you'll now be looking at:

[ still a big file of code, but where you now understank a few specific sections ]

using "chains of actions" to gradually understand a never-before-seen piece of code

  1. Rinse and repeat

    Repeat that process multiple times, and you'll rapidly increase your understanding of more and more pieces of the overall codebase

    The reason that works well is that, in all cases, a body of code is designed to tackle one or more complex problems. So you'll always have those "chains of actions" throughout

    And the more you can gain an understanding of how different parts of the code are connected, the more you'll develop an understanding of the entire codebase

    The more good code you see, the easier it becomes to read and understand all code, and the faster you cando so

    The more you watch to expert examples, the better you can become. The less exposure you have to experts or result of expert workm the less likely you are to develope expert skills

  2.  

What's the best way to read and understand someone else's code?的更多相关文章

  1. .net点选验证码实现思路分享

    哈哈好久没冒泡了,最进看见点选验证码有点意思,所以想自己写一个. 先上效果图 如果你被这个效果吸引了就请继续看下去. 贴代码前先说点思路: 1.要有一个汉字库,并按字形分类.(我在数据库里是安部首分类 ...

  2. C# 在腾讯的发展

    本文首发我的微信公众号"dotnet跨平台", 内容得到大家热烈的欢迎,全文重新发布在博客,欢迎转载,请注明出处. .NET 主要的开发语言是 C# , .NET 平台泛指遵循EC ...

  3. 你必须知道的EF知识和经验

    注意:以下内容如果没有特别申明,默认使用的EF6.0版本,code first模式. 推荐MiniProfiler插件 工欲善其事,必先利其器. 我们使用EF和在很大程度提高了开发速度,不过随之带来的 ...

  4. 关于CryptoJS中md5加密以及aes加密的随笔

    最近项目中用到了各种加密,其中就包括从没有接触过得aes加密,因此从网上各种查,官方的一种说法: 高级加密标准(英语:Advanced Encryption Standard,缩写:AES),在密码学 ...

  5. 试试SQLSERVER2014的内存优化表

    试试SQLSERVER2014的内存优化表 SQL Server 2014中的内存引擎(代号为Hekaton)将OLTP提升到了新的高度. 现在,存储引擎已整合进当前的数据库管理系统,而使用先进内存技 ...

  6. CoreCLR源码探索(一) Object是什么

    .Net程序员们每天都在和Object在打交道 如果你问一个.Net程序员什么是Object,他可能会信誓旦旦的告诉你"Object还不简单吗,就是所有类型的基类" 这个答案是对的 ...

  7. 【.net 深呼吸】细说CodeDom(3):命名空间

    在上一篇文章中,老周介绍了表达式和语句,尽管老周没有把所有的内容都讲一遍,但相信大伙至少已经掌握基本用法.在本文中,咱们继续探讨 CodeDom 方面的奥秘,这一次咱们聊聊命名空间. 在开始之前,老周 ...

  8. 【.net 深呼吸】细说CodeDom(1):结构大观

    CodeDom 是啥东东?Html Dom听过吧,XML Dom听过吧.DOM一般可翻译为 文档对象模型,那 Code + DOM呢,自然是指代码文档模型了.如果你从来没接触过 CodeDom,你大概 ...

  9. Asp.Net Mvc 使用WebUploader 多图片上传

    来博客园有一个月了,哈哈.在这里学到了很多东西.今天也来试着分享一下学到的东西.希望能和大家做朋友共同进步. 最近由于项目需要上传多张图片,对于我这只菜鸟来说,以前上传图片都是直接拖得控件啊,而且还是 ...

  10. 十分钟介绍mobx与react

    原文地址:https://mobxjs.github.io/mobx/getting-started.html 写在前面:本人英语水平有限,主要是写给自己看的,若有哪位同学看到了有问题的地方,请为我指 ...

随机推荐

  1. 20200924--图像相似度(奥赛一本通P92 5多维数组)

    给出两幅相同大小的黑白图像(用0-1矩阵)表示,求它们的相似度.说明:若两幅图像在相同位置上的像素点颜色相同,则称它们在该位置具有相同的像素点.两幅图像的相似度定义为相同像素点数占总像素点数的百分比. ...

  2. 【python】第二模块 步骤一 第二课、数据库表的相关操作

    第二课.数据库表的相关操作 一.课程介绍 1.1 课程介绍 学习目标 管理逻辑库和数据表 创建.删除.修改逻辑库和数据表 了解常用的数据类型和约束 字符串.整数.浮点数.精确数字.日期.枚举.主要约束 ...

  3. layui相关问题总结

    1.layui table回显选中 1) radio: done:function(res, curr, count){ for(var i = 0; i < res.data.length; ...

  4. obs问题记录

    1.安装obs后,可能无法使用,需要下载dll文件,我的阿里云盘中有: 2.录制时电脑没电会报错'编码器错误': 3.插上声卡后播放视频想听到声音需要在声卡上插耳机听: 4.

  5. 洛谷 P1832 A+B Problem(再升级)题解

    START: 2021-08-09 15:28:07 题目链接: https://www.luogu.com.cn/problem/P1832 给定一个正整数n,求将其分解成若干个素数之和的方案总数. ...

  6. 斐讯K2路由器刷机教程

    为了避免斐讯后门程序. 我用的win10系统 我刷的是华硕的老毛子 Padavan,我放的是压缩包,请解压到桌面! 下载地址: 链接:https://pan.baidu.com/s/1O_spSek- ...

  7. Ext.form.ComboBox 中如何移除事件,如何添加事件,动态设置事件

    Ext.form.ComboBox 中如何移除事件,如何添加事件 背景: 希望Ext.form.ComboBox动态设置forceSelection属性,动态控制Combobox的可读可写状态,是否允 ...

  8. react 收集表单数据 react-hook-form

    import React from 'react' import ReactDOM from 'react-dom' import { useForm } from 'react-hook-form' ...

  9. Halcon代码导出到.net FrameWork/WPF

    1. 应用背景 在工业项目中,往往需要使用机器视觉结合人机界面开发特定的,面向工艺的项目.机器视觉中,Halcon无疑是功能强大的,能快速应用到项目的视觉产品,而WPF则是解决人机界面的利器.因此了解 ...

  10. python 部署django项目到公网 无法连接

    https://blog.csdn.net/xiongzaiabc/article/details/108448390 服务器后台运行: https://www.jianshu.com/p/4041c ...