How Flow-Based Programming Could Save The Sanity Of Web Developers
fastcolabs.com
fastcolabs.com
I disagree with this. This might work fine for small programs, but will quickly fall apart for anything of significant size. National Instrument's LabVIEW [0] offers a graphical programming language called "G". G makes it easier for non-programmers (usually other types of engineers) to create the software they need. However, as their programs grow, they can easily get out of hand and become a dangled mess if they don't understand good program design. I am all for getting more non-programmers programming, but this method does not solve the need to understand programming fundamentals.
In my experience with LabVIEW, it was really great for making things like concurrency easy, and it was really great for quickly building GUIs to control hardware. I like to think that graphical programming makes some "hard" things easy, and some "easy" things hard (it's a bit manually intensive to make complex mathematical equations - though there are blocks you can use that let you drop in C code into the interface).
Like anything else, the methodology has its advantages and disadvantages.
I've written about this in http://bergie.iki.fi/blog/noflo-kickstarter-launch/
May I ask why? I completely disagree with that statement and all the initiatives pushing that agenda.
My previous post:
"From a practical standpoint, I really wish everyone was taught enough programming to know how to automate basic manipulation of text data. I see way too many people editing long lists of data by hand, when there are much better ways to go about it (even Excel works great for this kind of stuff).
Just knowing this setup below can let you do some really power automation of manual tasks and can save you a lot of time.
Example template in Python:
import csv
with open('mydata.csv', 'r') as csvfile:
reader = csv.reader(csvfile, delimiter=',', quotechar='"')
for row in reader:
# Data manipulation here
"Link: https://news.ycombinator.com/item?id=6237430
I'd also recommend looking at Jach's post (the child post of my post in the link) - I thought he made some really good points/critiques about 'tool-based' vs 'concept-based' teaching.
Your Excel example, to me, falls into that category. Learning to use a word processor or spreadsheet application is something that is increasingly necessary in today's world, and I am often surprised by how few people (including, shockingly, many software developers) know how to effectively use them. I just don't feel like taking it all the way to "everyone must learn to program" is a good idea, any more than "everyone must learn to perform open-heart surgery" is.
Based on your comments, I think we actually agree.
Today, most of the important ideas -- their genesis and dissemination -- are in computer form. I would argue that making everyone a programmer is not the goal, but widespread computer literacy, a familiarity and comfort with computer use, database searches, research skills, is the modern parallel to encouraging print literacy in years past.
If all the automobile designers and mechanical engineers were to vanish today, do you think lay people would be able to hop into the driver's seat and take over the job? The same is true for nearly every industry, and always has been.
The only reason we've come this far as a civilization is because we record what we learn and pass the knowledge on to future generations of people who are interested in that knowledge.
Not everyone has the same interests, and barring an apocalypse, no one needs to know it all at once. Programming is no different.
Sure, things like reading, computer literacy, math, biology, basic problem solving, etc. are important base skills for everyone to know. Once those foundations are in place, delving further is a matter of preference, and not everyone should be pushed to learn computer science any more than they should be pushed to learn quantum mechanics.
Besides, we all drive cars and we all use refrigerators and air conditioners daily. Not everyone knows how those work or is able to fix them. If they did, we'd be a world of "jacks of all trades and experts in none." That's not what got us to this point as a technologically advanced civilization.
It's far more important for everyone to know how to drive properly and safely than it is for them to know how to perform maintenance on their cars. In fact, having everyone do their own car maintenance would probably be just as dangerous as putting programming into the hands of people who don't know how to avoid phishing attacks and computer viruses.
If you can comprehend written procedures for a task, you can comprehend programming (you might not be able to understand algorithmic analysis, but that's a different issue.)
People (especially people that are otherwise knowledge workers) that "can't" do that largely can't because they've been taught that computers are deep magic accessible only to an elite priesthood.
I don't think we are at the point where truly universal programming literacy is necessary or practical in the very short term, but just as with writing before it became something universally expected, I think we are at least at the point where we should start to see it as part of the basic repertoire of knowledge workers, even those whose primary job isn't producing computer code.
I assume you mean a world where some people know more than others. Fair enough, but in a democracy, that chasm cannot grow too large before a citizen's right to choose becomes meaningless.
> ... not everyone should be pushed to learn computer science any more than they should be pushed to learn quantum mechanics.
Not the topic. We've accepted that the ability to read and write are basic to a functioning modern life. It's now true that the ability to compute has the same status. That doesn't mean everyone needs to know how to write a computer program, but print literacy never meant that a person should be able to write a novel.
No, not exactly. I'm referring to the tendency for most people to be experts in one or two fields and mostly ignorant in others that are not related to their core competency.
>We've accepted that the ability to read and write are basic to a functioning modern life. It's now true that the ability to compute has the same status. That doesn't mean everyone needs to know how to write a computer program, but print literacy never meant that a person should be able to write a novel.
That's exactly my point. People should know how to use computers effectively, but that doesn't translate to "should know how to program" just like knowing how to read and write does not translate to "being a novelist", nor does learning math translate to "being a calculus professor."
No, people should know how to use computers which does translate to "know how to program" but not "be a professional software developer", just like knowing how to effectively function in a world with written language does translate into "knowing how to read and write" but not "be a novelist".
They do, however, need to know how to use a computer. This is an argument for computer literacy, not computer programming literacy.
I'm astounded at how much better the spelling and grammar of the commentariat has gotten since the early days of ubiquitous internet. Most people seem to be reading something every day (even if it's about Beyonce) and that means that their ability to read about what they want to know more about has gotten better. The effect of this newly capable public on entrenched power structures can't help but to ultimately be positive.
I understand how the same case for computing could be made.
>Not everyone has the same interests, and barring an apocalypse, no one needs to know it all at once. Programming is no different.
knowing everything at once != knowing how to program
We're not that smart, people. The same case could be made for not teaching people how to cook, or drive a car. What makes something a "base skill"?
That's the first step toward creating a programming priesthood, a very bad idea. Software is as software does. Good software can be identified without requiring its creator to have some credential attesting to his ability to craft "professional-level" code, no more than a writer needs a certificate attesting to his ability to write a readable novel.
For proof of this thesis, one need only look at Microsoft -- until recently the top of the programming profession, highest salaries, copious certificates and assertions of competence, and the worst software.
http://www.vexite.com/2005/ending-microsofts-cowboy-spaghett...
We improved classical literacy by turning people into readers and writers. We improve computer literacy by teaching people to become programmers, not by trying to dumb down programming to something that the plebes can understand. I'm all for turning more non-programmers into programmers. The issue isn't that as much as it is the issue of this fantasy that if it wasn't for those dastardly geeks who want to be lazy and charge a ton of money for it, everybody could program with no real work, which is just pure bull puck.
Occasionally they end up coming to me to ask for help. Now they have to spend their time teaching me the intricacies of their domain, and then I have to spend my time coding up a solution, which might be wrong because of some subtle detail they felt was too obvious to mention. And now we're both stuck in a situation where every time something changes instead of just fixing it, they have to come to me and first explain exactly what they need to change and then wait for me to have time to fix it.
At the end of the day this isn't productive use of anybodies time.
NoFlo's UI design makes it frictionless to drop in to edit any component's JS, or build a new component.
But like you said, I've looked over some previous LV projects that have multiple copy and pasted sections, terrible design, etc.
As a software engineer, LV holds you back in my opinion. I don't doubt for a second that some really amazing things can be created with LV but ultimately it is extremely tiring/annoying to reinvent the wheel to accomplish things that would be extremely simple in almost any other programming language. This seems to come into play when you move past the simple act of collecting data and doing primitive processing.
Edit: The other thing I forgot to touch on was the presentation of the "code". With wires running all over the place and ambiguous function blocks you quickly find yourself wishing you could cozy up with a text editor instead. The main reason I don't think data flow programming will "take over" all programming is because ultimately I think its a inferior presentation for professionals.
I've been slowly translating all of our LabView code out of G and it's both made my life vastly simpler and has also allowed other coders to work on it without learning G.
You briefly touch on another point that is worth repeating. Source control with LV is terrible.
Which is fine, that is what I'd expect. It's how I'd implement it. But isn't that a huge clue about the fundamental weakness of graphical representation - as soon as you try to do anything nontrivial it's back to text. And back to text for a very good reason, not because the right git plugin hasn't been written yet.
One simple hack is to take each version, set transparency to 50%, and then overlay them.
I once fell into the unfortunate position of having to program proprietary building control systems made by a company called Crestron. Its terrible, overpriced shit, but at the core is a neat little Flow Base Programming tool that is based on some proprietary C derived language. What amazed me about it was how quickly we could teach people with little to no programming experience how to reuse existing functions for new projects just be altering the flow between components and editing parameters in functions. It was crazy.
Naturally, every now and then custom code had to be written, but then you would just create a new function, and add it to the pile of other functions that could be wired together.
I'm very interested in NoFlo, and can't wait for this tool to come out.
The typical LabVIEW user here is an experienced EE with limited SW engineering skills so I can see how a different "paradigm" might be appealing. As we all know, though, maintenance cost and sometimes performance also counts.
Also, I'm not sure why representing a program as data structures flowing between reusable components is described as something different or new. I think the major contribution of FBP, if such a thing really exists, is the GUI used to create these programs. Surely the fundamental building blocks have been programmed in a more traditional way.
Absolutely. Ever since my stint with G, I've longed for a general purpose solution for handling flow control in concurrent code. If NoFlow avoids some of G's pitfalls, it could make an excellent addition to my programming toolbox.
Second, we know from the history of these things that it's easy to sell managers and journalists on boxes-and-lines visual programming. The pictures look a lot easier to understand than reams of source code do, but that's always because the examples are trivial—invariably some variant of a box with 2 in it, another box with two in it, arrows leading from those to a box with + in it, and then an arrow leading to a box with 4 in it. These always turn out to be a siren song because they don't scale to application complexity. How exactly is FBP different? Emphasis on exactly.
Let the confusion flow through you!
The "flow-based programming" model involves creating all the formulas that shuffle the data from the model to the view.
At least that's what I can gather from what I've read (and I agree it's always been a big fail in the past, though there may be some merit to this idea eventually in limited roles.)
It didn't really get better from there.
No wait, scratch that. That's just in BizzaroWorld.
http://c2.com/cgi/wiki?ActorsAndFlowBasedProgrammingDiscussi...
The basic idea with FBP is that you have multiple processes that communicate over channels (kind of like actors, but the communication is unidirectional across those channels).
I'm not a fan of GUIs like this generally, but the idea of FBP is interesting in the same way that the actor model is interesting.
Its not exactly an "arcane" model that's been lost in the mists of time since its use in "1970s banking software".
And its very much not something that's been "suppressed by computer scientists for decades".
Closer(ish) to home we have QuartzComposer[3] available for OSX.
I like all of these tools but can't help feeling I'd be more effective if I could just get at the underlying code half the time (in cases where that's not an option).
[0] http://vvvv.org/ [1] http://cycling74.com/ [2] http://puredata.info/ [3] http://developer.apple.com/graphicsimaging/quartz/quartzcomp...
For something similar to MaxMSP/PureData but with writing code in a text editor, you may wish to take a look at ChucK [1]. Instead of graphical edges or links between between UGens ChucK provides the '=>' operator.
E.g.
adc => Chorus c => LPF lpf => Echo e => Delay d => dac;
I've seen novices do cool stuff with Max without thinking that. Perhaps this feeling comes more from familiarity with textual coding than something fundamental about textual coding.
On the other hand, we keep saying "a picture is worth a thousand words", but here we are writing blog posts in gobs! That suggests that text is what we train for, and is what we might be most effective with in the future too.
NoFlo's UI design will make it easy to dive in and edit any module's source, as well as make a new module when code is easier than wiring. We are coders designing this tool for our own work.
1. http://elm-lang.org 2. https://github.com/baconjs/bacon.js 3. https://github.com/baconjs/bacon.js/wiki/Diagrams
http://www.flapjax-lang.org/docs/
https://github.com/brownplt/flapjax/
The programming behind the JavaScript library is really solid, and was most actively developed from 2006 through 2009.
It never caught on, possibly because the mental model required for successfully hacking with "event streams" and "behaviors" is decidedly a functional one, and those concepts are quite abstract to begin with (more so than objects and prototypes). Also, studying the implementation is not for the faint of heart. On top of that, I don't think any big names got behind it and there wasn't exactly a marketing campaign.
Ahead of its time? Definitely. And it's probably still worth looking into as an alternative when trying to choose among the various reactive libraries that have popped up in the last year or so.
The original FBP systems were still 70s-style near-metal code within the component design, but the architecture described a protocol just sufficient for statically and asynchronously connecting the components together, and a runtime method that is amenable to the simplistic approach of having each component run round-robin until all return a "finished" signal. It's very much an "industrial engineering" perspective.
FRP, on the other hand, comes from the traditions of functional programming, and so the evaluation order computation is given a more academic treatment, and the languages are given more explicit syntax, where FBP doesn't aim to describe itself much more deeply than the flowcharts. Both FRP and FBP have purity and immutability as core concepts.
So as I see it: different starting point, different packaging, same conclusions.
Sure, this will skip over some tricky bits of getting started with programming, just as a MIDI keyboard can make it easier to make violin sounds without having to learn all that pesky fingering.
However, as with playing the violin, those bits aren't really the hard part to learn; the easiest to use keyboard in the world won't make you a composer and flow based programming is not going to make you a programmer.
Not everybody will be a programmer, but hopefully a slightly larger percentage of the population will be able to discover the power of algorithmic thinking, and hopefully they will work on some interesting problems.
If Flow-Based Programming is the next big thing then great. Let's get at it.
But please don't sell me bullshit like: "The paradigm was so disruptive that it was suppressed by computer scientists for decades."
Reminds me of the recent "One weird trick!" article [0] and lines like, "the simple solution dietitians don't want you to know!"
Content aside, that kind of thing immediately sets off alarms for me.
[0] http://www.slate.com/articles/business/moneybox/2013/07/how_...
In a nutshell, it doesn't work. Using Fred Brook's venerable terminology, the essential complexity of programming is too difficult for nonprogrammers. Even if you entirely get rid of the accidental complexity... and visual layout does not do that, it's full of incidental complexity involved in the layout itself... you still can't get non-programmers into a programming situation, and trying to get them into a concurrent programming situation is just sheer insanity.
And we know it doesn't work because it has been tried. Over and over. Ad naseum, as in, yeah, I'm sick of hearing these ideas as The Answer as if nobody has ever heard of these before. Tell me what's different about your solution and all the other people who have tried this.
Edit: it's too bad that the programming model is getting lumped in here with the visual programming schtick. Those are two different things. (Of course the former would get no PR without the latter.)
I suppose "dataflow" is an overloaded term, and the fact that its various meanings have quite a bit in common doesn't help.
Slide 11 of this talk makes the same point, but with less words: http://www.scott-a-s.com/files/debs2013_tutorial_slides.pdf
I believe FBP primarily deals with data flow, not control flow, but the "flow" in FBP seems to be left intentionally ambiguous.
What I discovered after a while, was that there was a tiny sweet spot where it was nice to do complicated things without writing code, but that it had huge drawbacks. Queries became ridiculous, for one.
And very soon, the stuff I'd build using the Views module was 'complicated' enough conceptually that a normal SQL query would not only be much faster, but easier and quicker to write. The fact that this query could be version-controlled and didn't live in a database was nice too...
Move fast and break things. Replace what breaks with stronger pieces until it doesn't.
Computer scientists hate him!
I look at that and I see a couple of things. First, this is procedural programming straight out of my old, old COBOL books. Batch processing - read some files, process the data, output it. That graph is pretty, but no different from the structured analysis and design that was forced on me in the mid 80s.
That stuff was a nightmare to work with. No real search, endless 2D layout issues, no way to reuse, a very little bit of information conveyed in a lot of space, no way to debug, and so on. And, if your program is anything but batch/data flow oriented, good luck.
I see maybe 100-300 lines of JSON in the image. Or Lua. Whatever. A modest amount of paste code to tie already written components together in in/out chains. Now, I get that your diagram is more easily 'groked' than JSON, and that is a benefit. But what if I want to search for things? Use awesome tools like sed to batch change stuff? Perform static analysis? All that graphical stuff just falls apart. Oh, perhaps there is some DOM, and I access that, but then I'm right back into the incredible power and expressiveness of text.
More importantly, I'd like to see the flow diagrams of all those nodes you are connecting together. I am prepared for egg on my face here, but are those written in NoFlo, or text? I'm guessing the latter.
So, how is this different than LabView? I completely understand the value of being able to quickly plug together pre-existing components when you have a tiny interface (you just have in/out nodes, basically, in that diagram). A small solution for a small problem, and I don't mean that dismissively.
Despite the article's claim, and as many have already said, this stuff has been around for decades. There are definitely places for it. But having lived through it, I tell you SA/SD died a very deserved death.
Sorry, this isn't directed at you, you were just the person kind enough to provide an asked for example.
The other major thing that sticks out for me is that that graph is just a high level, block diagram of the program. Well, "just" not meant to be dismissive. The original article talks about the horrors of programming where changing one thing means changing 10 other components. They are not describing programming, they are describing hacking spaghetti code with no design. If that is the way you program, or the way the code base you are working on is coded, then I can see why these flow diagrams seem so revolutionary - a design is being done, and software is broken up into discrete components. That's pretty fundamental SW engineering. But the magic is not in the 2D visual display, but in the idea of small components that do one thing and that are not intimately tied to other components. So hey, if the tool helps you learn or use that method, good, I guess. How you reasonably scale it up to anything large is beyond me (I've done entire avionics systems in data flow diagrams, and it ain't pretty at that scale, believe me).
Modularizing systems into separate, standardized units has a tendency to look like this (or like shell scripting). Is this a huge problem?
Here's an example I have experience with:
The GRL research language [1] is a dataflow language for behavior-based robotics. It's a real programming language that batch compiles down to C code that runs in O(1) time and space (it's not Turing complete). It escapes from the "spaghetti code" problem you mention by providing an abstraction of a procedure as a compile-time rewrite rule that transforms the dataflow graph (for Lisp hackers, every procedure is basically a macro that can be passed around by value at compile-time).
(FWIW, graphical editors can actually be a useful and pleasant way to construct throwaway flow graphs, but aren't particularly useful for developing new abstractions (i.e. dataflow procedures or data types). They run into the spaghetti code problem you mention, by which the only way to reuse a chunk of functionality is copy-paste)
The system has been used for things like programming actual robots, Half Life bots [2], and motor control for interactive game-like thingies [3]. What it's really great at is managing stateful information over time. Things like moving averages, low pass filters, and other types of state machines (flip-flops, "just true" constructs, etc) all become first-class values in your programming language.
So how could this be used in a more flexible environment that isn't ideological about dataflow programming? While dataflow graphs may be limited in their expressiveness, we can use them to encapsulate many types of state machines, particularly those that change over time or in response to stimulus. Under this model, every self-contained flow graph becomes a thunk whose input values are determined by evaluating arbitrary expressions in the host language (and can be dynamically instantiated). For implementations of this technique, see [3]. Finally, [4] is an implementation of the stateful time-based dataflow constructs I wrote for a game in C#, which power things like motor behaviors, input processing, collision avoidance, animations, and interpolations. As a bonus, you can add events on top of these for a simple implementation of functional reactive programming.
So do you want to build a web app in a dataflow language? Maybe not. Do you want flow-based constructs in your programming language? Depending on what you're building, the answer could range of "Not really" to "I can't live without them."
[1] http://www.cs.northwestern.edu/~ian/grl-paper.pdf
[2] http://www.cs.northwestern.edu/~gdunham/flexbot/manual/grl_f...
[3] http://www.aaai.org/ocs/index.php/AIIDE/AIIDE11/paper/view/4...
[4] https://bitbucket.org/leifaffles/chad/src/d6a13c2315cce41dba...
The tricky part isn't in whether the abstraction works, but how we go about introducing it. And the downfall of most visual languages is in burdening themselves with too much power, which I don't think FBP is guilty of. It's evolved from production systems that were still coded in textual forms, but architected - on paper - with the diagrams.
If it'll ever become big then it'll be more like what Javelin does by adding FRP to Clojure's persistent data structures [1]
[1] http://www.infoq.com/presentations/ClojureScript-Javelin
But on serious note, with all the brains we have, we should've created some tools to automate things, progress is too slow. I think we can do way more.
After staggering expenditures of effort by some of the world's sharpest minds over more than half a century, I doubt there are any more major breakthroughs awaiting us in the field of programming languages. (Unless AI starts to play a major role, in which case I couldn't predict how programming would change.)
Most developer software is abstractions and tools to automate things. Tasks that were hard in 1995 are trivial today; most web developers have probably never had to think about the vast majority of things that web developers in 1995 concerned themselves with, because our libraries and frameworks and tools take care of them.
The complexity of the trade is ever-increasing, though, and so we need new tools and new libraries and new frameworks to deal with that increasing complexity. This is the biggest place where visual programming falls apart - it's fine at dealing with programming as it existed when it was released, but programming is not a static discipline, and evolves wildly and rapidly. Non-sentient tools just simply can't keep up.
LightTable is tool that one guy started as a futuristic tool, yet it is what we had before.
Complexity of our work is ever increasing and fun definitely never stops, I wish tools were better so we can enjoy languages more. As tools augment our ability to do work, having excellent tools would allow you to do more and be easier.
When you can't perform static analysis (which is very difficult to do effectively in dynamically-typed languages), many of those tools you are talking about are just not possible.
That one point really gave me pause as well. As I posted the other day:
-----
"If your bottom-line is dependent on code, you know the angst of asking a programmer, “How long will {{ insert feature }} take?” You know programmers can jargon-speak their way to your consent and when everything comes crashing down, you are to blame. NoFlo frees your businesses from a labyrinth of text files so you can get-a-grip on what-the-hell-is-going-on!"
If you tell people that NoFlo is the solution to prevent programmers from "jargon-speaking" their way to your doom then... Sorry, that's just a lie with a topping of polarization.
The way to prevent programmers messing up your business is to not hire shit programmers and manage good programmers properly. Not hiring the programmers with the fanciest visualization.
But most of the proposed use cases are clearly bullshit, and using these languages/programs makes it clear why: organizing code in a single dimension is already hard... organizing it properly and sensibly in two dimensions much more so, as well as a number of other issues with order and tracking race conditions. For anyone who wants to really evaluate this technology, I would give these products a try.
Really though, functional programming and OOP both have sufficient support for data flows that it isn't really an issue for programmers.
>This allows programmers to write individual functions that execute one step at a time, but route data between these functions asynchronously and concurrently
These concepts are not new. Concurrent programming is all about data pipelining, this is basically describing a gimped version of Erlang.. with pictures. The obvious practical advantages of a textual language make it laughable.
edit for clarity.
Kuhn’s book on scientific revolutions includes a famous quote from physicist Max Planck about what really causes paradigm shifts:
"A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die, and a new generation grows up that is familiar with it."
Look at all the work in QM in the 20s and 30s. These guys had competing hypothesizes, and some won out based on the evidence. The people that held the opposing view? They quickly accepted the errors of their ways.
This is known as the bozo the clown argument. You know, somebody says "My perpetual motion machine will work! They laughed at Einstein, you know". And the reply is "yes, and they also laughed at bozo the clown".
Almost always, if everyone is against your idea, having tried it, you are probably wrong. There is probably no industry on the planet more open to change. We've gone from procedural to OO, functional programming is having a huge resurgence, static typed to dynamic typed, waterfall to extreme/agile/whatever, and so on.
And, despite the claims of the article, data flow programming has been alive and well the whole time. It hasn't been used much because of all the things that we have raised each time the topic is brought up, with no real response other than claims that we just don't get it, that people disagreeing is a sign that you are doing something right, and so on. I don't find it convincing at all. It's time to retire that Kuhn/Planck quote.
Oh, I don't think so. As its presence in Kuhn's book suggests, the kind of 'scientific truth' Planck was talking about is not just any hypothesis, but the much larger thing that we now (post-Kuhn) call a paradigm. For a counterexample, you'd need to show a paradigm shift occurring within the individual careers of the most established scientists in a community. QM isn't an example of that, for two reasons: it was the work of a new generation, and the debates you refer to were taking place within the new paradigm [1].
Your example is ironic, since it was Planck who put the Q in QM. If the history of QM refuted the quote as easily as all that, he'd never have said it in the first place.
(I do agree with you that most claims of a new paradigm turn out to be false.)
[1] That's not quite correct; they also took place before the new paradigm had crystallized—a time when (as Kuhn describes it) old models have broken down and lots of big things are up for grabs. Under such circumstances, minds change more fluidly. But such transitional circumstances are relatively rare and Planck was talking about the normal ones.
One of those you didn't get right? Guess which one?
Could not disagree more. I'm so tired of these initiatives to "get everyone coding!" Everyone can't be a programmer, just like everyone can't be a doctor and everyone can't be a mechanic. There are certain skills, mindsets, and desires that drive people to do what they do.
Similarly, everyone needs to know math and problem solving skills (the major basis of programming) to be effective human beings.
In other words, I fully support the push for STEM, but force-feeding programming into the agenda is both unnecessary (as those interested in math, problem solving and computers will tend to go into programming fields) and potentially counterproductive (having many unskilled "programmers" trying to touch important software could be catastrophic in many cases.)
It's kind of like the groups of script-kiddies who consider themselves "hackers" but really aren't doing anything but utilizing tools real hackers have created. This is how NoFlo (from the article) strikes me.
I don't think that's true. Its something people may need to be (or, at least, greatly benefit from in being) effective members of modern society, but all the people that weren't part of the literate minority when literacy was rare (or before writing existed) were not "ineffective human heings".
Same with programming, if everybody had some base level of algorithmic literacy, they could at least have some idea if a mind-numbing repetitive task could be done with a simple script.
IFTTT does a great job of making it easy to glue web services together. NoFlo could be a powerful step up from that.
Regarding IFTTT, I have to say it's a wonderful service and does an amazing job dumbing down powerful APIs and interconnecting them. However, I would love to see a study of how many non-technical people utilize it, and/or how many recipes come from people who are otherwise uninterested or ignorant to programming and computer technologies. I'm willing to bet it's very low.
It's easy to understand an IFTTT recipe in plain English, but it's a whole other ballgame trying to come up with them yourself.
Anyway, back to the article...
Consider that a user wants to transform an input (inp) with operation X. Does it matter to them if X(inp) is a program they would invoke normally, or a function within an existing language? The former is probably more user-friendly, but both are conceptually similar. If the tool is handed to a user they can probably beat either solution together without much effort (assuming the environment to run said code isn't too complex).
But what if operation X is a unique problem that doesn't exist in a common library? The moment operation X needs to be written is where people need to become programmers (or have programmers do the work for them). If your business is large, pay professionals to do it, and let them get requirements and feedback from domain experts.
I'm asserting that management is capable of finding competent programmers. Which can be difficult. But hiring based on a mix of portfolio and credentials will probably yield better results than trying to train a domain expert to write code.
Getting back to the general point, there isn't a general solution for writing maintainable and scalable code. Being able to recognize good and bad code is a hard won skill. Being able to write and design it is even harder.
This article asserts that FBP is not only a silver bullet for designing large code bases, but also one so simple that a non-programmer can use it.
This isn't to say FBP is worthless. I think it could be used as a limited DSL in certain cases. For example, permitting an advanced user to describe a filter of data where conditional criteria for multiple fields.
No. The problem is not moving data around. The biggest problem on web development is the drive from the industry to shoe-horne applications on top of platforms that weren't meant for it.
The remaining 20% still needs to be implemented in code, and takes most of the time. It got so bad that they actually ended up implementing "code" objects, just so the code could be edited and incorporated into directly into the tool instead of around it.
On the broader point - and the comments by folks saying we should have made things better by now: we have. I started out learning to program with zero help, no tools, few manuals on an Apple II in some flavor of BASIC or machine code by trial and error.
Decades later having not coded a lick in more than 15 years I picked up Ruby On Rails quickly and easily (enough to get out MVP) and with the help of Stack Overflow and Google have spent the last three years getting better and better at it. I can do dramatically more today than I could have imagined in my days alone with an Apple II and a poor english translation of a poor chinese translation of a pirated Apple manual.
It's all better. The worst programmers have super powers available to them (they don't always use them admittedly) compared to prior days.
Things are getting better but they're earning it, not because "THEY" don't want you to know "SECRET KNOWLEDGE".
I totally agree with you and would go so far as to say there's probably a kind of upper bound to the rate at which a human can translate an original idea in their head into an unambiguous logical construct of the kind which can be executed by a computer.
However, I would also say that the narrowest bottleneck in this process is the rate at which someone can comprehend the current state and structure of a given program, and I would say that anything that tries to improve on the status quo of text files in a directory is pretty cool.
It worked something like making a ctags/etags file (a list similar to the data an IDE uses for "find definition" jumps), and showing an indented list (removing any cycles in the call patterns) of the fan out, as if it were a tree (rather than a graph).
I think the finer point is more about workflow then programming.
That is state based workflow is fundamentally harder for developers to grok, also maintaining state is a kind of fallacy when scaling out and/or up.
Flow based workflows, while probably can't cover easily the breadth of exotic corner cases that FSM can achieve, are much easier to understand and state is byproduct of the system, not to mention that a full record of mutation occurs with a copy of data at every step (similar to MVCC - Multi-value-consistency-control)
This is similar to how http://www.w3.org/TR/xproc/ XProc works, which has a serious implementation in http://xmlcalabash.com/ and slowly gaining adoption in XML circles.
Its nice to see yet another XML technology, which of course is based on older established concepts in computing, being emulated/replicated in the JS universe ... shame about the visual programming antipattern/lunacy.
On the other hand, we must be able to quickly navigate in the source tree. That's why text editors like Vim, that understand the contents of the programs (buffers, text objects, definitions), are so powerful. The same happens with Xcode, for example. The Interface Builder is a graphical tool that defines the code components as visually manageable objects.
Maybe the proposed paradigm could extend this ideas of representing the code in flows, as graphs of objects. I'm really curious to try it. Mainly because it seems to feet really well with handheld devices.
I think the main reason FBP hasn't gone mainstream is because most implementations are built around a graphical programming environments (e.g. LabView, Pure Data, Scratch) in order to cater to non-programmers. But programmers love their text files, and for plenty of good reasons. Code represented as text can be edited by any general-purpose text editor, work well with version control systems, and can (usually) be easily split into separate files.
It's probably instructive, then, to look at a domain in which textual flow-based programming languages have become mainstream. I'm speaking, of course, about Hardware Description Languages, which are used by digital circuit designers to simulate and prototype complex circuits, like CPUs. The two dominant HDLs are VHDL and Verilog. Both of these languages use a flow-based model, in which logical blocks called entities are connected to each other through input and output ports. The reason these languages work is because the domain is a good fit for FBP and because they are designed for the domain experts (circuit designers) to use, and not for some non-technical manager to be able to understand.
Taking a similar approach to web programming may work. Logical blocks connected through ports. Except instead of ones and zeroes going through these ports, you have I/O events and data. I haven't looked at NoFlo, but it might be interesting.
Note that I'm not saying that VHDL and Verilog are good languages, even for their intended domain. They have plenty of warts, and a FBP language for software that basically copies one or the other would be terrible (especially VHDL; oh god, please nobody make VHDL for web programming). But the entity-port model is essentially sound, and I would be quite interested in a general-purpose language that adapts that model in a well thought-out way.
Scope creep. Last-minute specifications. Pointy-hairs who don't understand technical debt, and need everything done yesterday. Design by committee. Too many cooks in too many kitchens. Legacy processes, legacy data, legacy user habits. Unrealistic expectations, unrealistic timelines, and unrealistic budgets. Marginally competent coworkers. Office politics.
Compared to those, callback hell and and classitis are a dream come true. And while all the problems above are reducable with the right processes, you'll never shrink them all to zero.
"Algorithms may have mathematical underpinnings, but computer programming is a behavioral science." - @brixen
The main problems with this approach are how to properly represent timing, latency, and node state, since you can send one piece of information through the graph at a time, or you can try to improve efficiency by pipelining the graph - using the graph like a shift register, and making sure every node has work to do at all times.
Of course it's not a cure-all solution and doesn't map well to every problem domain, but it is generally easier to reason about for complex parallel processing tasks, and can be deployed over multiple machines with minimal "glue" code.
Visual programming does have its place. My mom was able to make a website using Weebly without any help. However, as things get complex I personally can visualize (in my mind) the interconnects. In my opinion, we need easier to use libraries, not visual tools. But I genuinely want to be corrected.
Something interest to note. The name of the framework is NoFlo that sounds like NoFlow And it is a framework for flow based programming. Wonder why they came up with that name.
Or reverse psychology?
1) The logic/functions needed in each "black box" still need to be written. How is that handled? Is that where the line of "programmer vs non-programmer" is crossed?
2) Programming is, more or less, the skill of breaking down a problem into the parts needed for its solution and providing the solution. The value of a programmer isn't the ability to type in code, so much as the ability to logically break down the problem and solve it. How would such a programming paradigm actually solve that problem?
One of the big design differences (vs Quartz Composer, Lab View, Pure Data) is that it will be easy to dive in and edit component code and make new components when needed.
http://www.maxon.net/uploads/pics/xpresso_17.jpg shows an alternative that i imagine could be used to lazily evaluate only certain connected boxes but still...just look at that mess.
Please don't remind me how if-statments in labview are represented. It gives me nightmares.
It's interesting in concept, and will most assuredly open the doors to allow a larger swath of people to participate, but for anything of consequence, you've still gotta buckle down and write some code. The reason is almost entirely about performance optimization, which is something you just can't get from compiling from GUI.
I agree that we'll get glue programmers, who just stick modules together. We already do: they are those programmers who use APIs. i.e. all of us to some extent. So far, it's still programming.
This is nothing new and neither has it been "suppressed".
A lot of software use that kind of visualization. It's nothing new.
Why don't we need more programmers participating in the ideation process, not just the creation process?
(Bad) signup page here if interested: http://www.lexasapp.com/
Did someone not get their "suppress the disruptive programming technique" kickback cheque in the mail this month?