Live data from Hacker News

Ask HN: How you get familiar with a codebase fast?

news.ycombinator.com

1–10 of 11 posts

Re: Ask HN: How you get familiar with a codebase fast?

#5
I read it, skim every module if I can. E.g. I worked on a 500-file project (Broadcom had managed to take a 9-module driver and refactor it into 500 files!), reduced it to some classes and simplified headers. When I was done (took weeks) it was like 1% the size of the original pile. And I think I had not left anything important behind.

Re: Ask HN: How you get familiar with a codebase fast?

#8
I wrote a program that parses all files in the codebase (I mainly work with Objective-C frameworks and libraries), and forms a graph using all the imported 'header files' in each file. Then when I need to fix a bug or implement an API, I input the base-file name and the program spits-out all the header dependancies of the base-file in a tree format. This way I am able to limit the area of the codebase I need to focus on to solve the issue at hand. I keep on focusing on these small areas of codebase one after another and get familiarized with it pretty quickly.

Re: Ask HN: How you get familiar with a codebase fast?

#9
"Rapid learning" and troubleshooting methods. The process for both of these is nearly identical, although some details differ. There are several books by Steve Litt that go over these and I found helped me troubleshoot problems faster than most of my co-workers, but the same principles helped me to understand a new code base much faster.

Available books by Steve Litt: http://www.troubleshooters.com/bookstore/index.htm

A nice book package, I recommend these to every developer I meet: http://www.troubleshooters.com/bookstore/recession_package_a...

His website isn't pretty, but the content is golden.

Post reply on HN