Re: Does anyone flowchart their code?
William Gill wrote:
> I seem to be having a mentally bad period lately . My code is beginning
> to be terrible convoluted mess, and I shudder to think what it will be
> like to go back in a couple months and try to follow it, so I'm going
> back to basics. I need to flowchart what I'm doing. The problem is I
> can't seem to find anything that works well,and doesn't cost an arm and
> leg. I have an old copy of Smart Draw, but it's out dated and does not
> work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were
> intended to be implemented via word processors, but I haven't done one
> in 30 years.
>
> So, does anyone flowchart anymore? If so what do you use/suggest?
No. flowcharts and Nassi diagrams were meant for procedural programming.
They come from the time that a program was a "recipe", starting at line
1 and going all the way to line 3456821. I never understood Nassi
diagrams: they are extremely hard to read and even harder to draw. I can
make a program in 1% of the time it would cost me to make the
corresponding Nassi diagram. And afterwards, only the program can be
corrected...
I draw UML diagrams for the parts that need them and put them in my unit
tests (along with other documentation). So every time you run the tests,
you see that the code is documented. The rest of my documentation
accompanies the code or is in the code itself. My code should be
self-explanatory, and if not, the documentation is in the appropriate
section of the module in subversion.
|