Let's say you want to start contributing to an open source project with thousands LOC. I am interesting in ways/suggestions on how you would start learning/hacking the new system.
Documentation, running the code itself, other developers, and tests are all useful tools for gaining that level of understanding. They also come in handy for learning more details as needed.
Learn with a purpose. I think you'll learn best if you have in mind some goal -- fix this or add that functionality. Start looking for the likely places where you will need to make your changes. Follow threads of control backwards to find out how to get to that point in the code. Also, take a "bird's eye" view of the code -- look at the layout and structure. Good code will have descriptive names that tells you want each class and method is for. See if you can recognize implementation patterns and see where/how they are used. Don't put too much stock in the documentation -- documents can be excellent, but they are often out of sync with what the code really does. Let the code itself be the best documentation.
If you want books that I found useful for learning how to learn from the code, I would check out Diomidis Spinellis's books Code Reading: The Open Source Perspective and Code Quality: The Open Source Perspective.
For your specific question, I would start with Code Reading. But both are good books.
Skim through the code, looking for places where you think you know what is occuring. Read through those sections to see if your initial thought holds up, and then try modifying it to see if you can change it to do something else.
I'd suggest that this be guided slightly by the project roadmap so you can then move on to spotting where new features and bug fixes are so you can contribute in a meaningful manner.
Also, read the documentation and any spin-up documents that may exist (functional specs, requirement specs, etc). This can further help you learn the code ropes quicker :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With