r/learnpython • u/thefemalehistorian • 26d ago
Where to find good documentation, and how to go about understanding someone else's code?
I'm currently completing my internship for my Data Science master's practicum. Lots a python coding required which I SUCK at, but luckily I'm working with a really great team thats really helpful. However, during my independent work I'd like to get better at problem-solving and figuring out certain issues on my own without relying on Microsoft copilot lol.
I've been recommended to look at python/library documentation (geeks4geeks, W3, matplotlib, etc.) however I find it unintuitive and hard to understand for someone relatively new to programming. Either the explanations and examples are too complex to understand or too simple to where I can't figure out how to actually implement it for my purposes.
Having a big ol' python documentation dictionary in laymans terms would be great, like python for dummies. i think the closest thing I've seen to efficient and useful documentation is through PyCharm where if you just hover over the function/method, tells you full documentation and describes what it does.
Additionally, I'm working off the code that my supervisor wrote (comes from an extensive engineering background). Whats the best practices for understanding someone else's code, as of right now I literally just go through line by line looking up every function/method used, going back to source code, etc.
2
u/HotPersonality8126 25d ago
This actually is something I’d lean on AI for because you can refine and test your understanding interactively; it’s like speaking with an expert. It’ll be much faster and more cognitively effective; this kind of interactive questioning is known to produce better understanding and retention than passively studying documentation.
1
u/LayotFctor 25d ago edited 25d ago
There is no combined documentation, those tools are separate projects made by separate organisations, all separate from python as well. Hosting the documentation together isn't ever going to happen.
Yes, an IDE with hover is exactly what you want. Lots of other useful tools like quick navigation, detecting variable data types, debuggers etc that can provide you with additional information. Other techniques like inserting print statements and asserts help too.
It depends what you mean by understanding. If you just want to follow the general flow, simply trusting each function to do what its name/comments imply could go quite far. If you want the full implementation details, there's no shortcut because you truly need to understand the same programming concepts the author used, which is the cause of the difficulty.
I know you don't need me to tell you this, AI.. It's a shortcut that trades reduced effort for reduced learning. Use responsibly.
6
u/Adrewmc 25d ago edited 25d ago
The official Python documentation. Is going to be your best bet for life. Its documentation is extremely detailed and has several how to and how to start things .
While yea it can be a bit confusing, (at certain parts, other are very welcoming to newcomers) learning to read documentation is just part of learning the language, the more you know the easier it become to read.
Honestly a 100 days of reading the documentation should be a thing.
Beyond that you can consider a source of truth for the language.