I need help on how to plan a code. I am a beginner and have completed the basics of python programming. I can write functions, use classes and all that but when it comes to doing a project, I tend to cram everything in one file with long lines of code. When I go github and check out others projects, I see how smartly they’ve been organized into different modules and imported and all that. They use classes they way they are supposed to be used. Is there any way to learn those stuff or that is meant for computer science guys.? Any reference?
One way is the way you said, look at others code. But don’t follow it exactly because theirs may not be good, just different from what you have. OOP. MVC. Look for code that you think belongs together and put it together.
Honestly, it’s hard. But the fact that you realize this is the start of the road to wisdom. The best thing is to work at a top tech company for a couple of years as an SDE, learning by reading a ton of code and getting feedback. Failing that, try reading up on object oriented design and design patterns (factory, observer, etc.) read up on “SOLID” and “DRY.” I am biased of course but I think open source Microsoft code is a good sample to get a feel for how this is done.
HR Issues
Yesterday
1468
My boss found out I’m Jewish 😱 what do I do.
Health & Wellness
Yesterday
2174
Guys who don’t work out: why?
Ask Blinders
Yesterday
1239
Top red flags in guy to see before saying yes to marriage (arranged)
Tech Industry
11h
2943
11 offers to laid off[UPDATE]: 5 offers
India
Yesterday
594
Duniya me Vishwaguru ka Danka
Pair with someone who knows how to design. You need to start the domain and requirements, not the code itself