Ask HN: how do you read code?

https://news.ycombinator.com/item?id=483824
by ktharavaad • 17 years ago
46 26 17 years ago

As a computer programmer, I've realized that one of the best way to improve myself is to read the code written by the masters of the art and try to emulate them. This is helped by the enormous amount of opensource code out there.

However, along the way, the very act of reading code has become a stumbling block in my journey.

I'm posting this because I want to get a perspective of how other programmers approach this problem. When faced with a huge chunk of code, how do you guys read it? do you read it line by line? do you guys put it into an IDE, look at the outline and simply jump into functions you are interested in?

Do you read through the "main" function first and then branch out to the utility functions or do the reverse where you read the utility functions and subroutines first and then figure out how they are put together?

please share with me some of the tips and tricks of code reading that you have discovered.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com