Hacker News new | ask | show | jobs
by allday 1412 days ago
This thought crosses my mind a lot too. When we're working with code, we're shaping information into structures and patterns. And so our brains are tasked with translating those structures and patterns into text, making sure that text is written exactly right, and reconciling the difference in the observed output of structures and patterns with the text we've written. What if we could stay at that higher level of abstraction?

My de facto example of this that I keep coming back to is syntax highlighting. It's immensely useful, and yet once you get used to it, the brain is able to skip the (conscious) step of breaking it down e.g. "this text is green so it means it is a function name, so the next text should be blue because they are function parameters", etc. It's more like "okay, green, blue, bunch of stuff between the braces, checks out". Indentation, squiggly line error highlighting, etc. all serve a similar purpose. They rely on our minds' fundamental ability to recognize visual patterns without having to fully process them through our language centers.

So I feel like there is a huge unexplored space there for more efficient and natural programming. VR with 3D representations of code as, I dunno, pipes, gears, something like that? Function declarations in specific colors and then call sites in mixed colors when one function is called from another? Anything to reduce the friction from thought to working software without having to worry about syntax.

This is all very abstract and I probably haven't explained it well, but it's one of those things I can't shake because I'm fairly sure there's something there.

2 comments

> Anything to reduce the friction from thought to working software without having to worry about syntax.

The syntax complexity will just be moved into a visual layer, it doesn't disappear.

> VR with 3D representations of code as, I dunno, pipes, gears, something like that?

Those 3D representations will just generate some code again, adding another layer of complexity to the debugging process?

> The syntax complexity will just be moved into a visual layer, it doesn't disappear.

You missed the part where our brain is much better prepared to deal with visual complexity than textual. It's like moving the job to a specialized hardware co-processor.

Even if the inherent complexity of the task is the same, the environment would allow to do it way more efficiently. And we could also redesign the languages and IDEs to take advantage and reduce non-inherent complexity as well. See for example the Cursorless demo linked above, where you can target specific bits of code by naming a letter rather than navigating to them with arrow keys or the mouse.

https://m.youtube.com/watch?v=5mAzHGM2M0k

> You missed the part where our brain is much better prepared to deal with visual complexity than textual.

Citation needed.

Text is also a visual representation of language. If you want symbols instead of letters to represent logic you basically end up with hieroglyph like system, a logographic one.

Visual representation is not logical, it works according to gestalt principles. [1] Visual improvements would not be used to represent the program logic but secondary notation to improve and accelerate understanding. [2]

The metaphor would be using a graphics card for rendering the scene and the CPU for the game logic. Without a graphic card, your rendering options are extremely limited.

[1] https://en.wikipedia.org/wiki/Gestalt_psychology

[2] https://en.wikipedia.org/wiki/Secondary_notation

> Anything to reduce the friction from thought to working software without having to worry about syntax

I think that the text/notation based representation of programs (or state machines) is the most effective way.

The reason is that it leverages the human ability to use language. I think our intuition for language and thought is much better than our intuition for 2d/3d spaces.

A picture is worth a thousand words, but if you need exact precision, as programs need, no amount of non-text-pictures would give you that flexibility to describe exactly what you want without losing details.

There is a steep learning curve to languages, but once you have learnt the language, these concepts get attached and integrated to your thoughts. This allows you to design increasingly higher levels of abstraction, until you are working with concepts in your current domain.