Click here to get back home

Does anyone flowchart their code?

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Does anyone flowchart their code? William Gill 06-15-2008
Posted by William Gill on June 15, 2008, 12:58 pm
Please log in for more thread options
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?

Posted by Dikkie Dik on June 15, 2008, 1:23 pm
Please log in for more thread options
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.

Posted by Gordon on June 16, 2008, 4:21 am
Please log in for more thread options
> 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.

Flot charts still have their place in OO development. In my
experience I've run into situations where I know I need method foo to
work on inputs bar and baz and output quux, but can't quite visualize
how to get from one state of affairs to the other. Here is where a
quickly doodled flow-chart can come in handy, it can help you get a
method's internal logic straight in your own head without having to
worry about the semantics of the language until you actually implement
it.

I really don't think I'd recommend flow charts as a formal method or
go looking for software to manage them, but to hel pyou solve a
specific problem they can help you organize your thought processes.
As for the software I use for making a flowchart, I'm a big advocate
of pen and paper 1.0.

Posted by Tim Streater on June 15, 2008, 1:31 pm
Please log in for more thread options

> 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?

I haven't done flow charts since 1968. And even then it was just using
pencil and paper. The times my stuff became convoluted (or I had to use
someone else's convoluted mess), I decided it was time to rewrite from
scratch, starting with a specification. The spec doesn't need to be
formal in any way, just a list of requirements. Then you can decide on
the model, approach, and structure. I find this suffices, usually.

Of course, this may not work if you're part of a larger team. But I've
generally managed to avoid that.

Posted by Peter H. Coffin on June 15, 2008, 1:35 pm
Please log in for more thread options
On Sun, 15 Jun 2008 12:58:33 -0400, 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?

I do. I have a nice plastic template that says it was made in 1975,
and a box of cheap mechanical pencils. Two or three redraws and I've
usually got things well enough organized to move on to writing code.
Flowcharting software just mades it too easy to amend the chart to match
the code, and then end up with spagetti programs and spagetti charts to
match.

--
_ o
|/)

Similar ThreadsPosted
flowchart tool? October 20, 2004, 8:15 pm
Can anyone suggest a flowchart program November 1, 2006, 12:28 pm
good code, bad code, magic code February 24, 2006, 6:40 pm
command-line php displays code instead of executing code January 28, 2007, 1:19 pm
Resource to learn code and share code and knowledge July 2, 2007, 7:53 am
Shoutbox , ridding SPAM, adding features, Syntax, explanations of my shoutbox code, help on additional code July 26, 2006, 6:33 pm
Compiling PHP Code To Machine Code November 2, 2005, 11:22 pm
first even php code January 8, 2005, 1:46 pm
SSL php code January 10, 2005, 7:44 pm
BB code help February 13, 2005, 9:43 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap