← Back to Upcase

First Steps on a Inherited large Code Base

(Robert Boone) #1


I just inherited a large code base and I was wondering what others do to get familiar with a code base.

(Jon Seidel) #2

I’m in the same boat, having just picked up a new client with a Rails application. And unfortunately the original developers created no tests [argh]. So I’m doing the following, fairly mundane things:

  1. Reading the code. I started with the directory structure and looked around there to see what “components” I had to deal with; there are a fair chunk of controllers and a CMS kind of editing feature where the users can update the contents. If I had some existing tests, I would be reading those as well.
  2. Playing with the application. I like to see what it actually looks like and works like.
  3. Write ‘characterization’ tests. Check out this Wikipedia page and and this page for a quick introduction. It helps build understanding of how things work as well as putting at least a few tests in place.
  4. Finad and make some very small changes. The client a little tiny thing they wanted updated, which meant I could actually make the change and then get it deployed
  5. Finally, make sure you understand how to deploy the app. I spent much more time getting that to work (DreamHost site) than I did make the actual change).

(Luís Ferreira) #3

You might want to take a look at this book: http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052