in reply to Seeking advice about learning another's code
The other thing I do that helps me tremendously is to start encapsulating sections of code into functions (especially when the script has been written in a procedural fashion as opposed to a function-oriented program) to clean up the flow. Instead of many confusing lines, you have a few function calls, some of which you will get and some you won't. It's much easier to dive into the function you don't get than to try to extract its meaning from all the context around it when the script has been written procedurally.
If you are on a deadline, what you may realize if you comment the code and put related code into functions is that you don't have to mess with some of the parts you don't understand. As long as they still work, you may only have to change or work with the rest of the script and you can go back when you have time and learn the rest.
I hope this makes sense and helps you.
|
|---|