Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making yourself familiar with projects [closed]

Today i did a checkout of some open-source projects just out of curiosity. So after a while i was looking at the code of OTTD (http://www.openttd.org/), i just didn't know where to start looking or how to understand the project. I know you cant get familiar with such big projects in one or two days, but how do you guys handle such things where do you begin what do you look for etcetera etcetera..

like image 474
slayerIQ Avatar asked Oct 26 '22 22:10

slayerIQ


2 Answers

Docs for the source of OpenTTD: http://docs.openttd.org/ , they will be helpful.

Also, dev wiki: http://wiki.openttd.org/Development .

How to get familiar?

First, try compiling. Compile it to your platform and make sure it's running correctly.

Then, pick up a bug or something from to-do list and try to implement it, or just play the game and think about adding/changing something simple. Of course you can fail and want to change your task, but every try will be a step into understanding a structure of a project.


For me, the compiling part is most annoying part. I think it's because I'm on Windows :-) I've hardly ever managed to compile something from scratch without days of thinking and spamming people etc. But I quickly get used to many projects which aren't needed to be compiled, such as written in PHP or Python or JavaScript.

I just did something with the code. Changed some important constants :-) Writing plugins. Whatever. And one day I understood that now, If I choose almost any task from issue tracker, I'll be able to find out at least where the problem located.

If you're just reading code, you aren't gonna know it well! Even (good) fiction books can't be understood fully only by reading them again and again.

like image 138
Valentin Golev Avatar answered Nov 08 '22 11:11

Valentin Golev


  1. Download the code.

  2. Set it up in your favorite IDE so that it builds and runs.

  3. Set a breakpoint at the beginning of main()

  4. Spend some quality time stepping through in the debugger :)

Gives you a good feel for how things are put together, where the dependencies are, and what happens when you do things in the app.

like image 24
Eric Petroelje Avatar answered Nov 08 '22 11:11

Eric Petroelje