4 ms·
> The results suggest that syntax highlighting squanders a feedback channel from the IDE to the programmer that can be used more effectively. Say what? As in t
by kazinator 4y ago
> The results suggest that syntax highlighting squanders a feedback channel from the IDE to the programmer that can be used more effectively.
Say what? As in the color channel may be useful in program comprehension, but wasted on lexical syntax? ... And we can tell from studying novices?
More like: opportunity to study syntax coloring was squandered on novices that don't actually understand the programming language.
Do other industries do this? In construction, do they test the effectiveness of a laser level by studying apprentices?
- nyanpasu64 4y agoAs a decidedly non-novice programmer, one thing I do when mapping out unfamiliar code architectures, which I haven't seen anyone else doing, is to generate large-scale code maps by "inlining" function call bodies into a large Google Doc, creating a deeply nested tree where indentation maps to control flow and stack depth, and vertical position maps to execution order (excluding loops). Then I often trace data flow for important variables, by giving the variable one foreground or background color, then giving all future usages of the same value (or pointers to it) the same color. Unfortunately preparing this type of document by hand is quite time-consuming. https://marketplace.visualstudio.com/items?itemName=wcrichton.flowistry https://marketplace.visualstudio.com/items?itemName=wcrichto... seems to be a preliminary attempt at tracing data flow within a function, but doesn't seem to currently handle cross-function data flow (or generate an inlined tree suitable for visualizing caller-callee and sibling-call control flow).
- kaba0 4y agoSourcetrail can give you similar (plus interactive!) visualizations automatically.
- sidpatil 4y agoWhat you're describing is generally known as interprocedural dataflow analysis. (Interprocedural because it handles dataflow across function calls.) You can look into building a tool that can extract all or at least part of that dataflow graph for you by analyzing the AST. There are different approaches to this, some being more imperative (write a program to implement a chaotic iteration algorithm which builds the graph) and some being more declarative (extract facts about the code and feed them to a Datalog engine alongside a DL program describing the relations required to build the graph, or utilize something like CodeQL which already has the functionality available.)