Ask HN: Why does visual programming suck?
What really annoys me in text programming is that I have to write constructs again and again, referring to manual for method names constantly. Completions may be smart typewise, but IDEs never assume <i>what</i> I am writing. Let&#x27;s take a function:<p><pre><code>  static string defaultFamily = &quot;Sans&quot;;

  bool
  foo(string s, Alignment a, int height)
  {
    Par_
</code></pre>
Okay, it began. What can be done with all the available values? Seems that I&#x27;m going to create a paragraph and fill it with some arguments. One of autocompletion suggestions:<p><pre><code>  bool
  foo(string s, Alignment a, int height)
  {
    Font f(defaultFamily, height);
    if (!f.isValid()) return false;

    Paragraph p;

    p.setAlignment(a);
    p.setText(s);
    p.setFont(f);

    &lt;#rest#&gt;_

    return true;
  }
</code></pre>
How is it obvious? Because Paragraph told the completion system that it needs at least font and text values set. Height goes to font, other arguments go to paragraph. Names are selected from the style around. Since we return a boolean and few objects can be invalid after initialization, it assumes that it is a status. p is local, so there is something to be done with it, and another &lt;?&gt; block is created.<p>Even better, you could just throw items together and get the result:<p><pre><code>  &#x2F;&#x2F; this-&gt;points is double[20];

  {
    frame inset 0.5 red stroke;
    add points black stroke;
  ---
  {
    Rect r = this.frame();
    r.inset(0.5, 0.5);

    Painter p;
    p.setColor(Color::red());
    p.addPath(rect);
    p.stroke();

    p.clearPath();
    for (point in points) {
      p.addPoint(point);
    }
    p.setColor(Color::black());
    p.stroke();
</code></pre>
But the completion style that we have everywhere just sucks:<p><pre><code>  int
  foo(string s, Alignment a, int height)
  {
    ParadoxDatabaseProvider_
    ParadoxDatabase...
    ...
    Paragraph
    ParamsManager
</code></pre>
I can&#x27;t point to good visual programming tool, but our &quot;powerful&quot; text IDEs are simply prehistorik typewriters.