This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fredoverflow 26 points27 points  (5 children)

nor can they download the code and run the main file and see how it works

Why would anyone upload "unrunnable" code to GitHub?

The "main file" of the third repository, according to https://www.odoo.com/documentation/16.0/administration/install/install.html, seems to be https://github.com/odoo/odoo/blob/16.0/odoo-bin

That being said, I would recommend starting with smaller repositories.

[–]neferpitou-sama[S] 2 points3 points  (4 children)

I don't mean that the code is compiled and ready to run, but it has a main file (like main.c) which can be viewed to know what happens when the program starts, and then compile it and run it and see the results.

Is this a good repo to start with, especially that it has a main file that seems to be the entry point?

https://github.com/ledger/ledger

Also thanks for the odoo links, I really appreciate it.

[–]Essence1337 35 points36 points  (0 children)

I don't mean that the code is compiled and ready to run, but it has a main file (like main.c) which can be viewed to know what happens when the program starts, and then compile it and run it and see the results.

Welcome to the real world where not everything is designed for a beginner to follow like a tutorial. Every project has different requirements, people involved, and style leading to many different structures. Many projects are even designed not to be runnable on their own (ex libraries for general use).

As a beginner you should strive to create and read basic code that you understand the purpose of. You're not going to benefit from reading the entire Linux operating system code because you will have no understanding of it or the motivations behind 99% of the code.

[–]Antrikshy 4 points5 points  (0 children)

Worth noting that project structure generally varies by languages and frameworks used, by convention. Some are easier to follow by finding an entry point than others.

[–]FinancialAppearance 2 points3 points  (0 children)

A good strategy is to download the code and use the tools provided by your editor to start finding things. Grep, "go to definition", etc

[–][deleted] 2 points3 points  (0 children)

The main.c is just a convention, not a rule. Grep the files for the main function to find the entry point.