H
hamilton
Is there any software to help understand python code ?
Thanks
hamilton
Thanks
hamilton
Subject: Diagramming code
Is there any software to help understand python code ?
What sort of diagrams? Control flow diagrams? Class diagrams? Sequence
diagrams? Module dependency diagrams? There are many different types
you could be referring to. Here's a relatively comprehensive list:
http://en.wikipedia.org/wiki/Unified_Modeling_Language#Diagrams_overview
Regards,
Chris
OK then, let me ask, how do you guys learn/understand large projects ?
OK then, let me ask, how do you guys learn/understand large projects ?
Am 16.07.2012 03:57, schrieb hamilton:
OK then, let me ask, how do you guys learn/understand large projects ?
1. Use the program. This gives you an idea what features are there and a bit
how it could be structured.
2. Build the program, to see what is done to get the program running. This
should give you an idea what pieces there are and where they are [from].
3. Read design documentation (which is too often outdated) which should give
you an idea what the intention of the project's structure is.
4. Read the code documentation (which is hopefully more up to date). This
should give you an idea about responsibilities within the code.
5. Read the code itself. This can also be done while single-stepping through
it with a debugger, just to see it run.
Of course there are also secondary resources like developers' and users'
mailinglists, websites, bugtrackers that provide information and help.
Sometimes, drawing a few diagrams from steps 3 and 4 to document
relationships between things is helpful. IMHO having a text describing the
relationships in prose is superior to that though. In particular a diagram
can't describe the rationale for something, you need prose for that.
HTH & YMMV
Uli
First -- by divorcing them from the implementation language...OK then, let me ask, how do you guys learn/understand large projects ?
Is there any software to help understand python code ?
Thanks
hamilton
Sometimes to get some nice graphs I use gprof2dot
(http://code.google.com/p/jrfonseca/wiki/Gprof2Dot)
or doxygen (http://www.stack.nl/~dimitri/doxygen/)
gprof2dot analyses the output of the profiling that you get running the
code through the python profiler,
doing for example:
python -m cProfile -o $STATS $FNAME $@
$GPROF2DOT -f pstats $STATS | dot -T$TYPE -o $OUT
doxygen is more useful for C++ but it's also able to infer a few things
(without running) from a python project..
Diagramming code
>
> Is there any software to help understand python code ?
What sort of diagrams? Control flow diagrams? Class diagrams? Sequence
diagrams? Module dependency diagrams? There are many different types
you could be referring to. Here's a relatively comprehensive list:
http://en.wikipedia.org/wiki/Unified_Modeling_Language#Diagrams_overview
Regards,
Chris
Diagramming code
>
> Is there any software to help understand python code ?
What sort of diagrams? Control flow diagrams? Class diagrams? Sequence
diagrams? Module dependency diagrams? There are many different types
you could be referring to. Here's a relatively comprehensive list:
http://en.wikipedia.org/wiki/Unified_Modeling_Language#Diagrams_overview
Regards,
Chris
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.