Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

How to start understanding large code projects?

Kinda silly question, but I have to understand the code of Neo4j which is mainly Java.
It's first time having to read such very large legacy code, so I'm kinda lost on where to start from.

Anyone got tips or ideas on how to start this?
Have a cool signature? hit me up and I might use it.
Depends on what your goal is. If you want to understand the whole program then you probably need to read the whole program, or you just pick out the parts you're interested in.
As for the approach I'd start at the main function and work forward from there. Try to find the important classes and components make yourself familiar with them first and skip over helper/util/parser etc classes. Once you understand what the key parts/classes of a program do you don't need to understand every line, just what they do and roughly how it's done.
Also it's like everything else in life: the more you do it, the better you become at it. Good luck
[Image: 0DvFxnA.gif]
Donate: 3ABKRghau93ziRaDfVwiiwtjky3i1gLrKn
I have been coding for ages and I struggle with reading other peoples code. When the program is small, it's alright, but when there's many lines of code, it quickly becomes frustrating to understand what they're doing. That's why I find it weird when people recommend contributing to open source projects, most of the times, you're not going to have the same approach, programming style and knowledge as the author, so that potential gap can lead to a mess.

This is why documentation is very handy, if there's documentation on how the system works from an architectural point of view then it helps a lot.
One thing I've always done is to start pawing through the unit tests if I hit a function I don't understand. Most larger projects will have pretty well maintained tests, and if you have a good IDE you can just click through and look at what's being called. You can also use a debugger set breakpoints in them and see what's actually be passed and how without needing to figure out how to make the executable do it


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by StaticCGMar 10, 2025 09:21 AM 2 142 Mar 10, 2025 09:21 AM
Last Post: StaticCG
[Python] by Dil8ertMar 14, 2021 01:30 PM 4 166 Mar 14, 2021 01:30 PM
Last Post: step1step2
[C] by C++Nov 25, 2019 12:15 PM 16 543 Nov 25, 2019 12:15 PM
Last Post: C++