02-14-2015, 06:31 AM
(This post was last modified: 02-14-2015, 06:40 AM by LogicParrot.)
Hello, I am planning to do some contributions to MCServer. I have questions about programming in general, mainly about approaching large codebases.
I am good at tackling specific, narrow algorithms. This is why I am planning to implement an A* algorithm for MC-server (Sorry for the delay!). I am interested in learning the MC-server codebase, However, I have never worked on a codebase as large as this and to be honest I don't know how to approach it.
Don't get me wrong, I can definitely implement the algorithm while being blissfully ignorant of the bigger picture, provided I learn the few parts of the interface I need. E.g. (roughly) Give me a getBlockAtPos function and I can implement the A* it without knowing the rest of the code base.
But that's what I always do, whenever I want to contribute to some large project, I always ask someone to tell me the where the small bits of the interface that I need are found, and I end up with a collection of several functions from the codebase that I deal with, and then do my own little narrow work, completely ignorant of what the rest of the codebase does. While this approach works, it has many disadvantages. So this time, I want it to be different. I want to properly learn the codebase.
But how? I have never dealt with gigantic code mass before. What are the best approaches for digesting a big project? How does one approach this in general? Do you only study the headers first? Do you just read the files over and over till you get it? Are there any techniques? Any reading material that can help me? Is it even practical for a single human being to know every corner of such codebase?
Please share your thoughts,
Thanks!
I should add that I don't have any problems at all with large codebases that *I* wrote by myself. My questions are about diving into a codebase that others wrote.
I am good at tackling specific, narrow algorithms. This is why I am planning to implement an A* algorithm for MC-server (Sorry for the delay!). I am interested in learning the MC-server codebase, However, I have never worked on a codebase as large as this and to be honest I don't know how to approach it.
Don't get me wrong, I can definitely implement the algorithm while being blissfully ignorant of the bigger picture, provided I learn the few parts of the interface I need. E.g. (roughly) Give me a getBlockAtPos function and I can implement the A* it without knowing the rest of the code base.
But that's what I always do, whenever I want to contribute to some large project, I always ask someone to tell me the where the small bits of the interface that I need are found, and I end up with a collection of several functions from the codebase that I deal with, and then do my own little narrow work, completely ignorant of what the rest of the codebase does. While this approach works, it has many disadvantages. So this time, I want it to be different. I want to properly learn the codebase.
But how? I have never dealt with gigantic code mass before. What are the best approaches for digesting a big project? How does one approach this in general? Do you only study the headers first? Do you just read the files over and over till you get it? Are there any techniques? Any reading material that can help me? Is it even practical for a single human being to know every corner of such codebase?
Please share your thoughts,
Thanks!
I should add that I don't have any problems at all with large codebases that *I* wrote by myself. My questions are about diving into a codebase that others wrote.