
Understanding unfamiliar source code can be difficult for programmers. I took on a software porting project in my first job, and this is how I dealt with getting to grips with the large, unknown codebase. I hope this is of use to any software developer trying to understand source code written by others.
It is harder to read source code than to write it.
Take Your Time
Take plenty of time to become familiar. It’s far more valuable to learn and understand the codebase at this point than to jump in and potentially add incorrect code.
Take a Copy
Before you do anything else, take a snapshot of the code you receive in a source control system (SCCS/RCS/CVS/Git/Mercurial/Subversion – whatever your fancy). Include the documentation and any binaries too.
Use the software
Forget the source code for a bit. Just use the software, over and over, as many different options and set-ups as possible. Try to understand it fully from a user perspective.
RTFM
Continue reading →