16 hours ago
- Use a predictive approach to read code: understand the problem, imagine your own solution, then compare with actual code to spot differences.
- 2D reading examines a static code snapshot; 3D reading traces code evolution over time; 4D reading uses theory of mind to understand the author's reasoning.
- Every line of code is documentation, so read it thoroughly.
- Make it effortless to find how a code snippet evolved; git blame alone is not enough—focus on temporal history of specific snippets, not file-level changes.
- GitHub's web blaming interface is effective: use shortcuts like 'y' to resolve refs, 'b' to toggle blame, and 'blame prior to change' to step through history.
- Open commits in new tabs to explore context; switch between diff and snapshot views using URL manipulation (e.g., s/commit/tree/).
- For local workflow, use custom shortcuts to blame a line and switch to that commit in a detached HEAD, using a dedicated worktree to avoid trashing work.
- Copy GitHub links to open commits in a browser to access code review discussions, which are not part of the git repository.