Live data from Hacker News

Ask HN: Why is programming editing text?

news.ycombinator.com

71–79 of 79 posts

Re: Ask HN: Why is programming editing text?

#71
post #49
post #48

Earlier quoted context omitted.

Your comment is extremely thought-provoking, and I immediately find it true of myself, but artists are quite capable of telling stories in pictures in a way that compels an understanding that goes deeper than reference to text - might it not just be that you and I have less control over the narrative and interpretation than in text because that happens to be our preferred medium? What imagery gives you is an intuitiv…

I see what you mean, but I think that we are both correct - I agree entirely that stories in pictures can give both a deeper or quicker understanding of most topics - the issue is that they cannot clarify or directly state something. The best works of art are open to many interpretations - or we would never re-read imaginative literature, re-visit galleries we had been to previously, and so on. On the other hand, for…

All this aligns quite well with my initial gut response to

>Why is programming editing text?

Because it didn't come out right the first time.

Re: Ask HN: Why is programming editing text?

#72
There actually was a promising Microsoft research project called "Intentional Programming"(IP) (https://en.wikipedia.org/wiki/Intentional_programming) a few decades ago. The idea is good but i believe due to it being a true disruptive technology and other market forces it was shelved.

PS: Charles Simonyi, the inventor of IP, wrote a paper called "The Death of Computer Languages, The Birth of Intentional Programming" which is worth a read.

Re: Ask HN: Why is programming editing text?

#73

There actually was a promising Microsoft research project called "Intentional Programming"(IP) ( https://en.wikipedia.org/wiki/Intentional_programming ) a few decades ago. The idea is good but i believe due to it being a true disruptive technology and other market forces it was shelved. PS: Charles Simonyi, the inventor of IP, wrote a paper called "The Death of Computer Languages, The Birth of Intentional Programming…

Intentional programming is not tied to graphical representation even if that’s how it looked in a prototype. It’s more about separating program structure from detail, trying to better deliver on Dijkstra’s comment about a semantic layer at which one can be absolutely precise. I consider it required reading for anyone frustrated by the present state of programming.

Re: Ask HN: Why is programming editing text?

#74
Because humans can only express themselves in two ways. Through their voice or through actuation of muscles. (Actually that's just one way...)

We already tried the voice thing and it doesn't work well at all beyond Alexa type personal assistants.

So basically muscle actuation is the only thing remaining. Well time to count the number of actuators your body possesses that it can use to express itself. 2 legs, 2 feet with tandem controlled toes, 2 arms, 2 eyes, 1 neck, two hands with 10 fingers. If we don't count our hands we only have only 7 actuators in total that we can use to control a computer. Our hands are such a tiny part of our body yet they exceed that number. 10 actuators that can be used for our body to express itself. Now imagine you are a dolphin or you are paralyzed and can't use anything below your neck. You have lost almost all ability to express yourself. There are still a few actuators left but compared to the power of 10 fingers they are absolutely nothing. 10 fingers allow humans to transmit 40 bits of information every single second (assuming average 60WPM) to their computer.

Since our hands are our primary way of communicating with a computer we have decided to create an input device that is worthy of their might. A keyboard lets us take advantage of the full potential of our hands. Just think about it. 106 keys at your fingertips. You can transmit a huge amount of information into the computer.

Without a hand you can still use a pointing device like a mouse or touch screen but you are not able to use the scroll wheel and at most you can only have a single mouse button. The biggest flaw: You are limited to interactions that are visible on the screen. The keyboard has no such restrictions, you can just type anything you want.

What I'm getting at is that typing text is the most natural way of interacting with a computer and the method with the highest data throughput. Text based programming languages take advantage of this affinity and this is why they have established themselves.

The type of IDE you are talking about has to be easier to use and faster than simply typing the code directly. Achieving this is a very difficult task and even if you succeed there is no shortage of programmers willing to learn text based languages, it simply isn't difficult enough to warrant a replacement.

The other comments saying this is just because of inertia or fashion(blub?) completely ignore the way humans interact with computers and therefore are not sufficient to answer your question. If it were that simple then we'd already see a reasonable split between the camps. Something like 3 text based languages to 2 visual languages and 1 voice based language.

Re: Ask HN: Why is programming editing text?

#75

There actually was a promising Microsoft research project called "Intentional Programming"(IP) ( https://en.wikipedia.org/wiki/Intentional_programming ) a few decades ago. The idea is good but i believe due to it being a true disruptive technology and other market forces it was shelved. PS: Charles Simonyi, the inventor of IP, wrote a paper called "The Death of Computer Languages, The Birth of Intentional Programming…

Intentional programming is not tied to graphical representation even if that’s how it looked in a prototype. It’s more about separating program structure from detail, trying to better deliver on Dijkstra’s comment about a semantic layer at which one can be absolutely precise. I consider it required reading for anyone frustrated by the present state of programming.

The problem with IP was that it was all so hush-hush that there was no real "thing" i could get my hands on to understand it. I got that it was some form of a DSL or maybe a bunch of inter-linked DSLs connected together where you drew your specific requirement like a "Mindmap". But this is too high-level to get any idea of the implementation and usage. It could also be that this was all "much ado about nothing" in that the idea was well-known but marketing put a spin on the presentation to its own detriment.

Re: Ask HN: Why is programming editing text?

#76
My take here is that we lack universal tools for working at higher levels. The only thing we’ve managed to standardize on is ASCII/UTF

What we need is a standardized representation for tree structures and their schemas. XML is too complex. JSON and YAML isn’t good enough. Lisp is pretty good, but I think the text representation is off-putting for a lot of people and its general focus is not quite in the right direction (recursive lists of data/items rather than having typed nodes that contained list of other typed nodes, like XML, with schemas defining every node type)

Re: Ask HN: Why is programming editing text?

#77
post #76

My take here is that we lack universal tools for working at higher levels. The only thing we’ve managed to standardize on is ASCII/UTF What we need is a standardized representation for tree structures and their schemas. XML is too complex. JSON and YAML isn’t good enough. Lisp is pretty good, but I think the text representation is off-putting for a lot of people and its general focus is not quite in the right directi…

Note that if your "standardized representation" includes things like letters and numbers, it qualifies as text. If we stuff pieces of text into boxes and connect them with lines, that's still text.

If you get rid of all text, what will you use for naming functions and variables? Icons?

Or just don't name anything: to reference anything, draw an arrow to it?

What do numeric literals look like?

Re: Ask HN: Why is programming editing text?

#78
> So why do we bother with all that coding style stuff if we could make an IDE that edits the program itself instead of text? (I get that text is a universal format, but that doesn't mean we have to edit it directly.)

A huge benefit of text is that if you learn to read code, you already know how to edit it too. This is because of WYTIWYS: What you type is what you see.

Higher level edits and refactoring are awesome, but when you just start using the environment you can't learn all the refactorings yet, while you only want to enter something similar to the code you saw on the whiteboard in class etc. WYTIWYS makes it easy.

Historically, many attempts at structural or projectional editors didn't adhere to WYTIWYS. I believe that this is a major reason for why they haven't gained popularity.

But recently there are several projects developing projectional editors which do adhere to WYTIWYS!

One is Lamdu (http://www.lamdu.org) (btw I'm one of its developers). In Lamdu we try to create a programming language with a friendly projectional editor which does adhere to WYTIWYS and also offers awesome unique features that projectional editors enable. (for more information see our short videos - https://www.youtube.com/channel/UCgvPEOFglvS4_ZEHi-PEctQ )

Another projectional editor adhering to WYTIWYS is Jetbrains MPS (https://www.jetbrains.com/mps/) . This one isn't limited to a single programming language! It is a general purpose language workbench.

Re: Ask HN: Why is programming editing text?

#79
Simply because writing is the best form of communication of ideas after speech, and using speech to program is just silly, not to mention cumbersome and not productive. Writing, since its invention, has become inseparable from humans and its quite understandable that it is extended to instruct computers, with the compiler as the, well, interpreter.

As for the mechanism you talk about, that's basically declarative style and a lot of platforms (for the lack of better word) do this, mainly in business logic and scientific applications. The most famous example is Excel. However, this style works like a charm only when the set of possible actions is predetermined, and is not conducive to creating new actions, which is why every single platform has some kind of scripting. And scripting is editing text. So there you go.

Post reply on HN