3 ms·
I work on AOSP, which is a fairly larger code base. During the early years, the documentation on the internals of Android was close to non-existent. Plenty of t
by ignoramous 11y ago
I work on AOSP, which is a fairly larger code base. During the early years, the documentation on the internals of Android was close to non-existent. Plenty of tutorials in Mandarin/Cantonese, but not many in English.
A good way to get hang of the code base was to read it (usually using a tool like sourcegraph [0], pfff [1], open-grok [2], doxygen [3], javadocs [4]). Although a lot of people have argued that code is to be not treated like literature [5], but in this case, there was no choice.
The second step was to see if assumptions about the what the code does is correct. This is usually achieved by adding log statements, writing sample apps, and debugging in general.
Repeat the steps above, over and over again.
Checklist:
1. No matter what you do, you absolutely need to document everything you understand / misunderstand about the code base.
2. Never underestimate value of having a different pair of eyes look at code you have hard time reasoning about.
3. Be in constant search for resources (like books, blogs) available on the code / topic of your interest. You'd learn amazing amount by reading through other people's analysis. Stackoverflow is a great start. Heck, you can even ask well thought-out questions on Quora/Stackoverflow.
4. Hang out on related IRC channels / community mailing lists. For things written in esoteric languages such as OCaml, I found these to be pretty helpful.
5. You could blog about it, share the information you know over email lists, setup wikis; and people who know better would correct you. Its a win-win.
Good luck.
[0] http://sourcegraph.com/ http://sourcegraph.com/
[1] https://github.com/facebook/pfff https://github.com/facebook/pfff
[2] https://opengrok.github.io/OpenGrok/ https://opengrok.github.io/OpenGrok/
[3] http://www.stack.nl/~dimitri/doxygen/ http://www.stack.nl/~dimitri/doxygen/
[4] http://www.oracle.com/technetwork/articles/java/index-jsp-135444.html http://www.oracle.com/technetwork/articles/java/index-jsp-13...
[5] http://www.gigamonkeys.com/code-reading/ http://www.gigamonkeys.com/code-reading/