Slashdot Mirror


Ask Slashdot: Is There a Way To Write Working Code By Drawing Flow Charts?

Slashdot reader dryriver writes: There appear to be two main ways to write code today. One is with text-based languages ranging from BASIC to Python to C++. The other is to use a flow-based or dataflow programming-based visual programming language where you connect boxes or nodes with lines. What I have never (personally) come across is a way to program by drawing classical vertical (top to bottom) flow charts. Is there a programming environment that lets you do this...?

There are software tools that can turn, say, C code into a visual flow chart representation of said C code. Is there any way to do the opposite -- draw a flowchart, and have that flowchart turn into working C code?

Leave your best answers in the comments.

3 of 264 comments (clear)

  1. Is this a joke? by __aaclcg7560 · · Score: 2, Insightful

    I probably still have my flowchart template from Introduction to Computers in 1993. Used it for that one class and never used it again. Not even when I later went back to school to learn computer programming a decade later.

  2. Re:Does seem a bit 80's... by Z00L00K · · Score: 3, Insightful

    Simulink is a variation of flowchart programming, but maintainability is hard when it comes to flowchart programming. You need a football field or two to try to make sense of it and any large system will have cross-dependency graphs that are extremely hard to follow.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  3. Time marches on by Waffle+Iron · · Score: 4, Insightful

    When I was first taught to code in FORTRAN, we were told that we really needed to create a flow chart detailing every statement before writing any code. We also needed to start every line in column 8, and variable types were determined by the first letter of their name.

    Those days are long gone, and we now have languages with features that allow us to directly transcribe our ideas without intermediate formats (yes, LISP always allowed that from day 1, yada yada).

    I find that flow charts still have some usefulness on occasion, but only as a high-level planning tool. I will sometimes write up a flow chart with a dozen boxes to define the rough flow of a complex algorithm, but it might take a thousand lines of code to actually complete the final implementation. A flow chart that had enough detail to mechanically translate to code would look like an incomprehensible pile of spaghetti; not very useful compared to well-formated code.