3 ms·
I don't know if I'd classify the cleaner diagram as "cheating" per se, but it does trade one kind of complexity for another kind. Removing nodes by adding a con
by kibwen 2y ago
I don't know if I'd classify the cleaner diagram as "cheating" per se, but it does trade one kind of complexity for another kind. Removing nodes by adding a concept of implicit branches via "unless" clauses within a node doesn't necessarily make the system any easier to understand at a glance. Sometimes systems have good reason to be complex, and sometimes we have good reasons to hide much of that complexity, but let's not conflate hidden complexity with the lack of complexity.
If I were to suggest a way to make the original chart cleaner without changing the quantity of explicit nodes and branches, I would start by reducing it into parts that are cyclic and parts that are acyclic, then drawing clear divisions between those parts. Then you could give these encapsulated bits names and thereby make it easier for them to refer to each other (such as in the duplicated flows between local and global preferences) without having to draw a mess of crisscrossing lines.
- NBJack 2y agoI agree with you; it is hand-wavey and strays into "spherical cows in a vacuum" territory. Practical for discussions, not so great for implementations, where details matter greatly. I would presume the original diagram was meant to align on the specifics; the revised version from the author leaves much to interpretation.
- cushpush 2y ago> I expect it is also easier to verify the correctness of and find bugs in my diagram if someone were to want to. This will vary on the language in which it is implemented, right?
- IshKebab 2y agoI think it's ok to combine simple booleans into one box for the same reason we do that in code. You generally write `if a and b { foo }` not `if a { if b { foo } }`.
- nimblegorilla 2y agoFrom my perspective simple boolean means a single known value stored in one variable. I suspect the underlying code performs a number of calculations for each one of the flow chart "booleans". Of course, maybe that points to a design flaw and there should be a single policy instance that aggregates all of the variables into one place.
- coldtea 2y ago>Removing nodes by adding a concept of implicit branches via "unless" clauses within a node doesn't necessarily make the system any easier to understand at a glance. It kind of does though, because it's easier to understand what the system does in general without necessarily wanting/needing all the lower level detail. That's also one of the reasons we use functions, instead of unrolling everything into a big ball of code, no?
- MichaelZuo 2y agoThat’s not reducing complexity at all though, just hiding it… Which is fine for someone working a job that doesn’t need to understand all the stuff behind the curtain, but not fine for anyone who actually wants to understand the overall system.
- coldtea 2y ago>That’s not reducing complexity at all though, just hiding it… It's a representation. The actual thing will still have the whole complexity. What is reduced is how much complexity we take in when looking at what the thing does. When someone wants to get an idea of what the thing does, as opposed to getting into the minutiae of every subcase, such a high level view is a better fit.
- MichaelZuo 2y agoRegardless, it's not suitable for those who do need to grasp the entirety...
- coldtea 2y agoAbove some point they can just check the code. People looking at flowcharts usually don't need the entirety. Especially as the flowchart could even be out of date, or miss some of the code-level subleties.
- MichaelZuo 2y ago
- lucraft 2y ago> Removing nodes by adding a concept of implicit branches via "unless" clauses within a node doesn't necessarily make the system any easier to understand at a glance. The original diagram does this too - it has an "A && B" node.