3 ms·
Graphical representations tend to be better than 2D text when dealing with concurrent streams of execution. You can do it in plain text, but either it is diffic
by kitd 4y ago
Graphical representations tend to be better than 2D text when dealing with concurrent streams of execution. You can do it in plain text, but either it is difficult to follow or it becomes a mess of text alignments.
IME.
- mjburgess 4y agoPerhaps, but how much of that it just an imperative phrasing? I think the visual capabilities of horizontal and vertical spacing are, certainly, vastly under-used. We could easily divide regions of files into two 60chr lines, or many 20char lines, GetWater . Boil(Water) | | GetCoffee, GetMilk, GetCup . Grind(Coffee) | | Pour(Milk) . Brew(Coffee, Water) . Pour(Coffee) .
- blondin 4y agothis sounds good for pure concurrent processes. but synchronization will be harder to represent using vertical bars.
- kitd 4y agoBut you quickly come up against problems of text alignment, trying to show 2+ theoretical streams of text on one 2D page, and it's a pig to get the DX right. A specialist editor would help, but then you could ask, why not just use a structured doc in eg JSON and represent it graphically. For background, I wrote a tool that would convert an ASCII art diagram in comments describing the state flow of a class into a set of method declarations in the class. Even using online diagramming tools, it's not easy.
- WillAdams 4y agoThis is the route I've been going w/ my work on 3D --- I program in BlockSCAD and make modules for each component, or aspect of a component, and then the design can be visualized as the options/logic which arrive at a particular iteration.