0
What are some good programming practice?
For example, is it better to only put functions in main?
4 Answers
0
You cannot put functions in main to begin with, you can only call them from main.
As you learn and get better by watching tutorials, doing research, and looking at other people's code, you eventually catch on with "good programming practice". It all just comes to you eventually. For beginners, just stay with practicing and teaching yourself the basics. After that you can start considering ways to improve your code and use better practices.
0
Yeah I know that you can't 'put' function in main, it was just that I didn't know how to say it in English
And I have to disagree with you, imo it's better to take good programming habits when you are starting to learn programming
0
You're right, it's always good to get a good knowledge of them right from the beginning. After all, you don't want code that looks like a load of shit and doesn't make sense.
Although, personally I feel learning and practicing takes priority when you're just starting off. There's no point knowing the good practices if you can't produce anything!
0
I'm a "bit" experienced in programming, and right now I want to take good habits, and I saw somewhere that only calling functions in main is a good one because the program has a better modulability