title: What's the best way to become familiar with a large codebase?
body: <p>Joining an existing team with a large codebase already in place can be daunting. What's the best approach;</p>
  
  <ul>
  <li>Broad; try to get a general overview of how everything links together, from the code</li>
  <li>Narrow; focus on small sections of code at a time, understanding how they work fully</li>
  <li>Pick a feature to develop and learn as you go along</li>
  <li>Try to gain insight from class diagrams and uml, if available (and up to date)</li>
  <li>Something else entirely?</li>
  </ul>
  
  <p>I'm working on what is currently an approx 20k line C++ app &amp; library (Edit: small in the grand scheme of things!). In industry I imagine you'd get an introduction by an experienced programmer. However if this is not the case, what can you do to start adding value as quickly as possible?</p>
  
  <p>--<br>
  Summary of answers:  </p>
  
  <ul>
  <li>Step through code in debug mode to see how it works</li>
  <li>Pair up with someone more familiar with the code base than you, taking turns to be the person coding and the person watching/discussing. Rotate partners amongst team members so knowledge gets spread around. </li>
  <li>Write unit tests. Start with an assertion of how you think code will work. If it turns out as you expected, you've probably understood the code. If not, you've got a puzzle to solve and or an enquiry to make. (Thanks Donal, this is a great answer)</li>
  <li>Go through existing unit tests for functional code, in a similar fashion to above</li>
  <li>Read UML, Doxygen generated class diagrams and other documentation to get a broad feel of the code. </li>
  <li>Make small edits or bug fixes, then gradually build up</li>
  <li>Keep notes, and don't jump in and start developing; it's more valuable to spend time understanding than to generate messy or inappropriate code. </li>
  </ul>
  
  <p><em>this post is a partial duplicate of <a href="https://stackoverflow.com/questions/214605/the-best-way-to-familiarize-yourself-with-an-inherited-codebase">the-best-way-to-familiarize-yourself-with-an-inherited-codebase</a></em></p>