I recently got started with a very large code base for a project, and I can't find my way through it, the documentation is very bad, do you have any specific advice for getting started with such code base ? Any tips will be helpful.
Debuggers are great for this. Nothing will teach you like stepping through the code. Do whatever it takes to get one working.<p>I recommend replying to your question with at least a <i>bit</i> more detail, particularly the language or languages in question and what the general environment is. I could be more detailed for a few environments but I don't want to just blindly guess.
Write tests for every behavior the system currently exhibits.<p>Then systematically comment out everything -- one function/block/class/whatever at a time -- making note of which tests break.<p>That should give you a better idea of how everything hangs together -- and uncover the parts that aren't even used anymore.<p>Almost any software that you inherit, that has been around for a while, will be a complete mess.<p>If you have time for a book, Michael Feathers' Working Effectively with Legacy Code will likely help a lot.
I found this [1] in a comment where someone asked a similar question. This really helps only if you are using a git repo though. There are some good gems in this [2] thread too.<p>[1]: <a href="https://github.com/gilesbokett/rewind" rel="nofollow">https://github.com/gilesbokett/rewind</a><p>[2]: <a href="https://news.ycombinator.com/item?id=9784008" rel="nofollow">https://news.ycombinator.com/item?id=9784008</a>
<i>Take notes</i> (external to the code) on everything you learn about a given module, whether code/flow analysis, insights on input / output / objects, visible interactions, and what it reveals about how project-specific libraries are used. Otherwise, it's so easy to have an "oh, <i>that's</i> what that does" insight and lose it later because you assumed you'd remember it.