Should i try to read and understand the entire thing first? |
As you said, there are projects with millions lines of code (e.g. libreoffice has about 5 MLoC), and even hundreds of millions (none in open source, I think, but I worked on a 175 MLoC codebase before).
Trying to "read and understand the entire thing" before doing any work does not scale.
it better to just stay focused on something small |
That's what always worked for me: even if you have ideas for something big, first fix a few simple bugs, implement a few low-priority small-scale enhancements, and you will have code you recognize and understand, the procedures become familiar, and other devs see you as valuable help.
what happens when that something small is spread out and could potentially be a conflict with something else? |
First of all, don't be afraid to break code. If it is really a "very well organized" project, the unit tests will direct you to the exact bit of functionality you didn't think of. If not, this will expose lack of coverage and it's a good thing.
Second, if you're changing some "spread out" code, look at who wrote it and if they are still around, ask them to review the changes: they might care about it, it is a polite thing to do.