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.
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.
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.
I mean, we have had UML now for going on 15 years. You can CERTAINLY generate code and other artifacts from some types of UML diagrams. None of these is all that much like a flowchart, and frankly flowcharts are essentially dead AFAIK. They really only ever worked well, if they ever did, on fairly straightforward procedural code. Back in the bad old days before Structured Programming and then OOP it wasn't all that uncommon to see people using them, but that was mainly because even fairly straightforward linear code was hard to understand when it was written in FORTRAN or COBOL. Such charts have little relevance in modern OO/functional coding where linear control flow is really not an issue.
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
Plus Simulink coder.
Scratch uses an approach similar to flow charts. If you're not to picky about the notation, it might be what you are looking for.
Why? Even if it could technically be done, it's probably not good code from a human-readability standpoint and will have to be heavily reworked, such as variable re-naming, splitting into functions/modules, etc.
Table-ized A.I.
Look at the US educational products that let users do things with a gui and even a robot kit.
They often have a very simple gui system of getting input and presenting an output.
I am not sure how much of the US educational product would allow for options other than following a set course structure.
Often used so the whole class in a US educational setting can feel they are been educated about computers.
A slow pace of education, not much maths, all about the gui and getting something done in a short time.
Of historical interest might be some aspects of a card in Hypercard https://en.wikipedia.org/wiki/... from Apple.
Most people who are smart find some programming language they can use e.g. Basic, Ada, Pascal or something Apple, todays apps or Windows supports.
People who are not smart then just use what other people create for them.
If a person needs C, take the time to learn C. If a person can present a flow chart, work with a smart person to turn that into C.
If this is a marketing test to see what exists and what is needed, consider the many marketing lessons of Hypercard. What it did, what was done with it and why people now just use the maths and code for their Apple, MS or app needs.
Circuit board design tools might be a starting point to replace the circuit board part with more of a gui, chart feel.
Domestic spying is now "Benign Information Gathering"
My favorite is called Automate by LlamaLab.
Category:Visual programming languages
UML is useful to identify which objects you are working with in the code but it's not good to describe the information flow in a system.
The worst problem with UML is that it also can tie together objects with each other - or even worse, create objects - that from a superficial glance seems to be related but when you look at the information flow you see that the only thing they have in common is that they are related from a very specific perspective, much like two stars that looks close to each other from the viewpoint we have here but in reality they are many lightyears apart.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
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.
Does anyone know of a tool that will allow me to write a novel by scribbling with crayons in a coloring book?
I think pd, like LabVIEW, primarily shows the flow of data, not execution. They are data-flow diagrams, not flow charts in the traditional sense.
I'm a visually oriented person. For big-picture I can digest flowcharts and data diagrams easier than textual representations. I routinely use Visio. In the MSDOS days I used Interactive EasyFlow from HavenTree of Canada. The copyright notice / license agreement was worth the price of admission.
The Russians have won. They have made the world a cesspool of distrust, greed, fear and hate.
It's no joke. LEGO Mindstorms comes with a graphical flowchart-like language using LabVIEW to write programs. Of course, the system is hideously slow and inefficient compared to text and with EV3 the brick runs Linux so you can easily dump it for Python, C++ or whatever you like.
LabVIEW itself is also used for instrumental programming in some labs although I expect it is rather slow so its applications will be somewhat limited. I've never used it myself in particle physics but I believe some of my condensed matter colleagues use it as a slow control system for commercial instruments.
The open source DRAKON Editor allows you to draw classic flow charts and generate template code in various target languages that follow the defined flow.
It comes with the additional advantage of having been engineered around ergonomic practices, which makes it avoid the classic pitfalls of using flow charts. A flow diagram typically becomes a tangled mess, but DRAKON layout guidelines provide a structure to build diagrams in any scale.
The DRAKON language was created by people in the Russian space program as a way to avoid errors in defined procedures, and it was crafted and refined following the Russian school of Human-computer interaction. The flow diagrams built following their easy-to-learn layout guidelines are the most easy to read that I've ever seen.
Singularity: a belief in the "God" idea with the "demiurge" relation inverted.
If you think they were not conservatives then you have a lot to learn about politics.
What Christopher Hitchens wrote about Bill Clinton is a good start.
He seems to want to take a dataflow programming language and generate C from it. This is trivial and there have been a bunch of tools that do it. The problem is, it's entirely pointless. If your code is better represented as a flow chart, then use a dataflow programming language and don't bother with C as an intermediate representation. The only reason to turn it into C is if some parts of it are easier to edit as C code (typically, bits with complex flow control, because even nested loops in graphical dataflow languages are pretty hideous). Then the problem that you actually want to solve is turning a flow chart into C, editing it, and then turning it back again while preserving the original structure. This is much harder, but typically dataflow languages let you call out to C for complex operations and that's generally a better solution.
I am TheRaven on Soylent News
There are quite a few JBoss based tools that will let you do this and then auto deploy the app on tomcat etc
https://tools.jboss.org/featur...
https://tools.jboss.org/featur...
https://tools.jboss.org/featur...
https://tools.jboss.org/featur...
https://tools.jboss.org/featur...
etc
I use JBoss rules visual flowcharts editors for tweaking and testing a prek-12 vaccine compliance engine.
There are many flow chart based Business Process Execution Language (BPEL) coding environments, including multiple open source options: http://orchestra.ow2.org/xwiki... , https://eclipse.org/bpel/ .
People with strong abstract reasoning make use of nearly all parts of their brain at the same time and the different parts are more highly connected to each other that people with lower abstract reasoning. It was difficult to see this with older brain scans because high levels of abstract reasoning cause larger neural-activity bursts but of shorter duration. One of the first parts of the brain to connect to the frontal lobe is the visual cortex. It is not far fetched to think that people visualizing logical problems is probably a side effect of the visual cortex helping with the processing of the logic. Below a certain threshold, the different brain regions are quite isolated. Once this inflection point is reached, it snowballs very quickly, reinforcing itself.
Most of this is from research in the past few years from advancements with brain scans. There has been a large surge in research in relation to abstract reasoning and meta-cognition, which is starting to look like a power curve with a long tail. To make matters worse, there seems to be no way to teach someone else abstract reasoning. Learning abstract reasoning above the norm seems to be a self taught. Most people haphazardly acquire some abstract reasoning skills, but above a certain meta-cognition level, people can purposefully exercise abstract reasoning entirely by reflecting on their own thoughts. Some propose that reflecting on thoughts increases the interconnections among the brain regions, allowing for better pattern matching from the different regions working in unison instead of individually.
There have been some experiments that showed certain mental exercises could increase one's ability to score higher on a particular abstract reasoning test, but the benefit did not transfer to other abstract reasoning tests, meaning the mental exercise made the person more efficient that particular test, but not actually better at abstract reasoning. Like I said, no known way to increase abstract reasoning except introspection.