Getting familiar with a new code base

Last week, I was looking at the code for a project. I was unfamiliar with the domain, some of the frameworks it utilised, and its architecture. In addition to this, the project documentation is extremely limited or out of date, mainly due to the relative immaturity of the project, and the fast pace of change in development. As it is an open source project, I don’t have access to the other developers, except through the project forum and mailing list.

What makes it difficult

When unfamiliar with the domain, it is not always easy to find the key classes that contain the domain logic. Some domains use relatively abstract or ambiguous terms for names of objects.

It can be difficult to find out how code is executed – for example when the concrete implementations of interfaces are configured through an IoC container and interception.

How I tackled the problem

  • By reviewing any unit tests
  • Reviewing documentation and scanning forums for items of interest
  • Set breakpoints in UI to try and understand lifecycle of application, and identify key classes from call stack. This is useful for understanding how information is retrieved and rendered onto the screen.
  • Noting down any key classes for future examination
  • Identifying patterns and frameworks used for further research
  • Attempt to fix some bugs/small issues to give your probing some concrete direction. You should seek feedback via code review or the committer if open source.
  • The final stage is when you understand the project architecture and idioms, and are able contribute new features and feel comfortable that they integrate well with the rest of the application
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
This entry was posted in Uncategorized. Bookmark the permalink.