r/learnpython • u/rkarl7777 • Jul 16 '20
Where to learn about Python program structure/design?
I'm self-taught in Python and am able to write programs that work, but I still don't feel like I know what I'm doing. Where can I learn about program structure/design?
I usually just start coding and one thing leads to another and pretty soon, I'm done. But I can't shake the feeling that a professional programmer would look at my code and laugh at how haphazard and inefficient it is. Any pointers or suggestions? Or are we just supposed to figure it out for ourselves?
375
Upvotes
13
u/sebawitowski Jul 17 '20
A good place to start is the cookiecutter package. You select what kind of project you want to do (a Python module, Flask/Django app) and it generates a scaffolding with some sensible defaults. This will help you start with good structure.
I recorded a tutorial how to start Python projects. It might be too basic for you, but maybe you will find something useful there (the part about cookiecutter starts around 1:04:20) : https://www.youtube.com/watch?v=WkUBx3g2QfQ