Settings

Theme

Ask HN: What are your tips for reading code?

1 points by Edmar 7 years ago · 1 comment · 1 min read


Reading other peoples code is a constant part of our work as developers. What are the most interesting tips you have on reading code?

rasengan 7 years ago

When I want to fully understand others code, I actually comment it, in my own words.

This seems to help me a lot.

Secondly, using an editor with expandos helps. Sometimes it’s better to simply know what a function requires and returns as opposed to reading the inner code of the function when you’re trying to get a full high level view of what the code is doing.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection