How to understand existing projects

architecture, dns

Solution

This is a very interesting question. I also would like to know how other developers do this. Up until now I use these possibilities in no particular order:

- Read the source code, it has the advantage that it is always up to date. It is also the most difficult task, but it is possible.

- Read the unit tests if they are available, they often show the intended use for a class, library or framework.

- Refactor a part of the source code. While you are improving the quality of the source code you increase your understanding of the code, or should I say you can only improve the source code if you know exactly what it does.

- Debug the application, step through the program while using a debugger.

- Use a tool like NDepends, JDepends, Lattix, Visual Studio etc. to reverse engineer the architecture or design of the application and use that as a starting point.

- Read the documentation. Any documentation that enables you to understand the application will do (user documentation, design documentation or architecture documentation).

- Communication with the original developers as Bruno said would also be a good option.

Problem

I am a trainee developer and have been writing .NET applications for about a year now. Most of the work I have done has involved building new applications (mainly web apps) from scratch and I have been given more or less full control over the software design. This has been a great experience however, as a trainee developer my confidence about whether the approaches I have taken are the best is minimal. Ideally I would love to collaborate with more experienced developers (I find this the best was I learn) however in the company I work for developers tend to work in isolation (a great shame for me). Recently I decided that a good way to learn more about how experienced developers approach their design might be to explore some open source projects. I found myself a little overwhelmed by the projects I looked at. With my level of experience it was hard to understand the body of code I faced. My question is slight fuzzy one. How do developers approach the task of understanding a new medium to large scale project. I found myself pouring over lots of code and struggling to see the wood for the trees. At any one time I felt that I could understand a small portion of the system but not see how its all fits together. Do others get this same feeling? If so what approaches do you take to understanding the project? Do you have any other advice about how to learn design best practices? Any advice will be very much appreciated. Thank you.

Original source