If you have access to a whiteboard...<p>List all of the directories (or classes, for a smaller project), and draw them as boxes on the board.<p>Draw arrows between the boxes based on dependencies in the codebase (helps if you have someone already familiar).<p>... Now start at the bottom of the dependency graph, and browse the code at a medium level.<p>If you are going to be working in this codebase, go back through and browse the code at deeper level, as if you were doing a code review. You can pretty much assume that, every couple lines, there is always something you would change about the code. Make a note of it.<p>At this point, you should have a fairly decent idea of how the code works, and how you would change it.
Well you should always ask someone who has worked with it but lately I had to come up quickly with a phone formatter class. I didn't have a clue how it worked, no comments. So I start to rewrite some of it, run it see what happens. Then when I learned what the stuff did I renamed it so it made sense to me. Used real long variable names which were meaningfull not just tmp and temp. Can really recommend it and it was very fast.
I look at what it does, do a quick architecture in my head, then compare it to what I see. This helps me because before I even look at it I have an understanding of how I think it should work rather than an absolutely clean slate.