Novice Questions: Flow Chart design


#1


[If you’re not seeing the image above, log in to My.Opto22]

Speaking of Flow Charts, I recently had the opportunity to see some flow charts written by someone who’d never done any kind of programming, flowchart-based or otherwise.

The part to the left is an approximation of what I saw. A few things jumped out at might right away (before you read my answer, note to self what you notice right off).
[INDENT]1) It wasn’t clear to me where the “Start” block was. I had to look closely (or press shortcut 0 to jump to block 0). Always nice to give your fellow flow-chart users (or yourself in the future) as many clues as possible. I like to call that first block “Start” and have it stick out at the top.

  1. The T/F arrows came out of the same point of the decision blocks. Not real clear which one is which, True or False. Better if one comes out the left, the other right, for example.

  2. The names on the blocks could’ve been more useful. You can always make the block bigger to fit a nice description of what happening in that block.
    [/INDENT] Besides correcting those kinds of things, I thought I’m ask you about other likes/dislikes in making easy-to-follow charts. For example, some people like to overlap their lines (like the dark blocks in the top-right of the image). Other people think that’s less clear and prefer to make little angles and so forth as shown in the bottom right.

Another thing folks sometimes do, when using dark-colored blocks like those in the top right, is use a white font for the text on it.

Notice I also put a big block under the three white blocks in that bottom right set. You could do this, along with lots of comments, to highlight parts and help make your chart even easier to understand quickly. My friends in the tech docs department call that a: “visual element rather than a functioning block… could be really helpful to set off part of the flowchart that does a certain task.”

Other suggestions/conventions you like to use? Do share!

Thanks,
Mary


#2

Mary,

You raise some great points.
The look and flow of the chart is really important, after all, its what you interface with the program with…
Here are some tips from the top of my head;

I like my charts to go from top to bottom and left to right.
Thus the block 0 is always at the top left of my screen, and the layout goes from there.

I always used the default sizes, that way I can fit a solid block name in to help me know what was in each block.

Go easy with the colors. You don’t want to make your chart look like a rainbow. That said, if you can come up with a solid color convention and can stick with it, fair enough.
All connection lines were simple green (true) and red (false). Opto script lines were dark blue.
Make the background some color other than white. (White really tires out the eyes after a few hours, the contrast is just too high with the blocks).

Be sure and turn block numbers on.

Make sure each continue block you use clearly states what block number it is going to (and not just the ‘title’ of the block). This way you can just right click, select the option ‘center on’ and enter the block number the continue block title states. Makes it super easy to navigate around.

Huge charts? Not so much. I never saw the advantage of having any super huge charts. Its hard to navigate, hard to tweak, hard to debug and just hard to follow whats doing what.

Subroutines? Not so much. A lot of our work was unique, so there was very little reused code. Also they seem to often add confusion to debugging when we were starting out. Now, with a few years experience under my belt, I would not hesitate to use a sub if needed.

Text comments on the chart for the win. They can really help remind you what you were thinking when you wrote a section of chart.
Also as you gain experience, your programming style and technique will change, the comments help in two other ways, they remind you of your humble beginnings and they will (well, they should) answer the question of why something was added or tweaked in the big picture (Code comments will help with the details and is a whole other topic).

Lots of instructions in the one action block?
Not so much. Even though you can do it like that, and breaking it out, just makes the chart bigger, it really helps when debugging and following the code if you can see it step from action block to action block.
You might have a variable up and be watching that in debug, the code enters the one huge block and the variable changes, you have to drill you way through and do a lot of single stepping to find what changed it. If you break the blocks out, you can just place a break point on the action block of interest. Cleaner all round.

Lastly, version control. Either in text on the chart, or in an optoscript block to the side. Really really important to include when you made what change and why.

Would love to hear some others chime in with their thoughts on how to lay out their flow charts.

Thanks.

Ben.