[PythonCAD] Centralized SCM not the problem
Eric Wilhelm
scratchcomputing at gmail.com
Fri May 25 10:00:47 CEST 2007
# from José Antonio Martín Prieto
# on Thursday 24 May 2007 11:39 pm:
>So I have a suggestion. In order to help casual developers, maybe Art
>(and other expert developers, if any) could write a more exhaustive
>guide for PythonCAD coding, so that the architecture is more
>understandable.
Has there been any work in the python community to create dot (graphviz)
diagrams of code flow/linkage? Yes that could be difficult to do as
static analysis, but maybe possible at runtime.
Possibly just adding a hotkey to dump a trace from A to B (e.g.
Ctrl+Alt+A sets the start and Ctrl+Alt+B dumps the trace.) I'm not
familiar with the python debugging scheme, but this sort of thing would
definitely give casual developers a way to figure out what code is
being triggered by their actions in the GUI.
Maybe you want the "trace" module? (trace.run() has to run on main() ?)
If it means relaunching, then possibly the hotkeys are just to mark the
trace output, then maybe a post-process filter to dump just the
relevant bits?
If it requires pdb, maybe it would be beneficial to write a frontend
that allows newbies to extract this information without really learning
the debugger. That, or a howto.
If you understand objects/classes/methods, you can probably manage to
make a useful change in a big program even without learning everything
about it. The trouble is usually in the several hours spent trying to
figure out how we get from main() to foo.thingamajig() and/or
discovering that thingamajig is the method in question.
I spent the better part of last week discovering how mozilla's
link-clicked handling works. It took me way too long to discover the
magic environment variable NSPR_LOG_MODULES and even then the code flow
and consequence was far from intuitive. I think python has the tools
to make that much easier :-D
--Eric
--
Chicken farmer's observation: Clunk is the past tense of cluck.
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the PythonCAD
mailing list